PerlIO_printf(Perl_debug_log, " setting stack tmpbase at %"IVdf"\n",
(IV)(PL_stack_sp - PL_stack_base));
));
- SAVEI32(cxstack[cxstack_ix].blk_oldsp);
+ SAVESTACK_CXPOS();
cxstack[cxstack_ix].blk_oldsp = PL_stack_sp - PL_stack_base;
/* Otherwise OP_NEXTSTATE will free whatever on stack now. */
SAVETMPS;
i = SSPOPINT;
PL_stack_sp = PL_stack_base + i;
break;
+ case SAVEt_STACK_CXPOS: /* blk_oldsp on context stack */
+ i = SSPOPINT;
+ cxstack[i].blk_oldsp = SSPOPINT;
+ break;
case SAVEt_AELEM: /* array element */
value = (SV*)SSPOPPTR;
i = SSPOPINT;
#define SAVEt_COP_ARYBASE 41
#define SAVEt_RE_STATE 42
#define SAVEt_COMPILE_WARNINGS 43
+#define SAVEt_STACK_CXPOS 44
#ifndef SCOPE_SAVES_SIGNAL_MASK
#define SCOPE_SAVES_SIGNAL_MASK 0
SSPUSHINT(SAVEt_COMPILE_WARNINGS); \
} STMT_END
+#define SAVESTACK_CXPOS() \
+ STMT_START { \
+ SSCHECK(3); \
+ SSPUSHINT(cxstack[cxstack_ix].blk_oldsp); \
+ SSPUSHINT(cxstack_ix); \
+ SSPUSHINT(SAVEt_STACK_CXPOS); \
+ } STMT_END
+
#ifdef USE_ITHREADS
# define SAVECOPSTASH(c) SAVEPPTR(CopSTASHPV(c))
# define SAVECOPSTASH_FREE(c) SAVESHAREDPV(CopSTASHPV(c))