aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2012-08-09 12:27:35 +0200
committerBjörn Gustavsson <[email protected]>2012-08-15 10:54:52 +0200
commitee5fdd50040894b27fd3fe9e767eab3821666e9a (patch)
tree3bdbfc30d1be0a748b36331d367fea54e1fdfa2f /lib/compiler/src
parentc5aa836e826a824152cccb2b8e5ead58ed0d16c3 (diff)
downloadotp-ee5fdd50040894b27fd3fe9e767eab3821666e9a.tar.gz
otp-ee5fdd50040894b27fd3fe9e767eab3821666e9a.tar.bz2
otp-ee5fdd50040894b27fd3fe9e767eab3821666e9a.zip
beam_utils:live_opt/1: Correct handling of try_case_end/1
Liveness for the try_case_end/1 instruction should be calculated in the same way as for the case_end/1 instruction.
Diffstat (limited to 'lib/compiler/src')
-rw-r--r--lib/compiler/src/beam_utils.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/compiler/src/beam_utils.erl b/lib/compiler/src/beam_utils.erl
index abcd93f280..194f089ba1 100644
--- a/lib/compiler/src/beam_utils.erl
+++ b/lib/compiler/src/beam_utils.erl
@@ -741,6 +741,9 @@ live_opt([{badmatch,Src}=I|Is], _, D, Acc) ->
live_opt([{case_end,Src}=I|Is], _, D, Acc) ->
Regs = x_live([Src], 0),
live_opt(Is, Regs, D, [I|Acc]);
+live_opt([{try_case_end,Src}=I|Is], _, D, Acc) ->
+ Regs = x_live([Src], 0),
+ live_opt(Is, Regs, D, [I|Acc]);
live_opt([if_end=I|Is], _, D, Acc) ->
Regs = 0,
live_opt(Is, Regs, D, [I|Acc]);
@@ -802,8 +805,6 @@ live_opt([{deallocate,_}=I|Is], Regs, D, Acc) ->
live_opt(Is, Regs, D, [I|Acc]);
live_opt([{kill,_}=I|Is], Regs, D, Acc) ->
live_opt(Is, Regs, D, [I|Acc]);
-live_opt([{try_case_end,_}=I|Is], Regs, D, Acc) ->
- live_opt(Is, Regs, D, [I|Acc]);
live_opt([{try_end,_}=I|Is], Regs, D, Acc) ->
live_opt(Is, Regs, D, [I|Acc]);
live_opt([{loop_rec_end,_}=I|Is], Regs, D, Acc) ->