diff options
author | Mike Pall <mike> | 2010-04-08 01:28:51 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2010-04-08 01:32:26 +0200 |
commit | db756430ee4da7bf46ba73d09a7a57905ba29377 (patch) | |
tree | c3506c0720c81452896e94ca2d39c8163cfb2809 /src | |
parent | 23189fa40d8cda4fa039a44b1211771b3d34fc7b (diff) | |
download | luajit-db756430ee4da7bf46ba73d09a7a57905ba29377.tar.gz luajit-db756430ee4da7bf46ba73d09a7a57905ba29377.tar.bz2 luajit-db756430ee4da7bf46ba73d09a7a57905ba29377.zip |
Don't copy SNAP_NORESTORE mark into loops and suppress restore in exit.
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_jit.h | 2 | ||||
-rw-r--r-- | src/lj_snap.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_jit.h b/src/lj_jit.h index 7850878d..adb6f2d5 100644 --- a/src/lj_jit.h +++ b/src/lj_jit.h | |||
@@ -140,7 +140,7 @@ LJ_STATIC_ASSERT(SNAP_CONT == TREF_CONT); | |||
140 | #define snap_slot(sn) ((BCReg)((sn) >> 24)) | 140 | #define snap_slot(sn) ((BCReg)((sn) >> 24)) |
141 | #define snap_isframe(sn) ((sn) & SNAP_FRAME) | 141 | #define snap_isframe(sn) ((sn) & SNAP_FRAME) |
142 | #define snap_pc(sn) ((const BCIns *)(uintptr_t)(sn)) | 142 | #define snap_pc(sn) ((const BCIns *)(uintptr_t)(sn)) |
143 | #define snap_setref(sn, ref) (((sn) & 0xffff0000) | (ref)) | 143 | #define snap_setref(sn, ref) (((sn) & (0xffff0000&~SNAP_NORESTORE)) | (ref)) |
144 | 144 | ||
145 | /* Snapshot and exit numbers. */ | 145 | /* Snapshot and exit numbers. */ |
146 | typedef uint32_t SnapNo; | 146 | typedef uint32_t SnapNo; |
diff --git a/src/lj_snap.c b/src/lj_snap.c index fe0389fe..743f05cf 100644 --- a/src/lj_snap.c +++ b/src/lj_snap.c | |||
@@ -267,7 +267,7 @@ const BCIns *lj_snap_restore(jit_State *J, void *exptr) | |||
267 | } | 267 | } |
268 | } | 268 | } |
269 | } | 269 | } |
270 | } else { | 270 | } else if (!(sn & SNAP_NORESTORE)) { |
271 | IRType1 t = ir->t; | 271 | IRType1 t = ir->t; |
272 | RegSP rs = ir->prev; | 272 | RegSP rs = ir->prev; |
273 | lua_assert(!(sn & (SNAP_CONT|SNAP_FRAME))); | 273 | lua_assert(!(sn & (SNAP_CONT|SNAP_FRAME))); |