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.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lj_record.c b/src/lj_record.c
index d8c67499..26e87ab3 100644
--- a/src/lj_record.c
+++ b/src/lj_record.c
@@ -1388,16 +1388,19 @@ void lj_record_ins(jit_State *J)
1388 rec_comp_fixup(J, pc, (!tvistruecond(&J2G(J)->tmptv2) ^ (bc_op(*pc)&1))); 1388 rec_comp_fixup(J, pc, (!tvistruecond(&J2G(J)->tmptv2) ^ (bc_op(*pc)&1)));
1389 /* fallthrough */ 1389 /* fallthrough */
1390 case LJ_POST_FIXGUARD: /* Fixup and emit pending guard. */ 1390 case LJ_POST_FIXGUARD: /* Fixup and emit pending guard. */
1391 if (!tvistruecond(&J2G(J)->tmptv2))
1392 J->fold.ins.o ^= 1; /* Flip guard to opposite. */
1393 lj_opt_fold(J); /* Emit pending guard. */
1394 /* fallthrough */
1395 case LJ_POST_FIXBOOL:
1391 if (!tvistruecond(&J2G(J)->tmptv2)) { 1396 if (!tvistruecond(&J2G(J)->tmptv2)) {
1392 BCReg s; 1397 BCReg s;
1393 J->fold.ins.o ^= 1; /* Flip guard to opposite. */
1394 for (s = 0; s < J->maxslot; s++) /* Fixup stack slot (if any). */ 1398 for (s = 0; s < J->maxslot; s++) /* Fixup stack slot (if any). */
1395 if (J->base[s] == TREF_TRUE && tvisfalse(&J->L->base[s])) { 1399 if (J->base[s] == TREF_TRUE && tvisfalse(&J->L->base[s])) {
1396 J->base[s] = TREF_FALSE; 1400 J->base[s] = TREF_FALSE;
1397 break; 1401 break;
1398 } 1402 }
1399 } 1403 }
1400 lj_opt_fold(J); /* Emit pending guard. */
1401 break; 1404 break;
1402 default: lua_assert(0); break; 1405 default: lua_assert(0); break;
1403 } 1406 }