From: Nicholas Clark Date: Sun, 5 Mar 2006 18:13:42 +0000 (+0000) Subject: Move the GvNAME HEK into the IV union - every GV is now 1 pointer X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=69ecfd1277806cc4f0867436789903927289b9b2;p=p5sagit%2Fp5-mst-13.2.git Move the GvNAME HEK into the IV union - every GV is now 1 pointer smaller. p4raw-id: //depot/perl@27380 --- diff --git a/av.h b/av.h index 94cd82b..d91b6f0 100644 --- a/av.h +++ b/av.h @@ -19,6 +19,8 @@ struct xpvav { IV xivu_iv; /* integer value or pv offset */ UV xivu_uv; void * xivu_p1; + I32 xivu_i32; + HEK * xivu_namehek; } xiv_u; union { MAGIC* xmg_magic; /* linked list of magicalness */ @@ -37,6 +39,8 @@ typedef struct { IV xivu_iv; /* integer value or pv offset */ UV xivu_uv; void * xivu_p1; + I32 xivu_i32; + HEK * xivu_namehek; } xiv_u; union { MAGIC* xmg_magic; /* linked list of magicalness */ diff --git a/cv.h b/cv.h index 6d93d71..e92b326 100644 --- a/cv.h +++ b/cv.h @@ -22,6 +22,7 @@ struct xpvcv { UV xivu_uv; void * xivu_p1; I32 xivu_i32; /* depth, >= 2 indicates recursive call */ + HEK * xivu_namehek; } xiv_u; union { MAGIC* xmg_magic; /* linked list of magicalness */ @@ -56,6 +57,7 @@ typedef struct { UV xivu_uv; void * xivu_p1; I32 xivu_i32; /* depth, >= 2 indicates recursive call */ + HEK * xivu_namehek; } xiv_u; union { MAGIC* xmg_magic; /* linked list of magicalness */ diff --git a/gv.c b/gv.c index 8b3b099..a458159 100644 --- a/gv.c +++ b/gv.c @@ -2115,7 +2115,7 @@ Perl_gv_name_set(pTHX_ GV *gv, const char *name, U32 len, U32 flags) Perl_croak(aTHX_ "panic: gv name too long (%"UVuf")", (UV) len); PERL_HASH(hash, name, len); - GvXPVGV(gv)->xgv_namehek = name ? share_hek(name, len, hash) : 0; + GvNAME_HEK(gv) = name ? share_hek(name, len, hash) : 0; } /* diff --git a/gv.h b/gv.h index c4e26c3..e3611c6 100644 --- a/gv.h +++ b/gv.h @@ -47,7 +47,7 @@ struct gp { (*({ GV * const zzzz = (GV *) (gv); \ assert(isGV_with_GP(zzzz)); \ assert(SvTYPE(zzzz) == SVt_PVGV || SvTYPE(zzzz) >= SVt_PVLV); \ - &(GvXPVGV(zzzz)->xgv_namehek); \ + &(GvXPVGV(zzzz)->xiv_u.xivu_namehek); \ })) #else # define GvGP(gv) ((gv)->sv_u.svu_gp) diff --git a/hv.h b/hv.h index 4f4d3aa..79035e2 100644 --- a/hv.h +++ b/hv.h @@ -59,6 +59,8 @@ struct xpvhv { IV xivu_iv; /* integer value or pv offset */ UV xivu_uv; void * xivu_p1; + I32 xivu_i32; + HEK * xivu_namehek; } xiv_u; union { MAGIC* xmg_magic; /* linked list of magicalness */ @@ -79,6 +81,8 @@ typedef struct { IV xivu_iv; /* integer value or pv offset */ UV xivu_uv; void * xivu_p1; + I32 xivu_i32; + HEK * xivu_namehek; } xiv_u; union { MAGIC* xmg_magic; /* linked list of magicalness */ diff --git a/sv.h b/sv.h index 7a63afc..d91957c 100644 --- a/sv.h +++ b/sv.h @@ -395,6 +395,7 @@ struct xpviv { UV xivu_uv; void * xivu_p1; I32 xivu_i32; + HEK * xivu_namehek; } xiv_u; }; @@ -409,6 +410,7 @@ typedef struct { UV xivu_uv; void * xivu_p1; I32 xivu_i32; + HEK * xivu_namehek; } xiv_u; } xpviv_allocated; #endif @@ -426,6 +428,7 @@ struct xpvuv { IV xuvu_iv; UV xuvu_uv; /* unsigned value or pv offset */ void * xuvu_p1; + HEK * xivu_namehek; } xuv_u; }; @@ -443,6 +446,7 @@ struct xpvnv { UV xivu_uv; void * xivu_p1; I32 xivu_i32; + HEK * xivu_namehek; } xiv_u; }; @@ -459,6 +463,7 @@ struct xpvmg { UV xivu_uv; void * xivu_p1; I32 xivu_i32; + HEK * xivu_namehek; } xiv_u; union { MAGIC* xmg_magic; /* linked list of magicalness */ @@ -479,6 +484,7 @@ struct xpvlv { UV xivu_uv; void * xivu_p1; I32 xivu_i32; + HEK * xivu_namehek; /* GvNAME */ } xiv_u; union { MAGIC* xmg_magic; /* linked list of magicalness */ @@ -486,9 +492,6 @@ struct xpvlv { } xmg_u; HV* xmg_stash; /* class package */ - /* a full glob fits into this */ - HEK * xgv_namehek; - STRLEN xlv_targoff; STRLEN xlv_targlen; SV* xlv_targ; @@ -504,10 +507,11 @@ struct xpvgv { STRLEN xpv_cur; /* xgv_flags */ STRLEN xpv_len; /* 0 */ union { - IV xivu_iv; /* integer value or pv offset */ + IV xivu_iv; UV xivu_uv; void * xivu_p1; I32 xivu_i32; + HEK * xivu_namehek; /* GvNAME */ } xiv_u; union { MAGIC* xmg_magic; /* linked list of magicalness */ @@ -515,7 +519,6 @@ struct xpvgv { } xmg_u; HV* xmg_stash; /* class package */ - HEK * xgv_namehek; }; struct xpvbm { @@ -530,6 +533,7 @@ struct xpvbm { UV xivu_uv; void * xivu_p1; I32 xivu_i32; + HEK * xivu_namehek; } xiv_u; union { MAGIC* xmg_magic; /* linked list of magicalness */ @@ -558,6 +562,7 @@ struct xpvfm { UV xivu_uv; void * xivu_p1; I32 xivu_i32; + HEK * xivu_namehek; } xiv_u; union { MAGIC* xmg_magic; /* linked list of magicalness */ @@ -593,6 +598,7 @@ typedef struct { UV xivu_uv; void * xivu_p1; I32 xivu_i32; + HEK * xivu_namehek; } xiv_u; union { MAGIC* xmg_magic; /* linked list of magicalness */ @@ -632,6 +638,7 @@ struct xpvio { UV xivu_uv; void * xivu_p1; I32 xivu_i32; + HEK * xivu_namehek; } xiv_u; union { MAGIC* xmg_magic; /* linked list of magicalness */