aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_load.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-01-23 17:07:23 +0100
committerRickard Green <[email protected]>2017-02-06 19:54:48 +0100
commit5a97997217e5c3f901e8fefbd7bbf6c64652c9a8 (patch)
treebc7ebe05fcc7027997098d8c35c6c377dc731286 /erts/emulator/beam/beam_load.c
parent7c70239985c4591ef2770a59a1bf62b51f5108cc (diff)
downloadotp-5a97997217e5c3f901e8fefbd7bbf6c64652c9a8.tar.gz
otp-5a97997217e5c3f901e8fefbd7bbf6c64652c9a8.tar.bz2
otp-5a97997217e5c3f901e8fefbd7bbf6c64652c9a8.zip
Use magic refs for code loading state
Diffstat (limited to 'erts/emulator/beam/beam_load.c')
-rw-r--r--erts/emulator/beam/beam_load.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c
index 9f38dd4c3a..e75e7afd54 100644
--- a/erts/emulator/beam/beam_load.c
+++ b/erts/emulator/beam/beam_load.c
@@ -6322,8 +6322,8 @@ erts_make_stub_module(Process* p, Eterm hipe_magic_bin, Eterm Beam, Eterm Info)
stp = ERTS_MAGIC_BIN_DATA(magic);
hipe_code = erts_alloc(ERTS_ALC_T_HIPE, sizeof(*hipe_code));
- if (!ERTS_TERM_IS_MAGIC_BINARY(hipe_magic_bin) ||
- !(hipe_magic = ((ProcBin*)binary_val(hipe_magic_bin))->val,
+ if (!is_internal_magic_ref(hipe_magic_bin) ||
+ !(hipe_magic = erts_magic_ref2bin(hipe_magic_bin),
hipe_stp = hipe_get_loader_state(hipe_magic)) ||
hipe_stp->module == NIL || hipe_stp->text_segment == 0) {
goto error;
@@ -6568,8 +6568,8 @@ int erts_commit_hipe_patch_load(Eterm hipe_magic_bin)
HipeModule *hipe_code;
Module* modp;
- if (!ERTS_TERM_IS_MAGIC_BINARY(hipe_magic_bin) ||
- !(hipe_magic = ((ProcBin*)binary_val(hipe_magic_bin))->val,
+ if (!is_internal_magic_ref(hipe_magic_bin) ||
+ !(hipe_magic = erts_magic_ref2bin(hipe_magic_bin),
hipe_stp = hipe_get_loader_state(hipe_magic)) ||
hipe_stp->module == NIL || hipe_stp->text_segment == 0) {
return 0;