diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-02-20 17:48:21 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-02-20 17:48:21 +0000 |
commit | bb17208353b2f15e0bf22099038f9ea336d6de2a (patch) | |
tree | 5c1ace6caa469990ceca08a4a829a4ea29250b21 /sv.h | |
parent | 8a27f21b702728eba502a2ab9428475e0535d96d (diff) | |
download | perl-bb17208353b2f15e0bf22099038f9ea336d6de2a.tar.gz |
PVFMs don't need CvDEPTH, and PVCVs don't use SvIVX, so moving
xcv_depth into the IV union saves 4(ish) bytes per CV and format.
"ish" because it was a long, but has been changed to I32 (along with
the corresponding field in struct block_sub) so as not to enlarge the
IV union on platforms where sizeof(long) > sizeof(IV), or struct
block_sub where sizeof(long) > sizeof(I32)
p4raw-id: //depot/perl@27247
Diffstat (limited to 'sv.h')
-rw-r--r-- | sv.h | 22 |
1 files changed, 16 insertions, 6 deletions
@@ -294,6 +294,7 @@ struct xpviv { IV xivu_iv; /* integer value or pv offset */ UV xivu_uv; void * xivu_p1; + I32 xivu_i32; } xiv_u; }; @@ -307,6 +308,7 @@ typedef struct { IV xivu_iv; /* integer value or pv offset */ UV xivu_uv; void * xivu_p1; + I32 xivu_i32; } xiv_u; } xpviv_allocated; #endif @@ -334,6 +336,7 @@ struct xpvnv { IV xivu_iv; /* integer value or pv offset */ UV xivu_uv; void * xivu_p1; + I32 xivu_i32; } xiv_u; }; @@ -346,6 +349,7 @@ struct xpvmg { IV xivu_iv; /* integer value or pv offset */ UV xivu_uv; void * xivu_p1; + I32 xivu_i32; } xiv_u; MAGIC* xmg_magic; /* linked list of magicalness */ HV* xmg_stash; /* class package */ @@ -359,6 +363,7 @@ struct xpvlv { IV xivu_iv; /* integer value or pv offset */ UV xivu_uv; void * xivu_p1; + I32 xivu_i32; } xiv_u; MAGIC* xmg_magic; /* linked list of magicalness */ HV* xmg_stash; /* class package */ @@ -385,6 +390,7 @@ struct xpvgv { IV xivu_iv; /* integer value or pv offset */ UV xivu_uv; void * xivu_p1; + I32 xivu_i32; } xiv_u; MAGIC* xmg_magic; /* linked list of magicalness */ HV* xmg_stash; /* class package */ @@ -404,6 +410,7 @@ struct xpvbm { IV xivu_iv; /* integer value or pv offset */ UV xivu_uv; void * xivu_p1; + I32 xivu_i32; } xiv_u; MAGIC* xmg_magic; /* linked list of magicalness */ HV* xmg_stash; /* class package */ @@ -422,9 +429,10 @@ struct xpvfm { STRLEN xpv_cur; /* length of svu_pv as a C string */ STRLEN xpv_len; /* allocated size */ union { - IV xivu_iv; /* integer value or pv offset */ + IV xivu_iv; /* PVFMs use the pv offset */ UV xivu_uv; void * xivu_p1; + I32 xivu_i32; } xiv_u; MAGIC* xmg_magic; /* linked list of magicalness */ HV* xmg_stash; /* class package */ @@ -440,13 +448,12 @@ struct xpvfm { } xcv_root_u; GV * xcv_gv; char * xcv_file; - long xcv_depth; /* >= 2 indicates recursive call */ AV * xcv_padlist; CV * xcv_outside; - cv_flags_t xcv_flags; U32 xcv_outside_seq; /* the COP sequence (at the point of our * compilation) in the lexically enclosing * sub */ + cv_flags_t xcv_flags; IV xfm_lines; }; @@ -454,9 +461,10 @@ typedef struct { STRLEN xpv_cur; /* length of svu_pv as a C string */ STRLEN xpv_len; /* allocated size */ union { - IV xivu_iv; /* integer value or pv offset */ + IV xivu_iv; /* PVFMs use the pv offset */ UV xivu_uv; void * xivu_p1; + I32 xivu_i32; } xiv_u; MAGIC* xmg_magic; /* linked list of magicalness */ HV* xmg_stash; /* class package */ @@ -472,13 +480,12 @@ typedef struct { } xcv_root_u; GV * xcv_gv; char * xcv_file; - long xcv_depth; /* >= 2 indicates recursive call */ AV * xcv_padlist; CV * xcv_outside; - cv_flags_t xcv_flags; U32 xcv_outside_seq; /* the COP sequence (at the point of our * compilation) in the lexically enclosing * sub */ + cv_flags_t xcv_flags; IV xfm_lines; } xpvfm_allocated; @@ -490,6 +497,7 @@ struct xpvio { IV xivu_iv; /* integer value or pv offset */ UV xivu_uv; void * xivu_p1; + I32 xivu_i32; } xiv_u; MAGIC* xmg_magic; /* linked list of magicalness */ HV* xmg_stash; /* class package */ @@ -945,6 +953,7 @@ in gv.h: */ assert(SvTYPE(_svi) == SVt_IV || SvTYPE(_svi) >= SVt_PVIV); \ assert(SvTYPE(_svi) != SVt_PVAV); \ assert(SvTYPE(_svi) != SVt_PVHV); \ + assert(SvTYPE(_svi) != SVt_PVCV); \ &(((XPVIV*) SvANY(_svi))->xiv_iv); \ })) # define SvUVX(sv) \ @@ -952,6 +961,7 @@ in gv.h: */ assert(SvTYPE(_svi) == SVt_IV || SvTYPE(_svi) >= SVt_PVIV); \ assert(SvTYPE(_svi) != SVt_PVAV); \ assert(SvTYPE(_svi) != SVt_PVHV); \ + assert(SvTYPE(_svi) != SVt_PVCV); \ &(((XPVUV*) SvANY(_svi))->xuv_uv); \ })) # define SvNVX(sv) \ |