aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/beam_split.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-04-11 13:45:08 +0200
committerBjörn Gustavsson <[email protected]>2016-04-11 13:45:08 +0200
commit9d2dde09689246cd61a5e7bfdc8ca37884043a9c (patch)
tree28103683a37e38c5ba4c5e1313ef8c952f3d8fb9 /lib/compiler/src/beam_split.erl
parent01ac0d2cb316b97834eb1dbbe4a86d2a6be84f04 (diff)
parentab03678e87732407625150c202e177a85a025beb (diff)
downloadotp-9d2dde09689246cd61a5e7bfdc8ca37884043a9c.tar.gz
otp-9d2dde09689246cd61a5e7bfdc8ca37884043a9c.tar.bz2
otp-9d2dde09689246cd61a5e7bfdc8ca37884043a9c.zip
Merge branch 'bjorn/raise'
* bjorn/raise: Remove unreachable code after 'raise' instructions Simplify the raise instruction to reduce code size
Diffstat (limited to 'lib/compiler/src/beam_split.erl')
-rw-r--r--lib/compiler/src/beam_split.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/compiler/src/beam_split.erl b/lib/compiler/src/beam_split.erl
index bb1c0e23a9..7b7f0a0f80 100644
--- a/lib/compiler/src/beam_split.erl
+++ b/lib/compiler/src/beam_split.erl
@@ -47,6 +47,8 @@ split_block([{set,[R],[_,_,_]=As,{bif,is_record,{f,Lbl}}}|Is], Bl, Acc) ->
split_block(Is, [], [{bif,is_record,{f,Lbl},As,R}|make_block(Bl, Acc)]);
split_block([{set,[R],As,{bif,N,{f,Lbl}=Fail}}|Is], Bl, Acc) when Lbl =/= 0 ->
split_block(Is, [], [{bif,N,Fail,As,R}|make_block(Bl, Acc)]);
+split_block([{set,[R],As,{bif,raise,{f,_}=Fail}}|Is], Bl, Acc) ->
+ split_block(Is, [], [{bif,raise,Fail,As,R}|make_block(Bl, Acc)]);
split_block([{set,[R],As,{alloc,Live,{gc_bif,N,{f,Lbl}=Fail}}}|Is], Bl, Acc)
when Lbl =/= 0 ->
split_block(Is, [], [{gc_bif,N,Fail,Live,As,R}|make_block(Bl, Acc)]);