aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_load.h
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2016-06-27 20:18:22 +0200
committerLukas Larsson <[email protected]>2016-10-12 15:39:38 +0200
commit855b3a9be724ffd3c9f7e311cf9d810099fa36ef (patch)
treef54a4e6ae4c00f0dd752f48d9dc99fad46c11faf /erts/emulator/beam/beam_load.h
parentfad45d54881152eea14e84a88eb7fbaa0ba0329b (diff)
downloadotp-855b3a9be724ffd3c9f7e311cf9d810099fa36ef.tar.gz
otp-855b3a9be724ffd3c9f7e311cf9d810099fa36ef.tar.bz2
otp-855b3a9be724ffd3c9f7e311cf9d810099fa36ef.zip
erts: Refactor out func_info into struct
This commit adds two new structs to be used to represent erlang code in erts. ErtsCodeInfo is used to describe the i_func_info header that is part of all Export entries and the prelude of each function. This replaces all the BeamInstr * that were previously used to point to these locations. After this change the code should never use BeamInstr * with offsets to figure out different parts of the func_info header. ErtsCodeMFA is a struct that is used to descripe a MFA in code. It is used within ErtsCodeInfo and also in Process->current. All function that previously took Eterm * or BeamInstr * to identify a MFA now use the ErtsCodeMFA or ErtsCodeInfo where appropriate. The code has been tested to work when adding a new field to the ErtsCodeInfo struct, but some updates are needed in ops.tab to make it work.
Diffstat (limited to 'erts/emulator/beam/beam_load.h')
-rw-r--r--erts/emulator/beam/beam_load.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/erts/emulator/beam/beam_load.h b/erts/emulator/beam/beam_load.h
index 6be4031822..f67dfd7a81 100644
--- a/erts/emulator/beam/beam_load.h
+++ b/erts/emulator/beam/beam_load.h
@@ -37,14 +37,6 @@ typedef struct gen_op_entry {
extern const GenOpEntry gen_opc[];
-#ifdef NO_JUMP_TABLE
-#define BeamOp(Op) (Op)
-#else
-extern void** beam_ops;
-#define BeamOp(Op) beam_ops[(Op)]
-#endif
-
-
extern BeamInstr beam_debug_apply[];
extern BeamInstr* em_call_error_handler;
extern BeamInstr* em_apply_bif;
@@ -115,7 +107,7 @@ typedef struct beam_code_header {
* The actual loaded code (for the first function) start just beyond
* this table.
*/
- BeamInstr* functions[1];
+ ErtsCodeInfo* functions[1];
}BeamCodeHeader;