aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2012-01-27 11:21:43 +0100
committerBjörn Gustavsson <[email protected]>2012-01-27 11:21:43 +0100
commitccd194683f8be69c43839840ffa8687773215c59 (patch)
tree995d101c2e8779b7f4d480027f4a027ed0f574c7 /lib/kernel/src
parent0ea66a32ea84121bd0b7a8e7aed743b2c4593ec6 (diff)
parent64ccd8c9b7a782ca777ca4649dbb1f4a1ef00bce (diff)
downloadotp-ccd194683f8be69c43839840ffa8687773215c59.tar.gz
otp-ccd194683f8be69c43839840ffa8687773215c59.tar.bz2
otp-ccd194683f8be69c43839840ffa8687773215c59.zip
Merge branch 'bjorn/erts/bif-stubs/OTP-9861'
* bjorn/erts/bif-stubs/OTP-9861: beam_load.c: Allow stubs for BIFs beam_load.c: Don't show unnecessary context in errors beam_load.c: Remove useless call to next_heap_size() beam_load.c: apply/2 does not need a special case
Diffstat (limited to 'lib/kernel/src')
-rw-r--r--lib/kernel/src/hipe_unified_loader.erl15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/kernel/src/hipe_unified_loader.erl b/lib/kernel/src/hipe_unified_loader.erl
index 8b3aa0286d..1b56cd8d90 100644
--- a/lib/kernel/src/hipe_unified_loader.erl
+++ b/lib/kernel/src/hipe_unified_loader.erl
@@ -330,11 +330,16 @@ exports(ExportMap, BaseAddress) ->
exports(ExportMap, BaseAddress, [], []).
exports([Offset,M,F,A,IsClosure,IsExported|Rest], BaseAddress, MFAs, Addresses) ->
- MFA = {M,F,A},
- Address = BaseAddress + Offset,
- FunDef = #fundef{address=Address, mfa=MFA, is_closure=IsClosure,
- is_exported=IsExported},
- exports(Rest, BaseAddress, [MFA|MFAs], [FunDef|Addresses]);
+ case IsExported andalso erlang:is_builtin(M, F, A) of
+ true ->
+ exports(Rest, BaseAddress, MFAs, Addresses);
+ _false ->
+ MFA = {M,F,A},
+ Address = BaseAddress + Offset,
+ FunDef = #fundef{address=Address, mfa=MFA, is_closure=IsClosure,
+ is_exported=IsExported},
+ exports(Rest, BaseAddress, [MFA|MFAs], [FunDef|Addresses])
+ end;
exports([], _, MFAs, Addresses) ->
{MFAs, Addresses}.