diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-01-20 22:20:56 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-01-20 22:20:56 +0000 |
commit | ae423868f0b6096a2e2c476339cbdb24c6f2b3de (patch) | |
tree | c83c4bd2ce4cac88faaaaf7399788b86be0a567f /cop.h | |
parent | bafb2adc256d4363e483e0aed4b43fdcf2c57a9b (diff) | |
download | perl-ae423868f0b6096a2e2c476339cbdb24c6f2b3de.tar.gz |
Eliminate hasargs from structs block_sub and block_format by storing
it with a private flag CXp_HASARGS in cx_type. (It's only a boolean.)
p4raw-id: //depot/perl@33018
Diffstat (limited to 'cop.h')
-rw-r--r-- | cop.h | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -282,7 +282,6 @@ struct block_sub { OP * retop; /* op to execute on exit from sub */ /* Above here is the same for sub, format and eval. */ CV * cv; - U8 hasargs; U8 lval; /* XXX merge lval and hasargs? */ /* Above here is the same for sub and format. */ AV * savearray; @@ -297,7 +296,6 @@ struct block_format { OP * retop; /* op to execute on exit from sub */ /* Above here is the same for sub, format and eval. */ CV * cv; - U8 hasargs; U8 lval; /* XXX merge lval and hasargs? */ /* Above here is the same for sub and format. */ GV * gv; @@ -315,7 +313,7 @@ struct block_format { \ cx->blk_sub.cv = cv; \ cx->blk_sub.olddepth = CvDEPTH(cv); \ - cx->blk_sub.hasargs = hasargs; \ + cx->cx_type |= (hasargs) ? CXp_HASARGS : 0; \ cx->blk_sub.retop = NULL; \ if (!CvDEPTH(cv)) { \ SvREFCNT_inc_simple_void_NN(cv); \ @@ -339,7 +337,6 @@ struct block_format { cx->blk_format.cv = cv; \ cx->blk_format.gv = gv; \ cx->blk_format.retop = (retop); \ - cx->blk_format.hasargs = 0; \ cx->blk_format.dfoutgv = PL_defoutgv; \ SvREFCNT_inc_void(cx->blk_format.dfoutgv) @@ -488,7 +485,7 @@ struct block_loop { cx->blk_loop.itersave = NULL; #endif #define CxLABEL(c) (0 + (c)->blk_oldcop->cop_label) -#define CxHASARGS(c) (0 + (c)->blk_sub.hasargs) +#define CxHASARGS(c) (((c)->cx_type & CXp_HASARGS) == CXp_HASARGS) #define CxLVAL(c) (0 + (c)->blk_sub.lval) #ifdef USE_ITHREADS @@ -675,6 +672,9 @@ struct context { #define CXp_MULTICALL 0x00000400 /* part of a multicall (so don't tear down context on exit). */ +/* private flags for CXt_SUB and CXt_FORMAT */ +#define CXp_HASARGS 0x00000200 + /* private flags for CXt_EVAL */ #define CXp_REAL 0x00000100 /* truly eval'', not a lookalike */ #define CXp_TRYBLOCK 0x00000200 /* eval{}, not eval'' or similar */ |