From: Dave Mitchell Date: Mon, 2 May 2005 13:51:42 +0000 (+0000) Subject: Revert change #15705 (Core dump in 'leavetry') X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=745cf2ffbef88177c764dae7c27dbc293c1abb81;p=p5sagit%2Fp5-mst-13.2.git Revert change #15705 (Core dump in 'leavetry') This fixes bug #34682, reintroduces bug #8738 (ID 20020301.011), and reintroduces an eval optimisation for innter runops levels p4raw-link: @15705 on //depot/perl: 8bffa5f8f4dd0cd203052722c9fcfd899f51d033 p4raw-id: //depot/perl@24362 --- diff --git a/pp_ctl.c b/pp_ctl.c index 783a59a..ea83d18 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -2681,7 +2681,6 @@ S_docatch(pTHX_ OP *o) { int ret; OP * const oldop = PL_op; - OP *retop; volatile PERL_SI *cursi = PL_curstackinfo; dJMPENV; @@ -2690,16 +2689,6 @@ S_docatch(pTHX_ OP *o) #endif PL_op = o; - /* Normally, the leavetry at the end of this block of ops will - * pop an op off the return stack and continue there. By setting - * the op to Nullop, we force an exit from the inner runops() - * loop. DAPM. - */ - assert(cxstack_ix >= 0); - assert(CxTYPE(&cxstack[cxstack_ix]) == CXt_EVAL); - retop = cxstack[cxstack_ix].blk_eval.retop; - cxstack[cxstack_ix].blk_eval.retop = Nullop; - JMPENV_PUSH(ret); switch (ret) { case 0: @@ -2713,9 +2702,6 @@ S_docatch(pTHX_ OP *o) PL_restartop = 0; goto redo_body; } - /* a die in this eval - continue in outer loop */ - if (!PL_restartop) - break; /* FALL THROUGH */ default: JMPENV_POP; @@ -2725,7 +2711,7 @@ S_docatch(pTHX_ OP *o) } JMPENV_POP; PL_op = oldop; - return retop; + return Nullop; } OP * @@ -3555,14 +3541,12 @@ PP(pp_leavetry) register SV **mark; SV **newsp; PMOP *newpm; - OP* retop; I32 gimme; register PERL_CONTEXT *cx; I32 optype; POPBLOCK(cx,newpm); POPEVAL(cx); - retop = cx->blk_eval.retop; TAINT_NOT; if (gimme == G_VOID) @@ -3594,7 +3578,7 @@ PP(pp_leavetry) LEAVE; sv_setpv(ERRSV,""); - RETURNOP(retop); + RETURN; } STATIC OP *