aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/hipe_unified_loader.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2012-01-30 14:33:54 +0100
committerMicael Karlberg <[email protected]>2012-01-30 14:33:54 +0100
commita63e3a9bde3e9cac5acee7ca9508da58b2f35591 (patch)
tree3ea3dc3e62f1d7975059d5a240895ef85160afc4 /lib/kernel/src/hipe_unified_loader.erl
parenta0e8f2621a39ca8e032b8ec30164207de1d7c26e (diff)
parent18b640a02e5493eb9fe23ae6dc0c38c754f61d0e (diff)
downloadotp-a63e3a9bde3e9cac5acee7ca9508da58b2f35591.tar.gz
otp-a63e3a9bde3e9cac5acee7ca9508da58b2f35591.tar.bz2
otp-a63e3a9bde3e9cac5acee7ca9508da58b2f35591.zip
Merge branch 'master' of super:otp
Diffstat (limited to 'lib/kernel/src/hipe_unified_loader.erl')
-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}.