Skip to content

Commit

Permalink
iterate actual flags of callsite for flattening callstack rec
Browse files Browse the repository at this point in the history
  • Loading branch information
timo committed Jun 30, 2020
1 parent 6885813 commit 605a3e4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/core/callstack.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,16 @@ static void mark(MVMThreadContext *tc, MVMCallStackRecord *from_record, MVMGCWor
}
case MVM_CALLSTACK_RECORD_FLATTENING: {
MVMCallStackFlattening *f_record = (MVMCallStackFlattening *)record;
MVM_callsite_mark(tc, &f_record->produced_cs, worklist);
MVMuint16 flagi;
MVMCallsite *cs = &f_record->produced_cs;
MVM_callsite_mark(tc, cs, worklist);
for (flagi = 0; flagi < f_record->produced_cs.arg_count; flagi++) {
MVMuint8 flagtype = cs->arg_flags[flagi] & MVM_CALLSITE_ARG_TYPE_MASK;
if (flagtype == MVM_CALLSITE_ARG_OBJ || flagtype == MVM_CALLSITE_ARG_STR) {
add_collectable(tc, worklist, snapshot, f_record->arg_info.source[f_record->arg_info.map[flagi]].o,
"Flattened callstack entry register value");
}
}
break;
}
default:
Expand Down

0 comments on commit 605a3e4

Please sign in to comment.