Change 18596 by rgs@rgs-home on 2003/01/27 20:38:21
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
From: Dave Mitchell <[EMAIL PROTECTED]>
Date: Sun, 26 Jan 2003 17:42:42 +0000
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/cop.h#73 edit
... //depot/perl/pp_ctl.c#338 edit
Differences ...
==== //depot/perl/cop.h#73 (text) ====
Index: perl/cop.h
--- perl/cop.h#72~18220~ Sun Dec 1 16:58:54 2002
+++ perl/cop.h Mon Jan 27 12:38:21 2003
@@ -120,12 +120,22 @@
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; \
==== //depot/perl/pp_ctl.c#338 (text) ====
Index: perl/pp_ctl.c
--- perl/pp_ctl.c#337~18589~ Sun Jan 26 05:06:49 2003
+++ perl/pp_ctl.c Mon Jan 27 12:38:21 2003
@@ -1613,7 +1613,7 @@
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);
End of Patch.