From ef43e32b450df2fdf1c731e9be03693fb0b69e31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Mon, 4 Sep 2017 15:39:58 +0200 Subject: Remove JUMP_OFFSET It has served its purpose. --- erts/emulator/beam/beam_load.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'erts/emulator/beam/beam_load.c') diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c index 9b8f33f576..7d3a19ff86 100644 --- a/erts/emulator/beam/beam_load.c +++ b/erts/emulator/beam/beam_load.c @@ -4840,11 +4840,7 @@ freeze_code(LoaderState* stp) ASSERT(this_patch < stp->ci); next_patch = codev[this_patch]; ASSERT(next_patch < stp->ci); - if (this_patch < stp->num_functions) { - codev[this_patch] = (BeamInstr) (codev + value); - } else { - codev[this_patch] = (BeamInstr) (codev + value - JUMP_OFFSET); - } + codev[this_patch] = (BeamInstr) (codev + value); this_patch = next_patch; } } @@ -4889,7 +4885,7 @@ final_touch(LoaderState* stp, struct erl_module_instance* inst_p) while (index != 0) { BeamInstr next = codev[index]; codev[index] = BeamOpCode(op_catch_yf); - catches = beam_catches_cons((BeamInstr *)codev[index+2]+JUMP_OFFSET, catches); + catches = beam_catches_cons((BeamInstr *)codev[index+2], catches); codev[index+2] = make_catch(catches); index = next; } -- cgit v1.2.3