summaryrefslogtreecommitdiff
path: root/cop.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2015-12-26 12:37:30 +0000
committerDavid Mitchell <davem@iabyn.com>2016-02-03 09:19:18 +0000
commitceb12bd8658d8542570022026702734394fec792 (patch)
treee025a81e110ba978ad5c6474d899ce498d2779d9 /cop.h
parent274ed8ae511aa4c52d0c3e975eb44853d4f5336f (diff)
downloadperl-ceb12bd8658d8542570022026702734394fec792.tar.gz
PUSHSUB: make retop a parameter
Rather than doing cx->blk_sub.retop = NULL in PUSHSUB, then relying on the caller to subsequently change it to something more useful, make it an arg to PUSHSUB.
Diffstat (limited to 'cop.h')
-rw-r--r--cop.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/cop.h b/cop.h
index 7934484724..268c24fdcc 100644
--- a/cop.h
+++ b/cop.h
@@ -595,7 +595,7 @@ struct block_format {
* The context frame holds a reference to the CV so that it can't be
* freed while we're executing it */
-#define PUSHSUB_BASE(cx, cv, hasargs) \
+#define PUSHSUB_BASE(cx, cv, op, hasargs) \
ENTRY_PROBE(CvNAMED(cv) \
? HEK_KEY(CvNAME_HEK(cv)) \
: GvENAME(CvGV(cv)), \
@@ -607,7 +607,7 @@ struct block_format {
cx->blk_sub.olddepth = CvDEPTH(cv); \
cx->blk_sub.prevcomppad = PL_comppad; \
cx->cx_type |= (hasargs) ? CXp_HASARGS : 0; \
- cx->blk_sub.retop = NULL; \
+ cx->blk_sub.retop = op; \
SvREFCNT_inc_simple_void_NN(cv);
#define PUSHSUB_GET_LVALUE_MASK(func) \
@@ -620,17 +620,17 @@ struct block_format {
? 0 : (U8)func(aTHX) \
)
-#define PUSHSUB(cx, cv, hasargs) \
+#define PUSHSUB(cx, cv, op, hasargs) \
{ \
U8 phlags = PUSHSUB_GET_LVALUE_MASK(Perl_was_lvalue_sub); \
- PUSHSUB_BASE(cx, cv, hasargs) \
+ PUSHSUB_BASE(cx, cv, op, hasargs) \
cx->blk_u16 = PL_op->op_private & \
(phlags|OPpDEREF); \
}
/* variant for use by OP_DBSTATE, where op_private holds hint bits */
-#define PUSHSUB_DB(cx, cv, hasargs) \
- PUSHSUB_BASE(cx, cv, hasargs) \
+#define PUSHSUB_DB(cx, cv, op, hasargs) \
+ PUSHSUB_BASE(cx, cv, op, hasargs) \
cx->blk_u16 = 0;
@@ -1345,7 +1345,7 @@ See L<perlcall/LIGHTWEIGHT CALLBACKS>.
PUSHSTACKi(PERLSI_MULTICALL); \
PUSHBLOCK(cx, (CXt_SUB|CXp_MULTICALL|flags), gimme, \
PL_stack_sp, PL_savestack_ix); \
- PUSHSUB(cx, cv, hasargs); \
+ PUSHSUB(cx, cv, NULL, hasargs); \
SAVEOP(); \
saveix_floor = PL_savestack_ix; \
if (!(flags & CXp_SUB_RE_FAKE)) \
@@ -1394,7 +1394,7 @@ See L<perlcall/LIGHTWEIGHT CALLBACKS>.
assert(CxMULTICALL(cx)); \
CX_POPSUB_COMMON(cx); \
cx->cx_type = (CXt_SUB|CXp_MULTICALL|flags); \
- PUSHSUB(cx, cv, hasargs); \
+ PUSHSUB(cx, cv, NULL, hasargs); \
if (!(flags & CXp_SUB_RE_FAKE)) \
CvDEPTH(cv)++; \
if (CvDEPTH(cv) >= 2) \