diff options
Diffstat (limited to 'src/lj_asm.c')
-rw-r--r-- | src/lj_asm.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c index c795b99e..bb134ac2 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c | |||
@@ -1357,9 +1357,15 @@ static void asm_head_side(ASMState *as) | |||
1357 | /* Inherit top stack slot already checked by parent trace. */ | 1357 | /* Inherit top stack slot already checked by parent trace. */ |
1358 | as->T->topslot = as->parent->topslot; | 1358 | as->T->topslot = as->parent->topslot; |
1359 | if (as->topslot > as->T->topslot) { /* Need to check for higher slot? */ | 1359 | if (as->topslot > as->T->topslot) { /* Need to check for higher slot? */ |
1360 | as->T->topslot = (uint8_t)as->topslot; /* Remember for child traces. */ | 1360 | #ifdef EXITSTATE_CHECKEXIT |
1361 | /* Highest exit + 1 indicates stack check. */ | ||
1362 | ExitNo exitno = as->T->nsnap; | ||
1363 | #else | ||
1361 | /* Reuse the parent exit in the context of the parent trace. */ | 1364 | /* Reuse the parent exit in the context of the parent trace. */ |
1362 | asm_stack_check(as, as->topslot, irp, allow & RSET_GPR, as->J->exitno); | 1365 | ExitNo exitno = as->J->exitno; |
1366 | #endif | ||
1367 | as->T->topslot = (uint8_t)as->topslot; /* Remember for child traces. */ | ||
1368 | asm_stack_check(as, as->topslot, irp, allow & RSET_GPR, exitno); | ||
1363 | } | 1369 | } |
1364 | } | 1370 | } |
1365 | 1371 | ||