aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-01-09 17:36:38 +0100
committerBjörn-Egil Dahlberg <[email protected]>2015-01-09 17:40:16 +0100
commit3137b3871e3919ab4bdb02dd1fc16c3cb7a77870 (patch)
treed4e413bf6bc49adcca8cd04435b459a4c5b71191 /lib/compiler/src
parent757db63a6e77733bcb757c81ce6d453c3e3718b5 (diff)
downloadotp-3137b3871e3919ab4bdb02dd1fc16c3cb7a77870.tar.gz
otp-3137b3871e3919ab4bdb02dd1fc16c3cb7a77870.tar.bz2
otp-3137b3871e3919ab4bdb02dd1fc16c3cb7a77870.zip
compiler: Remove unnecassary guard for get_map_elements
No need to check for fail label zero for get_map_elements in beam_split. get_map_elements is always used in pattern matching and never in a body.
Diffstat (limited to 'lib/compiler/src')
-rw-r--r--lib/compiler/src/beam_split.erl3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/compiler/src/beam_split.erl b/lib/compiler/src/beam_split.erl
index f5dba314ae..ff4b98aff6 100644
--- a/lib/compiler/src/beam_split.erl
+++ b/lib/compiler/src/beam_split.erl
@@ -53,8 +53,7 @@ split_block([{set,[D],[S|Puts],{alloc,R,{put_map,Op,{f,Lbl}=Fail}}}|Is],
Bl, Acc) when Lbl =/= 0 ->
split_block(Is, [], [{put_map,Fail,Op,S,D,R,{list,Puts}}|
make_block(Bl, Acc)]);
-split_block([{set,Ds,[S|Ss],{get_map_elements,{f,Lbl}=Fail}}|Is], Bl, Acc)
- when Lbl =/= 0 ->
+split_block([{set,Ds,[S|Ss],{get_map_elements,Fail}}|Is], Bl, Acc) ->
Gets = beam_utils:joineven(Ss,Ds),
split_block(Is, [], [{get_map_elements,Fail,S,{list,Gets}}|make_block(Bl, Acc)]);
split_block([{set,[R],[],{'catch',L}}|Is], Bl, Acc) ->