X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pp_ctl.c;h=2308d358145e3b59c6f04d92446265b590210808;hb=300aed98347df4b3587b6ffdf7817ba6640f2e5e;hp=8c16af93183a48ad1d293ce3d51820a60593ff85;hpb=8bda1795263a5b700b86a63303514e5d538dd644;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pp_ctl.c b/pp_ctl.c index 8c16af9..2308d35 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -883,15 +883,18 @@ PP(pp_sort) CATCH_SET(TRUE); PUSHSTACKi(PERLSI_SORT); - if (PL_sortstash != stash) { - PL_firstgv = gv_fetchpv("a", TRUE, SVt_PV); - PL_secondgv = gv_fetchpv("b", TRUE, SVt_PV); - PL_sortstash = stash; + if (!hasargs && !is_xsub) { + if (PL_sortstash != stash || !PL_firstgv || !PL_secondgv) { + SAVESPTR(PL_firstgv); + SAVESPTR(PL_secondgv); + PL_firstgv = gv_fetchpv("a", TRUE, SVt_PV); + PL_secondgv = gv_fetchpv("b", TRUE, SVt_PV); + PL_sortstash = stash; + } + SAVESPTR(GvSV(PL_firstgv)); + SAVESPTR(GvSV(PL_secondgv)); } - SAVESPTR(GvSV(PL_firstgv)); - SAVESPTR(GvSV(PL_secondgv)); - PUSHBLOCK(cx, CXt_NULL, PL_stack_base); if (!(PL_op->op_flags & OPf_SPECIAL)) { cx->cx_type = CXt_SUB; @@ -2561,26 +2564,14 @@ S_docatch_body(pTHX) return NULL; } -/* In Unicos 10.0.0.6 (T90) the cc seems to botch optimization so that - * if cursi is an auto variable inside S_docatch() cursi doesn't get - * properly saved/restored across longjmps. &/ -#ifdef UNICOS_BROKEN_VOLATILE -volatile PERL_SI *cursi; -#endif - STATIC OP * S_docatch(pTHX_ OP *o) { dTHR; int ret; OP *oldop = PL_op; -#ifdef UNICOS_BROKEN_VOLATILE - dJMPENV; - cursi = PL_curstackinfo; -#else volatile PERL_SI *cursi = PL_curstackinfo; dJMPENV; -#endif #ifdef DEBUGGING assert(CATCH_GET == TRUE); @@ -2774,6 +2765,7 @@ S_doeval(pTHX_ int gimme, OP** startop) SAVESPTR(PL_beginav); PL_beginav = newAV(); SAVEFREESV(PL_beginav); + SAVEI32(PL_error_count); /* try to compile it */