aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2014-02-28 06:08:51 +0100
committerBjörn Gustavsson <[email protected]>2014-02-28 06:52:14 +0100
commit81c7db0e247a6ee1b7a5c2764aa9575d7f6fb88a (patch)
treec3f4b689e11f4d55bbad470b0cf4bc5798fb3ec0 /lib
parenta74e66a68f3b4ed590f928b4fd4f0808c6287a32 (diff)
downloadotp-81c7db0e247a6ee1b7a5c2764aa9575d7f6fb88a.tar.gz
otp-81c7db0e247a6ee1b7a5c2764aa9575d7f6fb88a.tar.bz2
otp-81c7db0e247a6ee1b7a5c2764aa9575d7f6fb88a.zip
hipe: Break apart hipe_bif:make_fe/3 into two BIFs
This commit is a preparation for eliminating a race condition loading the native code for modules whose BEAM code has already been loaded. Here we introduce two new BIFs so that looking up a fun entry is separate from setting the native address in the fun entry.
Diffstat (limited to 'lib')
-rw-r--r--lib/kernel/src/hipe_unified_loader.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/kernel/src/hipe_unified_loader.erl b/lib/kernel/src/hipe_unified_loader.erl
index e111cb800e..fd55b54d1f 100644
--- a/lib/kernel/src/hipe_unified_loader.erl
+++ b/lib/kernel/src/hipe_unified_loader.erl
@@ -566,8 +566,8 @@ patch_closure(DestMFA, Uniq, Index, Address, Addresses) ->
RemoteOrLocal = local, % closure code refs are local
DestAddress = get_native_address(DestMFA, Addresses, RemoteOrLocal),
BEAMAddress = hipe_bifs:fun_to_address(DestMFA),
- FE = hipe_bifs:make_fe(DestAddress, mod(DestMFA),
- {Uniq, Index, BEAMAddress}),
+ FE = hipe_bifs:get_fe(mod(DestMFA), {Uniq, Index, BEAMAddress}),
+ hipe_bifs:set_native_address_in_fe(FE, DestAddress),
?debug_msg("Patch FE(~w) to 0x~.16b->0x~.16b (emu:0x~.16b)\n",
[DestMFA, FE, DestAddress, BEAMAddress]),
?ASSERT(assert_local_patch(Address)),