aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/beam_trim.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2012-09-05 12:16:44 +0200
committerBjörn Gustavsson <[email protected]>2012-10-10 15:37:28 +0200
commit47d109fc4eda1288e8d21a31b603b3cfc300536a (patch)
tree12c4692c6a4c19147b417cd91925bd26af1a5bd0 /lib/compiler/src/beam_trim.erl
parent531aa719de264c81876da2db1ca9882f8f5db663 (diff)
downloadotp-47d109fc4eda1288e8d21a31b603b3cfc300536a.tar.gz
otp-47d109fc4eda1288e8d21a31b603b3cfc300536a.tar.bz2
otp-47d109fc4eda1288e8d21a31b603b3cfc300536a.zip
Represent the 'send' instruction as a call_ext/2 instruction
Somewhat reduce code bloat.
Diffstat (limited to 'lib/compiler/src/beam_trim.erl')
-rw-r--r--lib/compiler/src/beam_trim.erl8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/compiler/src/beam_trim.erl b/lib/compiler/src/beam_trim.erl
index ceeed603ab..05ebe917d9 100644
--- a/lib/compiler/src/beam_trim.erl
+++ b/lib/compiler/src/beam_trim.erl
@@ -182,8 +182,6 @@ remap([{bs_put=Op,Fail,Info,Ss}|Is], Map, Acc) ->
remap(Is, Map, [I|Acc]);
remap([{kill,Y}|T], Map, Acc) ->
remap(T, Map, [{kill,Map(Y)}|Acc]);
-remap([send=I|T], Map, Acc) ->
- remap(T, Map, [I|Acc]);
remap([{make_fun2,_,_,_,_}=I|T], Map, Acc) ->
remap(T, Map, [I|Acc]);
remap([{deallocate,N}|Is], Map, Acc) ->
@@ -260,8 +258,8 @@ frame_size([{call_fun,_}|Is], Safe) ->
frame_size(Is, Safe);
frame_size([{call,_,_}|Is], Safe) ->
frame_size(Is, Safe);
-frame_size([{call_ext,A,{extfunc,M,F,A}}|Is], Safe) ->
- case erl_bifs:is_exit_bif(M, F, A) of
+frame_size([{call_ext,_,_}=I|Is], Safe) ->
+ case beam_jump:is_exit_instruction(I) of
true -> throw(not_possible);
false -> frame_size(Is, Safe)
end;
@@ -281,8 +279,6 @@ frame_size([{bs_put,{f,L},_,_}|Is], Safe) ->
frame_size_branch(L, Is, Safe);
frame_size([{kill,_}|Is], Safe) ->
frame_size(Is, Safe);
-frame_size([send|Is], Safe) ->
- frame_size(Is, Safe);
frame_size([{make_fun2,_,_,_,_}|Is], Safe) ->
frame_size(Is, Safe);
frame_size([{deallocate,N}|_], _) -> N;