Many years ago, POPSUB was split into two parts, with a final cleanup
being done by the LEAVESUB() macro. This is no longer needed;
shuffle LEAVESUB up a bit in various places so that it always immediately
follows POPSUB. Then the next commit will eliminate it altogether.
STMT_START { \
cx = &cxstack[cxstack_ix]; \
CvDEPTH(multicall_cv) = cx->blk_sub.olddepth; \
- LEAVESUB(multicall_cv); \
POPBLOCK(cx,PL_curpm); \
/* these two set for backcompat by callers */ \
newsp = PL_stack_base + cx->blk_oldsp; \
CX_LEAVE_SCOPE(cx); \
PL_comppad = cx->blk_sub.prevcomppad; \
PL_curpad = LIKELY(PL_comppad) ? AvARRAY(PL_comppad) : NULL; \
+ LEAVESUB(multicall_cv); \
POPSTACK; \
CATCH_SET(multicall_oldcatch); \
SPAGAIN; \
}
croak:
POPSUB(cx,sv);
+ LEAVESUB(sv);
cxstack_ix--;
PL_curpm = cx->blk_oldpm;
- LEAVESUB(sv);
Perl_croak(aTHX_
"Can't return %s from lvalue subroutine", what
);
POPBLOCK(cx,newpm);
cxstack_ix++; /* preserve cx entry on stack for use by POPSUB */
POPSUB(cx,sv); /* Stack values are safe: release CV and @_ ... */
+ LEAVESUB(sv);
cxstack_ix--;
PL_curpm = newpm; /* ... and pop $1 et al */
- LEAVESUB(sv);
return cx->blk_sub.retop;
}
POPBLOCK(cx,newpm);
cxstack_ix++; /* temporarily protect top context */
POPSUB(cx,sv); /* Stack values are safe: release CV and @_ ... */
+ LEAVESUB(sv);
cxstack_ix--;
PL_curpm = newpm; /* ... and pop $1 et al */
- LEAVESUB(sv);
return cx->blk_sub.retop;
}