summaryrefslogtreecommitdiff
path: root/cop.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-08-31 08:26:13 +0000
committerNicholas Clark <nick@ccl4.org>2006-08-31 08:26:13 +0000
commit2e0df0e80ba5355d269a0006da239be95c70765d (patch)
tree912d22cb2deddd14d9f33e62296fb71e08790935 /cop.h
parentdd01f9565a8422cddb97f75e3262d9a6a80ae712 (diff)
downloadperl-2e0df0e80ba5355d269a0006da239be95c70765d.tar.gz
Save 4 bytes from struct context (on ILP32) by moving cx_type into
struct block and struct subst. p4raw-id: //depot/perl@28770
Diffstat (limited to 'cop.h')
-rw-r--r--cop.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/cop.h b/cop.h
index bfaea578e2..5bc36bd6f7 100644
--- a/cop.h
+++ b/cop.h
@@ -470,12 +470,13 @@ struct block_givwhen {
/* context common to subroutines, evals and loops */
struct block {
+ U16 blku_type; /* what kind of context this is */
+ U8 blku_gimme; /* is this block running in list context? */
I32 blku_oldsp; /* stack pointer to copy stuff down to */
COP * blku_oldcop; /* old curcop pointer */
I32 blku_oldmarksp; /* mark stack index */
I32 blku_oldscopesp; /* scope stack index */
PMOP * blku_oldpm; /* values of pattern match vars */
- U8 blku_gimme; /* is this block running in list context? */
union {
struct block_sub blku_sub;
@@ -529,12 +530,13 @@ struct block {
/* substitution context */
struct subst {
+ U16 sbu_type; /* what kind of context this is */
+ bool sbu_once;
+ bool sbu_rxtainted;
I32 sbu_iters;
I32 sbu_maxiters;
I32 sbu_rflags;
I32 sbu_oldsave;
- bool sbu_once;
- bool sbu_rxtainted;
char * sbu_orig;
SV * sbu_dstr;
SV * sbu_targ;
@@ -583,12 +585,12 @@ struct subst {
ReREFCNT_dec(cx->sb_rx)
struct context {
- U32 cx_type; /* what kind of context this is */
union {
struct block cx_blk;
struct subst cx_subst;
} cx_u;
};
+#define cx_type cx_u.cx_subst.sbu_type
#define CXTYPEMASK 0xff
#define CXt_NULL 0