Report parent of stitched trace.

Thanks to Nick Zavaritsky.
This commit is contained in:
Mike Pall
2016-11-13 20:03:01 +01:00
parent 716f2daef8
commit 7a58a8fb3d
3 changed files with 8 additions and 2 deletions

View File

@@ -446,6 +446,12 @@ static void trace_start(jit_State *J)
if (J->parent) {
setintV(L->top++, J->parent);
setintV(L->top++, J->exitno);
} else {
BCOp op = bc_op(*J->pc);
if (op == BC_CALLM || op == BC_CALL || op == BC_ITERC) {
setintV(L->top++, J->exitno); /* Parent of stitched trace. */
setintV(L->top++, -1);
}
}
);
lj_record_setup(J);