diff options
author | Björn Gustavsson <[email protected]> | 2012-09-04 10:53:40 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2012-10-09 15:24:40 +0200 |
commit | 8c9863948b440f2741b6df3ffda2c6dd2b7b363c (patch) | |
tree | 68f08d615672add70c701bf6bf796513228d9367 /lib/compiler/test/misc_SUITE.erl | |
parent | e38dc4aaeb769aaf531c66e508f475ed24c25ffd (diff) | |
download | otp-8c9863948b440f2741b6df3ffda2c6dd2b7b363c.tar.gz otp-8c9863948b440f2741b6df3ffda2c6dd2b7b363c.tar.bz2 otp-8c9863948b440f2741b6df3ffda2c6dd2b7b363c.zip |
Introduce the mandatory beam_a and beam_z passes
Introduce the mandary beam_a pass that will be run directly after code
generation, and the mandatory beam_z pass that will be run just before
beam_asm. Since these passes surround the optimizations, beam_a can
(for example) do instruction renaming to simplify the optimization
passes and beam_z can undo those renamings.
Diffstat (limited to 'lib/compiler/test/misc_SUITE.erl')
-rw-r--r-- | lib/compiler/test/misc_SUITE.erl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/compiler/test/misc_SUITE.erl b/lib/compiler/test/misc_SUITE.erl index 0376c7ef3e..6df8b2ac30 100644 --- a/lib/compiler/test/misc_SUITE.erl +++ b/lib/compiler/test/misc_SUITE.erl @@ -182,6 +182,14 @@ silly_coverage(Config) when is_list(Config) -> CodegenInput = {?MODULE,[{foo,0}],[],[{function,foo,0,[a|b],a,b,[]}]}, ?line expect_error(fun() -> v3_codegen:module(CodegenInput, []) end), + %% beam_a + BeamAInput = {?MODULE,[{foo,0}],[], + [{function,foo,0,2, + [{label,1}, + {func_info,{atom,?MODULE},{atom,foo},0}, + {label,2}|non_proper_list]}],99}, + expect_error(fun() -> beam_a:module(BeamAInput, []) end), + %% beam_block BlockInput = {?MODULE,[{foo,0}],[], [{function,foo,0,2, @@ -263,6 +271,13 @@ silly_coverage(Config) when is_list(Config) -> {block,[a|b]}]}],0}, ?line expect_error(fun() -> beam_receive:module(ReceiveInput, []) end), + BeamZInput = {?MODULE,[{foo,0}],[], + [{function,foo,0,2, + [{label,1}, + {func_info,{atom,?MODULE},{atom,foo},0}, + {label,2}|non_proper_list]}],99}, + expect_error(fun() -> beam_z:module(BeamZInput, []) end), + ok. expect_error(Fun) -> |