diff options
author | Björn Gustavsson <[email protected]> | 2017-09-05 08:33:02 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2017-09-14 10:16:15 +0200 |
commit | df1f7395a206d1fd4e70b7380fccdbd53540db40 (patch) | |
tree | f8f5e8ebfb073e4a346805f670c63a4d9cbe7b10 /erts/emulator/beam/macros.tab | |
parent | 76b4ff5c5db9610ecd09b11d3816f25b1e6b58f8 (diff) | |
download | otp-df1f7395a206d1fd4e70b7380fccdbd53540db40.tar.gz otp-df1f7395a206d1fd4e70b7380fccdbd53540db40.tar.bz2 otp-df1f7395a206d1fd4e70b7380fccdbd53540db40.zip |
Use relative failure labels
Relative failure in itself is not an optimization, but we plan to
pack failure labels in the future to save memory.
Diffstat (limited to 'erts/emulator/beam/macros.tab')
-rw-r--r-- | erts/emulator/beam/macros.tab | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/erts/emulator/beam/macros.tab b/erts/emulator/beam/macros.tab index 35460da1f4..debeafa651 100644 --- a/erts/emulator/beam/macros.tab +++ b/erts/emulator/beam/macros.tab @@ -29,17 +29,17 @@ REFRESH_GEN_DEST() { } SET_I_REL(Offset) { - ASSERT(VALID_INSTR(* (Eterm *)((BeamInstr *) ($Offset)))); - I = (BeamInstr *) $Offset; + ASSERT(VALID_INSTR(*(I + ($Offset)))); + I += $Offset; } SET_CP_I_ABS(Target) { c_p->i = $Target; - ASSERT(VALID_INSTR(* (Eterm *)c_p->i)); + ASSERT(VALID_INSTR(*c_p->i)); } SET_REL_I(Dst, Offset) { - $Dst = (BeamInstr *) ($Offset); + $Dst = I + ($Offset); ASSERT(VALID_INSTR(*$Dst)); } |