X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pp_hot.c;h=5cd758f6abfc53b70845d43c4fc9d65d4affa02d;hb=67a86ef3f5ab1f509f5775da82cbf43e437569ac;hp=034495d87211e6cb04b963503bdee5fdc2c83227;hpb=b7c442934df5578585948a9249cd388c152963f7;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pp_hot.c b/pp_hot.c index 034495d..5cd758f 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -180,11 +180,6 @@ PP(pp_sassign) SvREFCNT_dec(cv); LEAVE; } - - if (strEQ(GvNAME(right),"isa")) { - GvCVGEN(right) = 0; - ++PL_sub_generation; /* I don't get this at all --blblack */ - } } SvSetMagicSV(right, left); SETs(right); @@ -1156,6 +1151,15 @@ PP(pp_aassign) while (relem <= SP) *relem++ = (lelem <= lastlelem) ? *lelem++ : &PL_sv_undef; } + + /* This is done at the bottom and in this order because + mro_isa_changed_in() can throw exceptions */ + if(PL_delayedisa) { + HV* stash = PL_delayedisa; + PL_delayedisa = NULL; + mro_isa_changed_in(stash); + } + RETURN; } @@ -1164,7 +1168,7 @@ PP(pp_qr) dVAR; dSP; register PMOP * const pm = cPMOP; REGEXP * rx = PM_GETRE(pm); - SV * const pkg = CALLREG_QRPKG(rx); + SV * const pkg = CALLREG_PACKAGE(rx); SV * const rv = sv_newmortal(); SV * const sv = newSVrv(rv, SvPV_nolen(pkg)); if (rx->extflags & RXf_TAINTED) @@ -1262,9 +1266,12 @@ PP(pp_match) } } } - /* remove comment to get faster /g but possibly unsafe $1 vars after a - match. Test for the unsafe vars will fail as well*/ - if (( /* !global && */ rx->nparens) + /* XXX: comment out !global get safe $1 vars after a + match, BUT be aware that this leads to dramatic slowdowns on + /g matches against large strings. So far a solution to this problem + appears to be quite tricky. + Test for the unsafe vars are TODO for now. */ + if (( !global && rx->nparens) || SvTEMP(TARG) || PL_sawampersand || (rx->extflags & (RXf_EVAL_SEEN|RXf_PMf_KEEPCOPY))) r_flags |= REXEC_COPY_STR; @@ -2706,9 +2713,6 @@ try_autoload: gimme = GIMME_V; if ((PL_op->op_private & OPpENTERSUB_DB) && GvCV(PL_DBsub) && !CvNODEBUG(cv)) { - if (CvASSERTION(cv) && PL_DBassertion) - sv_setiv(PL_DBassertion, 1); - Perl_get_db_sub(aTHX_ &sv, cv); if (CvISXSUB(cv)) PL_curcopdb = PL_curcop; @@ -3046,7 +3050,7 @@ S_method_common(pTHX_ SV* meth, U32* hashp) gv = (GV*)HeVAL(he); if (isGV(gv) && GvCV(gv) && (!GvCVGEN(gv) || GvCVGEN(gv) - == (PL_sub_generation + HvMROMETA(stash)->sub_generation))) + == (PL_sub_generation + HvMROMETA(stash)->cache_gen))) return (SV*)GvCV(gv); } }