This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
renumber SVpad_STATE and free a bit in SvFLAGS
authorDavid Mitchell <davem@iabyn.com>
Fri, 7 Oct 2011 19:01:08 +0000 (20:01 +0100)
committerDavid Mitchell <davem@iabyn.com>
Fri, 7 Oct 2011 19:07:48 +0000 (20:07 +0100)
SVpad_STATE is only used on SVs which hold PAD names; make it share the
same flags bit as SVprv_WEAKREF/SVf_IVisUV. Together with the previous
commit, this frees up a single bit in SvFLAGS, 0x00010000.

sv.h

diff --git a/sv.h b/sv.h
index 5324256..218df0b 100644 (file)
--- a/sv.h
+++ b/sv.h
@@ -309,8 +309,7 @@ perform the upgrade if necessary.  See C<svtype>.
                                       subroutine in another package. Set the
                                       CvIMPORTED_CV_ON() if it needs to be
                                       expanded to a real GV */
-
-#define SVpad_STATE    0x00010000  /* pad name is a "state" var */
+/*                      0x00010000  *** FREE SLOT */
 #define SVs_PADTMP     0x00020000  /* in use as tmp; only if ! SVs_PADMY */
 #define SVs_PADSTALE   0x00020000  /* lexical has gone out of scope;
                                        only valid for SVs_PADMY */
@@ -410,6 +409,8 @@ perform the upgrade if necessary.  See C<svtype>.
 #define SVpbm_TAIL     0x80000000
 /* RV upwards. However, SVf_ROK and SVp_IOK are exclusive  */
 #define SVprv_WEAKREF   0x80000000  /* Weak reference */
+/* pad name vars only */
+#define SVpad_STATE    0x80000000  /* pad name is a "state" var */
 
 #define _XPV_HEAD                                                      \
     HV*                xmg_stash;      /* class package */                     \