diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2005-05-02 13:51:42 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2005-05-02 13:51:42 +0000 |
commit | 745cf2ffbef88177c764dae7c27dbc293c1abb81 (patch) | |
tree | e66a7cc903315e564f71262dac07a4c5be49782a /pp_ctl.c | |
parent | 0d2925a66a645be5c94e85ffc665c445ed1ca94c (diff) | |
download | perl-745cf2ffbef88177c764dae7c27dbc293c1abb81.tar.gz |
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
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 20 |
1 files changed, 2 insertions, 18 deletions
@@ -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 * |