aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-06-15 11:30:19 +0200
committerBjörn-Egil Dahlberg <[email protected]>2015-06-17 10:36:02 +0200
commit82f6d6a5c9ad7dec5fccf92e892611a083efe896 (patch)
tree846a438c959ccf85a477bdbfc5a5f1885d3036f6 /lib/compiler/src
parentfc73f98012ab8a1688f1bdc9063bfe9d63a675c9 (diff)
downloadotp-82f6d6a5c9ad7dec5fccf92e892611a083efe896.tar.gz
otp-82f6d6a5c9ad7dec5fccf92e892611a083efe896.tar.bz2
otp-82f6d6a5c9ad7dec5fccf92e892611a083efe896.zip
compiler: Fix beam_bool pass for get_map_elements
Before beam_split the get_map_elements instruction is still in blocks and the helper function in beam_jump did not reflect this. Reported-by: Quviq twitter account
Diffstat (limited to 'lib/compiler/src')
-rw-r--r--lib/compiler/src/beam_jump.erl19
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/compiler/src/beam_jump.erl b/lib/compiler/src/beam_jump.erl
index 80b2998ddc..5bfaa41b7d 100644
--- a/lib/compiler/src/beam_jump.erl
+++ b/lib/compiler/src/beam_jump.erl
@@ -490,16 +490,17 @@ is_label_used_in_1([], _, _) -> false.
is_label_used_in_block({set,_,_,Info}, Lbl) ->
case Info of
- {bif,_,{f,F}} -> F =:= Lbl;
- {alloc,_,{gc_bif,_,{f,F}}} -> F =:= Lbl;
+ {bif,_,{f,F}} -> F =:= Lbl;
+ {alloc,_,{gc_bif,_,{f,F}}} -> F =:= Lbl;
{alloc,_,{put_map,_,{f,F}}} -> F =:= Lbl;
- {'catch',{f,F}} -> F =:= Lbl;
- {alloc,_,_} -> false;
- {put_tuple,_} -> false;
- {get_tuple_element,_} -> false;
- {set_tuple_element,_} -> false;
- {line,_} -> false;
- _ when is_atom(Info) -> false
+ {get_map_elements,{f,F}} -> F =:= Lbl;
+ {'catch',{f,F}} -> F =:= Lbl;
+ {alloc,_,_} -> false;
+ {put_tuple,_} -> false;
+ {get_tuple_element,_} -> false;
+ {set_tuple_element,_} -> false;
+ {line,_} -> false;
+ _ when is_atom(Info) -> false
end.
%% remove_unused_labels(Instructions0) -> Instructions