aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/icode/hipe_beam_to_icode.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2018-01-24 12:33:32 +0100
committerGitHub <[email protected]>2018-01-24 12:33:32 +0100
commit4571e13801c53e1c2bbf744ab178a4a0f9f0a7cd (patch)
treeb0f72307cfeb11a886820845e07f0c67d870b9dc /lib/hipe/icode/hipe_beam_to_icode.erl
parent8e66754dac8963a6631c850b1eb63b27408259a2 (diff)
parent9b0122b65bdcafbae2a3cfd3299903da0948acab (diff)
downloadotp-4571e13801c53e1c2bbf744ab178a4a0f9f0a7cd.tar.gz
otp-4571e13801c53e1c2bbf744ab178a4a0f9f0a7cd.tar.bz2
otp-4571e13801c53e1c2bbf744ab178a4a0f9f0a7cd.zip
Merge pull request #1682 from bjorng/bjorn/optimize-unbuilt-stacktrace
Don't build a stacktrace if it's only passed to erlang:raise/3
Diffstat (limited to 'lib/hipe/icode/hipe_beam_to_icode.erl')
-rw-r--r--lib/hipe/icode/hipe_beam_to_icode.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/hipe/icode/hipe_beam_to_icode.erl b/lib/hipe/icode/hipe_beam_to_icode.erl
index 7ff9fd83eb..6e66ec057c 100644
--- a/lib/hipe/icode/hipe_beam_to_icode.erl
+++ b/lib/hipe/icode/hipe_beam_to_icode.erl
@@ -1164,6 +1164,12 @@ trans_fun([build_stacktrace|Instructions], Env) ->
Vars = [mk_var({x,0})], %{x,0} is implict arg and dst
[hipe_icode:mk_primop(Vars,build_stacktrace,Vars),
trans_fun(Instructions, Env)];
+%%--- raw_raise ---
+trans_fun([raw_raise|Instructions], Env) ->
+ Vars = [mk_var({x,0}),mk_var({x,1}),mk_var({x,2})],
+ Dst = [mk_var({x,0})],
+ [hipe_icode:mk_primop(Dst,raw_raise,Vars) |
+ trans_fun(Instructions, Env)];
%%--------------------------------------------------------------------
%%--- ERROR HANDLING ---
%%--------------------------------------------------------------------