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

@@ -348,6 +348,18 @@ found:
return TREF(ref, t);
}
/* Allocate GCtrace constant placeholder (no interning). */
TRef lj_ir_ktrace(jit_State *J)
{
IRRef ref = ir_nextk(J);
IRIns *ir = IR(ref);
lua_assert(irt_toitype_(IRT_P64) == LJ_TTRACE);
ir->t.irt = IRT_P64;
ir->o = IR_KNULL; /* Not IR_KGC yet, but same size. */
ir->prev = 0;
return TREF(ref, IRT_P64);
}
/* Intern 32 bit pointer constant. */
TRef lj_ir_kptr_(jit_State *J, IROp op, void *ptr)
{