aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/misc_SUITE.erl
diff options
context:
space:
mode:
authorJosé Valim <[email protected]>2016-06-01 18:48:23 +0200
committerJosé Valim <[email protected]>2017-07-06 17:07:24 +0200
commitd4a27e98cb1c11340b296004d784b15f80d015e9 (patch)
tree3a755e3ab90d8368ac2c653567dddfa55efc421e /lib/compiler/test/misc_SUITE.erl
parentf52748254f17ba42e344798e8c787a1e3361fa33 (diff)
downloadotp-d4a27e98cb1c11340b296004d784b15f80d015e9.tar.gz
otp-d4a27e98cb1c11340b296004d784b15f80d015e9.tar.bz2
otp-d4a27e98cb1c11340b296004d784b15f80d015e9.zip
Introduce a new core pass called sys_core_alias
The goal of this pass is to find values that are built from patterns and generate aliases for those values to remove pressure from the GC. For example, this code: example({ok, Val}) -> {ok, Val}. shall become: example({ok, Val} = Tuple) -> Tuple. Currently this pass aliases tuple and cons nodes made of literals, variables and other cons. The tuple/cons may appear anywhere in the pattern and it will be aliased if used later on. Notice a tuple/cons made only of literals is not aliased as it may be part of the literal pool.
Diffstat (limited to 'lib/compiler/test/misc_SUITE.erl')
-rw-r--r--lib/compiler/test/misc_SUITE.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/compiler/test/misc_SUITE.erl b/lib/compiler/test/misc_SUITE.erl
index 4bd884d86b..ea4aaf40a9 100644
--- a/lib/compiler/test/misc_SUITE.erl
+++ b/lib/compiler/test/misc_SUITE.erl
@@ -161,11 +161,12 @@ md5_1(Beam) ->
%% Cover some code that handles internal errors.
silly_coverage(Config) when is_list(Config) ->
- %% sys_core_fold, sys_core_bsm, sys_core_setel, v3_kernel
+ %% sys_core_fold, sys_core_alias, sys_core_bsm, sys_core_setel, v3_kernel
BadCoreErlang = {c_module,[],
name,[],[],
[{{c_var,[],{foo,2}},seriously_bad_body}]},
expect_error(fun() -> sys_core_fold:module(BadCoreErlang, []) end),
+ expect_error(fun() -> sys_core_alias:module(BadCoreErlang, []) end),
expect_error(fun() -> sys_core_bsm:module(BadCoreErlang, []) end),
expect_error(fun() -> sys_core_dsetel:module(BadCoreErlang, []) end),
expect_error(fun() -> v3_kernel:module(BadCoreErlang, []) end),