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

@@ -118,9 +118,8 @@ static void recff_stitch(jit_State *J)
/* Ditto for the IR. */
memmove(&J->base[1], &J->base[-1], sizeof(TRef)*(J->maxslot+1));
J->base[0] = lj_ir_kptr(J, contptr(cont)) | TREF_CONT;
J->ktracep = lj_ir_k64_reserve(J);
lua_assert(irt_toitype_(IRT_P64) == LJ_TTRACE);
J->base[-1] = emitir(IRT(IR_XLOAD, IRT_P64), lj_ir_kptr(J, &J->ktracep->gcr), 0);
J->base[-1] = lj_ir_ktrace(J);
J->ktrace = tref_ref(J->base[-1]);
J->base += 2;
J->baseslot += 2;
J->framedepth++;