aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/guard_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-03-09 09:41:42 +0100
committerBjörn Gustavsson <[email protected]>2015-03-09 09:41:42 +0100
commita7a7f22f315cb0b9d607709cdfca11805758da3c (patch)
treea148089efb350218b7c3c08c879c209c655d89b5 /lib/compiler/test/guard_SUITE.erl
parentf2d39216e0587db58b5a79c78bfe94b00334cd0d (diff)
parent0d3be61f3a4b5aa3437d08603ea7565432e3a07b (diff)
downloadotp-a7a7f22f315cb0b9d607709cdfca11805758da3c.tar.gz
otp-a7a7f22f315cb0b9d607709cdfca11805758da3c.tar.bz2
otp-a7a7f22f315cb0b9d607709cdfca11805758da3c.zip
Merge branch 'bjorn/compiler/maps'
* bjorn/compiler/maps: v3_codegen: Teach the put_map_* instructions to reuse source registers beam_validator: Tighten tests of maps v3_core: Eliminate the sloppiness-encouraging get_ianno/1 function v3_core: Add is_map tests before map instructions beam_type: Use the complete register map when calculating liveness Introduce '%live' annotations with a complete register map beam_validator: Teach bif_type/3 and is_bif_safe/2 about is_map/1 v3_core: Simplify conversion of map patterns
Diffstat (limited to 'lib/compiler/test/guard_SUITE.erl')
-rw-r--r--lib/compiler/test/guard_SUITE.erl12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/compiler/test/guard_SUITE.erl b/lib/compiler/test/guard_SUITE.erl
index 8db47ffa40..08279d9408 100644
--- a/lib/compiler/test/guard_SUITE.erl
+++ b/lib/compiler/test/guard_SUITE.erl
@@ -1802,6 +1802,12 @@ bad_guards(Config) when is_list(Config) ->
fc(catch bad_guards_2(#{a=>0,b=>0}, [x])),
fc(catch bad_guards_2(not_a_map, [x])),
fc(catch bad_guards_2(42, [x])),
+
+ fc(catch bad_guards_3(#{a=>0,b=>0}, [])),
+ fc(catch bad_guards_3(#{a=>0,b=>0}, [x])),
+ fc(catch bad_guards_3(not_a_map, [x])),
+ fc(catch bad_guards_3(42, [x])),
+
ok.
%% beam_bool used to produce GC BIF instructions whose
@@ -1813,6 +1819,12 @@ bad_guards_1(X, [_]) when {{X}}, -X ->
bad_guards_2(M, [_]) when M#{a := 0, b => 0}, map_size(M) ->
ok.
+%% beam_type used to produce an GC BIF instruction whose Live operand
+%% included uninitialized registers.
+
+bad_guards_3(M, [_]) when is_map(M) andalso M#{a := 0, b => 0}, length(M) ->
+ ok.
+
%% Call this function to turn off constant propagation.
id(I) -> I.