From 1816931fc0645f187c0ca9395cba14cd16a87be4 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 3 Dec 2014 17:45:57 +0100 Subject: mds-kbdc: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- .../alive-code/for-function-return-end-alive | 25 ++++++++++++++++++++++ .../alive-code/for-macro-return-end-alive | 25 ++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 test-files/mds-kbdc/eliminate-dead-code/alive-code/for-function-return-end-alive create mode 100644 test-files/mds-kbdc/eliminate-dead-code/alive-code/for-macro-return-end-alive (limited to 'test-files/mds-kbdc/eliminate-dead-code/alive-code') diff --git a/test-files/mds-kbdc/eliminate-dead-code/alive-code/for-function-return-end-alive b/test-files/mds-kbdc/eliminate-dead-code/alive-code/for-function-return-end-alive new file mode 100644 index 0000000..7a02539 --- /dev/null +++ b/test-files/mds-kbdc/eliminate-dead-code/alive-code/for-function-return-end-alive @@ -0,0 +1,25 @@ +for 1 to 2 as \1 + function f/0 + return + end function + : "code" +end for + +# (for (@ 1 0-3) ‘1’ ‘2’ (.variable ‘\1’) +# (.inner +# (function (@ 2 2-10) ‘f/0’ +# (.inner +# (return (@ 3 4-10)) +# ) +# ) +# (map (@ 5 2-18) +# (.sequence +# (keys (@ 5 2-9) ‘’) +# ) +# (.result +# (string (@ 5 12-18) ‘"code"’) +# ) +# ) +# ) +# ) + diff --git a/test-files/mds-kbdc/eliminate-dead-code/alive-code/for-macro-return-end-alive b/test-files/mds-kbdc/eliminate-dead-code/alive-code/for-macro-return-end-alive new file mode 100644 index 0000000..516e622 --- /dev/null +++ b/test-files/mds-kbdc/eliminate-dead-code/alive-code/for-macro-return-end-alive @@ -0,0 +1,25 @@ +for 1 to 2 as \1 + macro m/0 + return + end macro + : "code" +end for + +# (for (@ 1 0-3) ‘1’ ‘2’ (.variable ‘\1’) +# (.inner +# (macro (@ 2 2-7) ‘m/0’ +# (.inner +# (return (@ 3 4-10)) +# ) +# ) +# (map (@ 5 2-18) +# (.sequence +# (keys (@ 5 2-9) ‘’) +# ) +# (.result +# (string (@ 5 12-18) ‘"code"’) +# ) +# ) +# ) +# ) + -- cgit v1.2.3-70-g09d2