diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-03-05 18:13:42 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-03-05 18:13:42 +0000 |
commit | 69ecfd1277806cc4f0867436789903927289b9b2 (patch) | |
tree | 5bb8df6b438f8c8259c922bdde3b1dc1413ea6fc | |
parent | acda4c6a827049c821c192cce45f6c5299c45783 (diff) | |
download | perl-69ecfd1277806cc4f0867436789903927289b9b2.tar.gz |
Move the GvNAME HEK into the IV union - every GV is now 1 pointer
smaller.
p4raw-id: //depot/perl@27380
-rw-r--r-- | av.h | 4 | ||||
-rw-r--r-- | cv.h | 2 | ||||
-rw-r--r-- | gv.c | 2 | ||||
-rw-r--r-- | gv.h | 2 | ||||
-rw-r--r-- | hv.h | 4 | ||||
-rw-r--r-- | sv.h | 17 |
6 files changed, 24 insertions, 7 deletions
@@ -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 */ @@ -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 */ @@ -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; } /* @@ -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) @@ -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 */ @@ -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 */ |