aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_emu.c
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-12-10 07:57:01 +0100
committerBjörn Gustavsson <[email protected]>2011-01-17 15:23:47 +0100
commit51ddd2047c70bce67c8644d85f5d5de72842c320 (patch)
tree70480b071d450b925d6dd87bfa9af3b62bc88c4c /erts/emulator/beam/beam_emu.c
parent40dd4f87b3567d087bbcb071404b871af3601241 (diff)
downloadotp-51ddd2047c70bce67c8644d85f5d5de72842c320.tar.gz
otp-51ddd2047c70bce67c8644d85f5d5de72842c320.tar.bz2
otp-51ddd2047c70bce67c8644d85f5d5de72842c320.zip
Combine a move + jump sequence into the move_jump instruction
That will save one word and small amount of time for each occurrence.
Diffstat (limited to 'erts/emulator/beam/beam_emu.c')
-rw-r--r--erts/emulator/beam/beam_emu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c
index b90613079a..edb4d61ed2 100644
--- a/erts/emulator/beam/beam_emu.c
+++ b/erts/emulator/beam/beam_emu.c
@@ -688,6 +688,11 @@ extern int count_instructions;
SET_I((BeamInstr *) CallDest); \
Dispatch();
+#define MoveJump(Src) \
+ r(0) = (Src); \
+ SET_I((BeamInstr *) Arg(0)); \
+ Goto(*I);
+
#define GetList(Src, H, T) do { \
Eterm* tmp_ptr = list_val(Src); \
H = CAR(tmp_ptr); \