aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/utils
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-06-15 08:03:25 +0200
committerBjörn Gustavsson <[email protected]>2011-10-11 11:36:35 +0200
commit207436c383995dc6fcea1953f9188f8df280bd81 (patch)
tree7d9c953308556cb5ba2c5012e96d84c84af14d2d /erts/emulator/utils
parent5bd8f04a8a4b5c7a3f859355dd47dab27c6fa494 (diff)
downloadotp-207436c383995dc6fcea1953f9188f8df280bd81.tar.gz
otp-207436c383995dc6fcea1953f9188f8df280bd81.tar.bz2
otp-207436c383995dc6fcea1953f9188f8df280bd81.zip
Combine a 'call' instruction with the following 'end' instruction
A 'call' instruction in the loader transformation language is always followed by an 'end' instruction, so we can replace the 'call' instruction with a 'call_end' instruction.
Diffstat (limited to 'erts/emulator/utils')
-rwxr-xr-xerts/emulator/utils/beam_makeops5
1 files changed, 3 insertions, 2 deletions
diff --git a/erts/emulator/utils/beam_makeops b/erts/emulator/utils/beam_makeops
index 7b66496856..2272a941bb 100755
--- a/erts/emulator/utils/beam_makeops
+++ b/erts/emulator/utils/beam_makeops
@@ -1591,7 +1591,7 @@ sub tr_gen_to {
}
}
pop(@code); # Get rid of 'next_instr'
- push(@code, &make_op("$name()", 'call', scalar(@call_table)));
+ push(@code, make_op("$name()", 'call_end', scalar(@call_table)));
push(@call_table, [$name, @args]);
last;
}
@@ -1629,7 +1629,8 @@ sub tr_gen_to {
pop(@code) if is_instr($code[$#code], 'next_arg');
}
- push(@code, &make_op('', 'end'));
+ push(@code, make_op('', 'end'))
+ unless is_instr($code[$#code], 'call_end');
#
# Chain together all codes segments having the same first operation.