aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/beam_jump.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-12-18 10:08:37 +0100
committerBjörn Gustavsson <[email protected]>2013-12-18 10:08:37 +0100
commit39de9391f76ed8f3503869684726d18d0fe723c3 (patch)
tree3475105fc750a023be6a879070ed13705c98bd40 /lib/compiler/src/beam_jump.erl
parent165846b143c8275350972caaf4c1013cfe5db043 (diff)
parent20c38f0156b711032274cdea5a5049fc7ce8e81f (diff)
downloadotp-39de9391f76ed8f3503869684726d18d0fe723c3.tar.gz
otp-39de9391f76ed8f3503869684726d18d0fe723c3.tar.bz2
otp-39de9391f76ed8f3503869684726d18d0fe723c3.zip
Merge branch 'nox/asm-reentrant/OTP-11544'
* nox/asm-reentrant/OTP-11544: Test compilation of BEAM assembly with optimisations on Keep exit blocks in order when moving them in beam_jump Add missing recv_set, recv_mark and '%' to BEAM live annotation Collect all optimised allocate instructions in beam_block Properly collect allocate_zero instructions in beam_block Properly let floating-point instructions through in the BEAM compiler
Diffstat (limited to 'lib/compiler/src/beam_jump.erl')
-rw-r--r--lib/compiler/src/beam_jump.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/compiler/src/beam_jump.erl b/lib/compiler/src/beam_jump.erl
index b29a3565e4..d57fb80ac2 100644
--- a/lib/compiler/src/beam_jump.erl
+++ b/lib/compiler/src/beam_jump.erl
@@ -202,19 +202,19 @@ is_label(_) -> false.
move(Is) ->
move_1(Is, [], []).
-move_1([I|Is], End0, Acc0) ->
+move_1([I|Is], Ends, Acc0) ->
case is_exit_instruction(I) of
false ->
- move_1(Is, End0, [I|Acc0]);
+ move_1(Is, Ends, [I|Acc0]);
true ->
- case extract_seq(Acc0, [I|End0]) of
+ case extract_seq(Acc0, [I]) of
no ->
- move_1(Is, End0, [I|Acc0]);
+ move_1(Is, Ends, [I|Acc0]);
{yes,End,Acc} ->
- move_1(Is, End, Acc)
+ move_1(Is, [End|Ends], Acc)
end
end;
-move_1([], End, Acc) -> reverse(Acc, End).
+move_1([], Ends, Acc) -> reverse(Acc, lists:append(reverse(Ends))).
extract_seq([{line,_}=Line|Is], Acc) ->
extract_seq(Is, [Line|Acc]);