aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/beam_receive.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-10-13 10:40:30 +0200
committerGitHub <[email protected]>2017-10-13 10:40:30 +0200
commit094e0a91fc1046462c4dd5accd48b8e2eb7a4c9c (patch)
treedc305b713f0ba3f3c615b1b39c4b345db6649831 /lib/compiler/src/beam_receive.erl
parent805c5b9b4627eacc2fb13d234c553ae476a2c3dd (diff)
parent119713b4d9ad6649aa5f1d0bf492e2f35a0ced01 (diff)
downloadotp-094e0a91fc1046462c4dd5accd48b8e2eb7a4c9c.tar.gz
otp-094e0a91fc1046462c4dd5accd48b8e2eb7a4c9c.tar.bz2
otp-094e0a91fc1046462c4dd5accd48b8e2eb7a4c9c.zip
Merge pull request #1596 from bjorng/bjorn/enhance-try-catch
(Slightly) optimize catch and try/catch OTP-14683
Diffstat (limited to 'lib/compiler/src/beam_receive.erl')
-rw-r--r--lib/compiler/src/beam_receive.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/compiler/src/beam_receive.erl b/lib/compiler/src/beam_receive.erl
index 1403e1e05e..468460eedf 100644
--- a/lib/compiler/src/beam_receive.erl
+++ b/lib/compiler/src/beam_receive.erl
@@ -207,6 +207,8 @@ opt_update_regs({label,Lbl}, R, L) ->
%% A catch label for a previously seen catch instruction is OK.
{R,L}
end;
+opt_update_regs({'try',_,{f,Lbl}}, R, L) ->
+ {R,gb_sets:add(Lbl, L)};
opt_update_regs({try_end,_}, R, L) ->
{R,L};
opt_update_regs({line,_}, R, L) ->