diff options
author | Sverker Eriksson <[email protected]> | 2016-09-20 16:16:50 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-10-14 14:29:16 +0200 |
commit | 966098ceb9dd9d18e9bcd37cd06b96045903e320 (patch) | |
tree | d1b5690ffb2005d0f2201058011c54f45902b5ac /lib/kernel/src/hipe_unified_loader.erl | |
parent | e36c8d49359db1622ad381f705c54d460c4fb5e9 (diff) | |
download | otp-966098ceb9dd9d18e9bcd37cd06b96045903e320.tar.gz otp-966098ceb9dd9d18e9bcd37cd06b96045903e320.tar.bz2 otp-966098ceb9dd9d18e9bcd37cd06b96045903e320.zip |
erts: Move new hipe ref and sdesc lists to loader state
Diffstat (limited to 'lib/kernel/src/hipe_unified_loader.erl')
-rw-r--r-- | lib/kernel/src/hipe_unified_loader.erl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/kernel/src/hipe_unified_loader.erl b/lib/kernel/src/hipe_unified_loader.erl index 6245646263..cde2eb059a 100644 --- a/lib/kernel/src/hipe_unified_loader.erl +++ b/lib/kernel/src/hipe_unified_loader.erl @@ -189,6 +189,7 @@ load_common(Mod, Bin, Beam, Architecture) -> WordSize = word_size(Architecture), WriteWord = write_word_fun(WordSize), LoaderState = hipe_bifs:alloc_loader_state(Mod), + put(hipe_loader_state, LoaderState), %% Create data segment {ConstAddr,ConstMap2} = create_data_segment(ConstAlign, ConstSize, ConstMap, WriteWord, @@ -238,6 +239,7 @@ load_common(Mod, Bin, Beam, Architecture) -> end, %% Final clean up. + _ = erase(hipe_loader_state), _ = erase(hipe_patch_closures), _ = erase(hipe_assert_code_area), ?debug_msg("****************Loader Finished****************\n", []), @@ -554,7 +556,8 @@ patch_sdesc(?STACK_DESC(SymExnRA, FSize, Arity, Live), end, ?ASSERT(assert_local_patch(Address)), MFA = address_to_mfa_lth(Address, FunDefs), - hipe_bifs:enter_sdesc({Address, ExnRA, FSize, Arity, Live, MFA, get(hipe_patch_closures)}). + hipe_bifs:enter_sdesc({Address, ExnRA, FSize, Arity, Live, MFA, get(hipe_patch_closures)}, + get(hipe_loader_state)). %%---------------------------------------------------------------- @@ -774,7 +777,9 @@ add_ref(CalleeMFA, Address, FunDefs, RefType, Trampoline, RemoteOrLocal) -> {M,_,_} = CalleeMFA, {M,_,_} = CallerMFA; remote -> - hipe_bifs:add_ref(CalleeMFA, {CallerMFA,Address,RefType,Trampoline,get(hipe_patch_closures)}) + hipe_bifs:add_ref(CalleeMFA, {CallerMFA,Address,RefType,Trampoline, + get(hipe_patch_closures), + get(hipe_loader_state)}) end, ok. |