aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe/hipe_bif0.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-10-02 19:05:57 +0200
committerRickard Green <[email protected]>2015-11-12 15:25:47 +0100
commitb9caedf093d0ccf268562656e28cdda6a02631cb (patch)
treeaf8d495c7116225fb4e9ee279846b74a0c45cfb0 /erts/emulator/hipe/hipe_bif0.c
parent49d2f809cf8435b17d54f0fd2f37a8aa939ea457 (diff)
downloadotp-b9caedf093d0ccf268562656e28cdda6a02631cb.tar.gz
otp-b9caedf093d0ccf268562656e28cdda6a02631cb.tar.bz2
otp-b9caedf093d0ccf268562656e28cdda6a02631cb.zip
erts: Refactor header of loaded beam code
to use a real C struct instead of array.
Diffstat (limited to 'erts/emulator/hipe/hipe_bif0.c')
-rw-r--r--erts/emulator/hipe/hipe_bif0.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/erts/emulator/hipe/hipe_bif0.c b/erts/emulator/hipe/hipe_bif0.c
index 7193c3d301..c6ea8a5132 100644
--- a/erts/emulator/hipe/hipe_bif0.c
+++ b/erts/emulator/hipe/hipe_bif0.c
@@ -574,15 +574,15 @@ static void print_mfa(Eterm mod, Eterm fun, unsigned int ari)
static Uint *hipe_find_emu_address(Eterm mod, Eterm name, unsigned int arity)
{
Module *modp;
- Uint *code_base;
+ BeamCodeHeader* code_hdr;
int i, n;
modp = erts_get_module(mod, erts_active_code_ix());
- if (modp == NULL || (code_base = modp->curr.code) == NULL)
+ if (modp == NULL || (code_hdr = modp->curr.code_hdr) == NULL)
return NULL;
- n = code_base[MI_NUM_FUNCTIONS];
+ n = code_hdr->num_functions;
for (i = 0; i < n; ++i) {
- Uint *code_ptr = (Uint*)code_base[MI_FUNCTIONS+i];
+ Uint *code_ptr = (Uint*)code_hdr->functions[i];
ASSERT(code_ptr[0] == BeamOpCode(op_i_func_info_IaaI));
if (code_ptr[3] == name && code_ptr[4] == arity)
return code_ptr+5;