i.e. replace
TOPBLOCK(cx);
with
cx = CX_CUR();
TOPBLOCK(cx);
This is part of general trend of separating out the cx/cxstack_ix
setting/manipulation from the save/restore actions
/* Continue a block elsewhere (NEXT and REDO). */
#define TOPBLOCK(cx) \
- cx = CX_CUR(); \
CX_DEBUG(cx, "TOP"); \
PL_stack_sp = PL_stack_base + cx->blk_oldsp, \
PL_markstack_ptr = PL_markstack + cx->blk_oldmarksp, \
S_unwind_loop(aTHX_ "next");
+ cx = CX_CUR();
TOPBLOCK(cx);
PL_curcop = cx->blk_oldcop;
PERL_ASYNC_CHECK();
redo_op = redo_op->op_next;
}
+ cx = CX_CUR();
TOPBLOCK(cx);
CX_LEAVE_SCOPE(cx);
FREETMPS;
if (cxix < cxstack_ix) {
dounwind(cxix);
}
+ cx = CX_CUR();
TOPBLOCK(cx);
SPAGAIN;
if (ix < 0)
DIE(aTHX_ "panic: docatch: illegal ix=%ld", (long)ix);
dounwind(ix);
+ cx = CX_CUR();
TOPBLOCK(cx);
}
if (CxFOREACH(cx)) {
/* emulate pp_next. Note that any stack(s) cleanup will be
* done by the pp_unstack which op_nextop should point to */
+ cx = CX_CUR();
TOPBLOCK(cx);
PL_curcop = cx->blk_oldcop;
return cx->blk_loop.my_op->op_nextop;
dounwind(cxix);
/* Restore the sp at the time we entered the given block */
+ cx = CX_CUR();
TOPBLOCK(cx);
return cx->blk_givwhen.leave_op;