aboutsummaryrefslogtreecommitdiff
path: root/src/lj_record.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_record.c')
-rw-r--r--src/lj_record.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lj_record.c b/src/lj_record.c
index 1919ab03..6c64c645 100644
--- a/src/lj_record.c
+++ b/src/lj_record.c
@@ -526,6 +526,12 @@ static LoopEvent rec_for(jit_State *J, const BCIns *fori, int isforl)
526 LoopEvent ev; 526 LoopEvent ev;
527 TRef stop; 527 TRef stop;
528 IRType t; 528 IRType t;
529 /* Avoid semantic mismatches and always failing guards. */
530 if (tvisnan(&tv[FORL_IDX]) ||
531 tvisnan(&tv[FORL_STOP]) ||
532 tvisnan(&tv[FORL_STEP]) ||
533 tvismzero(&tv[FORL_STEP]))
534 lj_trace_err(J, LJ_TRERR_GFAIL);
529 if (isforl) { /* Handle FORL/JFORL opcodes. */ 535 if (isforl) { /* Handle FORL/JFORL opcodes. */
530 TRef idx = tr[FORL_IDX]; 536 TRef idx = tr[FORL_IDX];
531 if (mref(J->scev.pc, const BCIns) == fori && tref_ref(idx) == J->scev.idx) { 537 if (mref(J->scev.pc, const BCIns) == fori && tref_ref(idx) == J->scev.idx) {