diff options
Diffstat (limited to 'src/lj_record.c')
-rw-r--r-- | src/lj_record.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lj_record.c b/src/lj_record.c index 6517a1b7..cfdd3e1a 100644 --- a/src/lj_record.c +++ b/src/lj_record.c | |||
@@ -1364,11 +1364,8 @@ static void rec_comp_fixup(jit_State *J, const BCIns *pc, int cond) | |||
1364 | /* Set PC to opposite target to avoid re-recording the comp. in side trace. */ | 1364 | /* Set PC to opposite target to avoid re-recording the comp. in side trace. */ |
1365 | J->cur.snapmap[snap->mapofs + snap->nent] = SNAP_MKPC(npc); | 1365 | J->cur.snapmap[snap->mapofs + snap->nent] = SNAP_MKPC(npc); |
1366 | J->needsnap = 1; | 1366 | J->needsnap = 1; |
1367 | /* Shrink last snapshot if possible. */ | 1367 | if (bc_a(jmpins) < J->maxslot) J->maxslot = bc_a(jmpins); |
1368 | if (bc_a(jmpins) < J->maxslot) { | 1368 | lj_snap_shrink(J); /* Shrink last snapshot if possible. */ |
1369 | J->maxslot = bc_a(jmpins); | ||
1370 | lj_snap_shrink(J); | ||
1371 | } | ||
1372 | } | 1369 | } |
1373 | 1370 | ||
1374 | /* Record the next bytecode instruction (_before_ it's executed). */ | 1371 | /* Record the next bytecode instruction (_before_ it's executed). */ |
@@ -1411,6 +1408,7 @@ void lj_record_ins(jit_State *J) | |||
1411 | /* Need snapshot before recording next bytecode (e.g. after a store). */ | 1408 | /* Need snapshot before recording next bytecode (e.g. after a store). */ |
1412 | if (J->needsnap) { | 1409 | if (J->needsnap) { |
1413 | J->needsnap = 0; | 1410 | J->needsnap = 0; |
1411 | lj_snap_purge(J); | ||
1414 | lj_snap_add(J); | 1412 | lj_snap_add(J); |
1415 | J->mergesnap = 1; | 1413 | J->mergesnap = 1; |
1416 | } | 1414 | } |