aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2013-10-26 16:04:29 +0200
committerBjörn-Egil Dahlberg <[email protected]>2014-01-28 15:56:29 +0100
commitf3ea2236bc8d11dd09b7eaaec3f175361e4771d3 (patch)
tree3d7f50fe469eaed565115e81f9ac7b1aafc0d273
parent1014059ea438798960cf858e6f37b16e321152ad (diff)
downloadotp-f3ea2236bc8d11dd09b7eaaec3f175361e4771d3.tar.gz
otp-f3ea2236bc8d11dd09b7eaaec3f175361e4771d3.tar.bz2
otp-f3ea2236bc8d11dd09b7eaaec3f175361e4771d3.zip
compiler: Fix get_map_element bug with allocate
The instruction get_map_element has a faillabel so you may not use the instruction within a allocate/deallocate block.
-rw-r--r--lib/compiler/src/beam_block.erl1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/compiler/src/beam_block.erl b/lib/compiler/src/beam_block.erl
index d5f2ffc444..3723cc19e1 100644
--- a/lib/compiler/src/beam_block.erl
+++ b/lib/compiler/src/beam_block.erl
@@ -240,6 +240,7 @@ move_allocates_2(Alloc, [], Acc) ->
alloc_may_pass({set,_,_,{alloc,_,_}}) -> false;
alloc_may_pass({set,_,_,{set_tuple_element,_}}) -> false;
+alloc_may_pass({set,_,_,{get_map_element,_,_}}) -> false;
alloc_may_pass({set,_,_,put_list}) -> false;
alloc_may_pass({set,_,_,put}) -> false;
alloc_may_pass({set,_,_,_}) -> true.