summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index a2b313937d..746cb80d5e 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1654,7 +1654,6 @@ PP(pp_leaveloop)
{
djSP;
register PERL_CONTEXT *cx;
- struct block_loop cxloop;
I32 gimme;
SV **newsp;
PMOP *newpm;
@@ -1662,7 +1661,7 @@ PP(pp_leaveloop)
POPBLOCK(cx,newpm);
mark = newsp;
- POPLOOP1(cx); /* Delay POPLOOP2 until stack values are safe */
+ newsp = PL_stack_base + cx->blk_loop.resetsp;
TAINT_NOT;
if (gimme == G_VOID)
@@ -1682,7 +1681,7 @@ PP(pp_leaveloop)
SP = newsp;
PUTBACK;
- POPLOOP2(); /* Stack values are safe: release loop vars ... */
+ POPLOOP(cx); /* Stack values are safe: release loop vars ... */
PL_curpm = newpm; /* ... and pop $1 et al */
LEAVE;
@@ -1696,7 +1695,6 @@ PP(pp_return)
djSP; dMARK;
I32 cxix;
register PERL_CONTEXT *cx;
- struct block_sub cxsub;
bool popsub2 = FALSE;
I32 gimme;
SV **newsp;
@@ -1722,7 +1720,6 @@ PP(pp_return)
POPBLOCK(cx,newpm);
switch (CxTYPE(cx)) {
case CXt_SUB:
- POPSUB1(cx); /* Delay POPSUB2 until stack values are safe */
popsub2 = TRUE;
break;
case CXt_EVAL:
@@ -1747,7 +1744,7 @@ PP(pp_return)
if (gimme == G_SCALAR) {
if (MARK < SP) {
if (popsub2) {
- if (cxsub.cv && CvDEPTH(cxsub.cv) > 1) {
+ if (cx->blk_sub.cv && CvDEPTH(cx->blk_sub.cv) > 1) {
if (SvTEMP(TOPs)) {
*++newsp = SvREFCNT_inc(*SP);
FREETMPS;
@@ -1774,7 +1771,7 @@ PP(pp_return)
/* Stack values are safe: */
if (popsub2) {
- POPSUB2(); /* release CV and @_ ... */
+ POPSUB(cx); /* release CV and @_ ... */
}
PL_curpm = newpm; /* ... and pop $1 et al */
@@ -1787,15 +1784,13 @@ PP(pp_last)
djSP;
I32 cxix;
register PERL_CONTEXT *cx;
- struct block_loop cxloop;
- struct block_sub cxsub;
I32 pop2 = 0;
I32 gimme;
I32 optype;
OP *nextop;
SV **newsp;
PMOP *newpm;
- SV **mark = PL_stack_base + cxstack[cxstack_ix].blk_oldsp;
+ SV **mark;
if (PL_op->op_flags & OPf_SPECIAL) {
cxix = dopoptoloop(cxstack_ix);
@@ -1811,14 +1806,14 @@ PP(pp_last)
dounwind(cxix);
POPBLOCK(cx,newpm);
+ mark = newsp;
switch (CxTYPE(cx)) {
case CXt_LOOP:
- POPLOOP1(cx); /* Delay POPLOOP2 until stack values are safe */
pop2 = CXt_LOOP;
- nextop = cxloop.last_op->op_next;
+ newsp = PL_stack_base + cx->blk_loop.resetsp;
+ nextop = cx->blk_loop.last_op->op_next;
break;
case CXt_SUB:
- POPSUB1(cx); /* Delay POPSUB2 until stack values are safe */
pop2 = CXt_SUB;
nextop = pop_return();
break;
@@ -1851,11 +1846,11 @@ PP(pp_last)
/* Stack values are safe: */
switch (pop2) {
case CXt_LOOP:
- POPLOOP2(); /* release loop vars ... */
+ POPLOOP(cx); /* release loop vars ... */
LEAVE;
break;
case CXt_SUB:
- POPSUB2(); /* release CV and @_ ... */
+ POPSUB(cx); /* release CV and @_ ... */
break;
}
PL_curpm = newpm; /* ... and pop $1 et al */