From: Stephen McCamant Date: Wed, 2 Oct 2002 21:48:59 +0000 (-0400) Subject: Re: speed of my X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1301793579656d41ef345218fe1021d8c3d9671f;p=p5sagit%2Fp5-mst-13.2.git Re: speed of my Message-Id: <15771.41483.524281.299958@syllepsis.MIT.EDU> p4raw-id: //depot/perl@17968 --- diff --git a/pp.c b/pp.c index d2c462e..5cc1581 100644 --- a/pp.c +++ b/pp.c @@ -19,8 +19,6 @@ #include "reentr.h" -/* variations on pp_null */ - /* XXX I can't imagine anyone who doesn't have this actually _needs_ it, since pid_t is an integral type. --AD 2/20/1998 @@ -29,6 +27,8 @@ extern Pid_t getpid (void); #endif +/* variations on pp_null */ + PP(pp_stub) { dSP; @@ -47,6 +47,7 @@ PP(pp_scalar) PP(pp_padav) { dSP; dTARGET; + I32 gimme; if (PL_op->op_private & OPpLVAL_INTRO) SAVECLEARSV(PAD_SVl(PL_op->op_targ)); EXTEND(SP, 1); @@ -59,7 +60,8 @@ PP(pp_padav) PUSHs(TARG); RETURN; } - if (GIMME == G_ARRAY) { + gimme = GIMME_V; + if (gimme == G_ARRAY) { I32 maxarg = AvFILL((AV*)TARG) + 1; EXTEND(SP, maxarg); if (SvMAGICAL(TARG)) { @@ -74,7 +76,7 @@ PP(pp_padav) } SP += maxarg; } - else { + else if (gimme == G_SCALAR) { SV* sv = sv_newmortal(); I32 maxarg = AvFILL((AV*)TARG) + 1; sv_setiv(sv, maxarg);