CopFILE((COP*)CvSTART((CV*)cx->blk_sub.cv)), \
CopLINE((COP*)CvSTART((CV*)cx->blk_sub.cv))); \
\
- if (cx->blk_sub.hasargs) { \
+ if (CxHASARGS(cx)) { \
POP_SAVEARRAY(); \
/* abandon @_ if it got reified */ \
if (AvREAL(cx->blk_sub.argarray)) { \
cx->blk_loop.itersave = NULL;
#endif
#define CxLABEL(c) (0 + (c)->blk_oldcop->cop_label)
+#define CxHASARGS(c) (0 + (c)->blk_sub.hasargs)
+#define CxLVAL(c) (0 + (c)->blk_sub.lval)
#ifdef USE_ITHREADS
# define PUSHLOOP_OP_NEXT /* No need to do anything. */
const I32 cxix = dopoptosub(cxstack_ix);
assert(cxix >= 0); /* We should only be called from inside subs */
- if (cxstack[cxix].blk_sub.lval && CvLVALUE(cxstack[cxix].blk_sub.cv))
- return cxstack[cxix].blk_sub.lval;
+ if (CxLVAL(cxstack + cxix) && CvLVALUE(cxstack[cxix].blk_sub.cv))
+ return CxLVAL(cxstack + cxix);
else
return 0;
}
SV * const sv = newSV(0);
gv_efullname3(sv, cvgv, NULL);
mPUSHs(sv);
- mPUSHi((I32)cx->blk_sub.hasargs);
+ mPUSHi((I32)CxHASARGS(cx));
}
else {
PUSHs(newSVpvs_flags("(unknown)", SVs_TEMP));
- mPUSHi((I32)cx->blk_sub.hasargs);
+ mPUSHi((I32)CxHASARGS(cx));
}
}
else {
PUSHs(&PL_sv_undef);
PUSHs(&PL_sv_undef);
}
- if (CxTYPE(cx) == CXt_SUB && cx->blk_sub.hasargs
+ if (CxTYPE(cx) == CXt_SUB && CxHASARGS(cx)
&& CopSTASH_eq(PL_curcop, PL_debstash))
{
AV * const ary = cx->blk_sub.argarray;
}
else if (CxMULTICALL(cx))
DIE(aTHX_ "Can't goto subroutine from a sort sub (or similar callback)");
- if (CxTYPE(cx) == CXt_SUB && cx->blk_sub.hasargs) {
+ if (CxTYPE(cx) == CXt_SUB && CxHASARGS(cx)) {
/* put @_ back onto stack */
AV* av = cx->blk_sub.argarray;
}
SAVECOMPPAD();
PAD_SET_CUR_NOSAVE(padlist, CvDEPTH(cv));
- if (cx->blk_sub.hasargs)
+ if (CxHASARGS(cx))
{
AV* const av = (AV*)PAD_SVl(0);
TAINT_NOT;
- if (cx->blk_sub.lval & OPpENTERSUB_INARGS) {
+ if (CxLVAL(cx) & OPpENTERSUB_INARGS) {
/* We are an argument to a function or grep().
* This kind of lvalueness was legal before lvalue
* subroutines too, so be backward compatible:
}
}
}
- else if (cx->blk_sub.lval) { /* Leave it as it is if we can. */
+ else if (CxLVAL(cx)) { /* Leave it as it is if we can. */
/* Here we go for robustness, not for speed, so we change all
* the refcounts so the caller gets a live guy. Cannot set
* TEMP, so sv_2mortal is out of question. */
PerlIO_printf(Perl_debug_log, "BLK_FORMAT.DFOUTGV = 0x%"UVxf"\n",
PTR2UV(cx->blk_format.dfoutgv));
PerlIO_printf(Perl_debug_log, "BLK_FORMAT.HASARGS = %d\n",
- (int)cx->blk_format.hasargs);
+ (int)CxHASARGS(cx));
PerlIO_printf(Perl_debug_log, "BLK_FORMAT.RETOP = 0x%"UVxf"\n",
PTR2UV(cx->blk_format.retop));
break;
PerlIO_printf(Perl_debug_log, "BLK_SUB.OLDDEPTH = %ld\n",
(long)cx->blk_sub.olddepth);
PerlIO_printf(Perl_debug_log, "BLK_SUB.HASARGS = %d\n",
- (int)cx->blk_sub.hasargs);
- PerlIO_printf(Perl_debug_log, "BLK_SUB.LVAL = %d\n",
- (int)cx->blk_sub.lval);
+ (int)CxHASARGS(cx));
+ PerlIO_printf(Perl_debug_log, "BLK_SUB.LVAL = %d\n", (int)CxLVAL(cx));
PerlIO_printf(Perl_debug_log, "BLK_SUB.RETOP = 0x%"UVxf"\n",
PTR2UV(cx->blk_sub.retop));
break;
ncx->blk_sub.cv = (ncx->blk_sub.olddepth == 0
? cv_dup_inc(ncx->blk_sub.cv, param)
: cv_dup(ncx->blk_sub.cv,param));
- ncx->blk_sub.argarray = (ncx->blk_sub.hasargs
+ ncx->blk_sub.argarray = (CxHASARGS(ncx)
? av_dup_inc(ncx->blk_sub.argarray,
param)
: NULL);