Simplify GCtrace * reference embedding for trace stitching.

This is now possible due to the immovable IR.
Contributed by Peter Cawley.
This commit is contained in:
Mike Pall
2016-05-22 23:40:37 +02:00
parent a657fa0186
commit 3152ed98ea
6 changed files with 22 additions and 8 deletions

View File

@@ -1933,6 +1933,11 @@ static void asm_tail_link(ASMState *as)
}
emit_addptr(as, RID_BASE, 8*(int32_t)baseslot);
if (as->J->ktrace) { /* Patch ktrace slot with the final GCtrace pointer. */
setgcref(IR(as->J->ktrace)->gcr, obj2gco(as->J->curfinal));
IR(as->J->ktrace)->o = IR_KGC;
}
/* Sync the interpreter state with the on-trace state. */
asm_stack_restore(as, snap);