From: Dave Mitchell Date: Sun, 26 Jan 2003 17:42:42 +0000 (+0000) Subject: Introduce the PUSHSUB_DB macro, equivalent to PUSHSUB, but X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ee98a1d62d9164755faacfdf3fab9cd4e3607ed6;p=p5sagit%2Fp5-mst-13.2.git Introduce the PUSHSUB_DB macro, equivalent to PUSHSUB, but without the lval context tweak. Used in OP_DBSTATE. Subject: Re: [PATCH] Re: change #9754: 5 x slowdown for perl -d Message-ID: <20030126174242.H16182@fdgroup.com> p4raw-id: //depot/perl@18596 --- diff --git a/cop.h b/cop.h index 870225c..de80033 100644 --- a/cop.h +++ b/cop.h @@ -120,13 +120,23 @@ struct block_sub { PAD *oldcomppad; }; -#define PUSHSUB(cx) \ +/* base for the next two macros. Don't use directly */ +#define PUSHSUB_BASE(cx) \ cx->blk_sub.cv = cv; \ cx->blk_sub.olddepth = CvDEPTH(cv); \ - cx->blk_sub.hasargs = hasargs; \ + cx->blk_sub.hasargs = hasargs; + +#define PUSHSUB(cx) \ + PUSHSUB_BASE(cx) \ cx->blk_sub.lval = PL_op->op_private & \ (OPpLVAL_INTRO|OPpENTERSUB_INARGS); +/* variant for use by OP_DBSTATE, where op_private holds hint bits */ +#define PUSHSUB_DB(cx) \ + PUSHSUB_BASE(cx) \ + cx->blk_sub.lval = 0; + + #define PUSHFORMAT(cx) \ cx->blk_sub.cv = cv; \ cx->blk_sub.gv = gv; \ diff --git a/pp_ctl.c b/pp_ctl.c index 2e302ed..7c0f8ba 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -1613,7 +1613,7 @@ PP(pp_dbstate) push_return(PL_op->op_next); PUSHBLOCK(cx, CXt_SUB, SP); - PUSHSUB(cx); + PUSHSUB_DB(cx); CvDEPTH(cv)++; (void)SvREFCNT_inc(cv); PAD_SET_CUR(CvPADLIST(cv),1);