From: Dave Mitchell Date: Sat, 21 May 2005 21:38:55 +0000 (+0000) Subject: stop goto &foo wasting stack space X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2d43a17f6a49532750d0e6ce2814b523e2f19999;p=p5sagit%2Fp5-mst-13.2.git stop goto &foo wasting stack space it used to push @_ onto the end of the stack; now it pops the stack back to the old watermark first. p4raw-id: //depot/perl@24534 --- diff --git a/pp_ctl.c b/pp_ctl.c index 4dc0046..bb8aab7 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -2297,11 +2297,13 @@ PP(pp_goto) if (cxix < cxstack_ix) dounwind(cxix); TOPBLOCK(cx); - if (CxTYPE(cx) == CXt_EVAL) + SPAGAIN; + if (CxTYPE(cx) == CXt_EVAL) { if (CxREALEVAL(cx)) DIE(aTHX_ "Can't goto subroutine from an eval-string"); else DIE(aTHX_ "Can't goto subroutine from an eval-block"); + } if (CxTYPE(cx) == CXt_SUB && cx->blk_sub.hasargs) { /* put @_ back onto stack */ AV* av = cx->blk_sub.argarray;