aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lj_snap.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lj_snap.c b/src/lj_snap.c
index b6a02f6f..b2b8450c 100644
--- a/src/lj_snap.c
+++ b/src/lj_snap.c
@@ -252,7 +252,12 @@ static BCReg snap_usedef(jit_State *J, uint8_t *udf,
252 BCReg minslot = bc_a(ins); 252 BCReg minslot = bc_a(ins);
253 if (op >= BC_FORI && op <= BC_JFORL) minslot += FORL_EXT; 253 if (op >= BC_FORI && op <= BC_JFORL) minslot += FORL_EXT;
254 else if (op >= BC_ITERL && op <= BC_JITERL) minslot += bc_b(pc[-2])-1; 254 else if (op >= BC_ITERL && op <= BC_JITERL) minslot += bc_b(pc[-2])-1;
255 else if (op == BC_UCLO) { pc += bc_j(ins); break; } 255 else if (op == BC_UCLO) {
256 ptrdiff_t delta = bc_j(ins);
257 if (delta < 0) return maxslot; /* Prevent loop. */
258 pc += delta;
259 break;
260 }
256 for (s = minslot; s < maxslot; s++) DEF_SLOT(s); 261 for (s = minslot; s < maxslot; s++) DEF_SLOT(s);
257 return minslot < maxslot ? minslot : maxslot; 262 return minslot < maxslot ? minslot : maxslot;
258 } 263 }