aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_bif_info.c
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2016-10-05 12:16:35 +0200
committerLukas Larsson <[email protected]>2016-10-12 15:39:38 +0200
commit8e2490086b45b9ce4d51883e594c38e2e17b5b47 (patch)
tree091b4fcad015cd0eaa8f7c03b03bfcd66f745493 /erts/emulator/beam/erl_bif_info.c
parent855b3a9be724ffd3c9f7e311cf9d810099fa36ef (diff)
downloadotp-8e2490086b45b9ce4d51883e594c38e2e17b5b47.tar.gz
otp-8e2490086b45b9ce4d51883e594c38e2e17b5b47.tar.bz2
otp-8e2490086b45b9ce4d51883e594c38e2e17b5b47.zip
erts: Refactor find_function_from_pc to return MFA
Diffstat (limited to 'erts/emulator/beam/erl_bif_info.c')
-rw-r--r--erts/emulator/beam/erl_bif_info.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c
index a985ce4918..dfc4beb719 100644
--- a/erts/emulator/beam/erl_bif_info.c
+++ b/erts/emulator/beam/erl_bif_info.c
@@ -1614,12 +1614,10 @@ current_function(Process* BIF_P, Process* rp, Eterm** hpp, int full_info)
if (rp->current == NULL) {
erts_lookup_function_info(&fi, rp->i, full_info);
- rp->current = &fi.ci->mfa;
- ASSERT_MFA(rp->current);
+ rp->current = fi.mfa;
} else if (full_info) {
- ASSERT_MFA(rp->current);
erts_lookup_function_info(&fi, rp->i, full_info);
- if (fi.ci == NULL) {
+ if (fi.mfa == NULL) {
/* Use the current function without location info */
erts_set_current_function(&fi, rp->current);
}
@@ -1635,9 +1633,9 @@ current_function(Process* BIF_P, Process* rp, Eterm** hpp, int full_info)
* instead if it can be looked up.
*/
erts_lookup_function_info(&fi2, rp->cp, full_info);
- if (fi2.ci) {
+ if (fi2.mfa) {
fi = fi2;
- rp->current = &fi2.ci->mfa;
+ rp->current = fi2.mfa;
}
}
@@ -1695,7 +1693,7 @@ current_stacktrace(Process* p, Process* rp, Eterm** hpp)
heap_size = 3;
for (i = 0; i < depth; i++) {
erts_lookup_function_info(stkp, s->trace[i], 1);
- if (stkp->ci) {
+ if (stkp->mfa) {
heap_size += stkp->needed + 2;
stkp++;
}