summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-03-05 18:13:42 +0000
committerNicholas Clark <nick@ccl4.org>2006-03-05 18:13:42 +0000
commit69ecfd1277806cc4f0867436789903927289b9b2 (patch)
tree5bb8df6b438f8c8259c922bdde3b1dc1413ea6fc
parentacda4c6a827049c821c192cce45f6c5299c45783 (diff)
downloadperl-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.h4
-rw-r--r--cv.h2
-rw-r--r--gv.c2
-rw-r--r--gv.h2
-rw-r--r--hv.h4
-rw-r--r--sv.h17
6 files changed, 24 insertions, 7 deletions
diff --git a/av.h b/av.h
index 94cd82bf98..d91b6f0086 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 6d93d7171f..e92b326a8c 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 8b3b099f32..a458159d76 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 c4e26c3024..e3611c6e56 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 4f4d3aac5f..79035e2766 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 7a63afc1ed..d91957c8a2 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 */