Don't copy SNAP_NORESTORE mark into loops and suppress restore in exit.

This commit is contained in:
Mike Pall 2010-04-08 01:28:51 +02:00
parent 23189fa40d
commit db756430ee
2 changed files with 2 additions and 2 deletions

View File

@ -140,7 +140,7 @@ LJ_STATIC_ASSERT(SNAP_CONT == TREF_CONT);
#define snap_slot(sn) ((BCReg)((sn) >> 24))
#define snap_isframe(sn) ((sn) & SNAP_FRAME)
#define snap_pc(sn) ((const BCIns *)(uintptr_t)(sn))
#define snap_setref(sn, ref) (((sn) & 0xffff0000) | (ref))
#define snap_setref(sn, ref) (((sn) & (0xffff0000&~SNAP_NORESTORE)) | (ref))
/* Snapshot and exit numbers. */
typedef uint32_t SnapNo;

View File

@ -267,7 +267,7 @@ const BCIns *lj_snap_restore(jit_State *J, void *exptr)
}
}
}
} else {
} else if (!(sn & SNAP_NORESTORE)) {
IRType1 t = ir->t;
RegSP rs = ir->prev;
lua_assert(!(sn & (SNAP_CONT|SNAP_FRAME)));