summaryrefslogtreecommitdiff
path: root/src/lj_record.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_record.c')
-rw-r--r--src/lj_record.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/lj_record.c b/src/lj_record.c
index dc3f3df0..1669fde1 100644
--- a/src/lj_record.c
+++ b/src/lj_record.c
@@ -1365,6 +1365,26 @@ void lj_record_ins(jit_State *J)
1365 BCOp op; 1365 BCOp op;
1366 TRef ra, rb, rc; 1366 TRef ra, rb, rc;
1367 1367
1368 /* Perform post-processing action before recording the next instruction. */
1369 if (LJ_UNLIKELY(J->postproc != LJ_POST_NONE)) {
1370 switch (J->postproc) {
1371 case LJ_POST_FIXGUARD: /* Fixup and emit pending guard. */
1372 if (!tvistruecond(&J2G(J)->tmptv2)) {
1373 BCReg s;
1374 J->fold.ins.o ^= 1; /* Flip guard to opposite. */
1375 for (s = 0; s < J->maxslot; s++) /* Fixup stack slot (if any). */
1376 if (J->base[s] == TREF_TRUE && tvisfalse(&J->L->base[s])) {
1377 J->base[s] = TREF_FALSE;
1378 break;
1379 }
1380 }
1381 lj_opt_fold(J); /* Emit pending guard. */
1382 break;
1383 default: lua_assert(0); break;
1384 }
1385 J->postproc = LJ_POST_NONE;
1386 }
1387
1368 /* Need snapshot before recording next bytecode (e.g. after a store). */ 1388 /* Need snapshot before recording next bytecode (e.g. after a store). */
1369 if (J->needsnap) { 1389 if (J->needsnap) {
1370 J->needsnap = 0; 1390 J->needsnap = 0;