Preserve snapshot #0 PC for all traces (potential gcstep exit).

This commit is contained in:
Mike Pall 2012-09-01 00:58:00 +02:00
parent d3699997fa
commit a6d636c508

View File

@ -147,8 +147,7 @@ void lj_snap_add(jit_State *J)
/* Merge if no ins. inbetween or if requested and no guard inbetween. */
if (J->mergesnap ? !irt_isguard(J->guardemit) :
(nsnap > 0 && J->cur.snap[nsnap-1].ref == J->cur.nins)) {
if (nsnap == 1 && J->parent == 0) {
/* But preserve snap #0 PC for root traces. */
if (nsnap == 1) { /* But preserve snap #0 PC. */
emitir_raw(IRT(IR_NOP, IRT_NIL), 0, 0);
goto nomerge;
}