aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/beam_ssa_pre_codegen.erl
diff options
context:
space:
mode:
authorJohn Högberg <[email protected]>2018-10-08 07:35:01 +0200
committerJohn Högberg <[email protected]>2018-10-08 07:35:01 +0200
commit3ea2ff5697d1ee53a31d7f0530692f49e9d0c516 (patch)
treeb0f90aaafa4ae081412ad0412119456d172e9bcb /lib/compiler/src/beam_ssa_pre_codegen.erl
parent1b4ad9a2d65a094285a40ae8507bc5b46a59b2e9 (diff)
parentd6509e377db65f2afd7394db2a5154e420dfd4dc (diff)
downloadotp-3ea2ff5697d1ee53a31d7f0530692f49e9d0c516.tar.gz
otp-3ea2ff5697d1ee53a31d7f0530692f49e9d0c516.tar.bz2
otp-3ea2ff5697d1ee53a31d7f0530692f49e9d0c516.zip
Merge branch 'john/compiler/fix-literal-fun-stackframes'
* john/compiler/fix-literal-fun-stackframes: beam_ssa_pre_codegen: Literal funs need stack frames too
Diffstat (limited to 'lib/compiler/src/beam_ssa_pre_codegen.erl')
-rw-r--r--lib/compiler/src/beam_ssa_pre_codegen.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/compiler/src/beam_ssa_pre_codegen.erl b/lib/compiler/src/beam_ssa_pre_codegen.erl
index 40742e441a..9175931375 100644
--- a/lib/compiler/src/beam_ssa_pre_codegen.erl
+++ b/lib/compiler/src/beam_ssa_pre_codegen.erl
@@ -1043,11 +1043,11 @@ need_frame_1([#b_set{op=call,args=[Func|_]}|Is], Context) ->
#b_remote{} ->
%% This is an apply(), which always needs a frame.
true;
- #b_var{} ->
- %% A fun call always needs a frame.
- true;
+ #b_local{} ->
+ Context =:= body orelse Is =/= [];
_ ->
- Context =:= body orelse Is =/= []
+ %% A fun call always needs a frame.
+ true
end;
need_frame_1([I|Is], Context) ->
beam_ssa:clobbers_xregs(I) orelse need_frame_1(Is, Context);