Move PAD_COMPNAME_GEN from SvCUR to SvUVX.
[p5sagit/p5-mst-13.2.git] / sv.h
diff --git a/sv.h b/sv.h
index a8e7a2e..7614a6a 100644 (file)
--- a/sv.h
+++ b/sv.h
@@ -294,6 +294,10 @@ perform the upgrade if necessary.  See C<svtype>.
 #define SVp_SCREAM     0x00008000  /* has been studied? */
 #define SVphv_CLONEABLE        SVp_SCREAM  /* PVHV (stashes) clone its objects */
 #define SVpgv_GP       SVp_SCREAM  /* GV has a valid GP */
+#define SVprv_PCS_IMPORTED  SVp_SCREAM  /* RV is a proxy for a constant
+                                      subroutine in another package. Set the
+                                      CvIMPORTED_CV_ON() if it needs to be
+                                      expanded to a real GV */
 
 #define SVs_PADSTALE   0x00010000  /* lexical has gone out of scope */
 #define SVpad_STATE    0x00010000  /* pad name is a "state" var */
@@ -385,6 +389,10 @@ struct xpv {
     union {
        NV      xnv_nv;         /* numeric value, if any */
        HV *    xgv_stash;
+       struct {
+           U32 xlow;
+           U32 xhigh;
+       }       xpad_cop_seq;   /* used by pad.c for cop_sequence */
     }          xnv_u;
     STRLEN     xpv_cur;        /* length of svu_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
@@ -403,6 +411,10 @@ struct xpviv {
     union {
        NV      xnv_nv;         /* numeric value, if any */
        HV *    xgv_stash;
+       struct {
+           U32 xlow;
+           U32 xhigh;
+       }       xpad_cop_seq;   /* used by pad.c for cop_sequence */
     }          xnv_u;
     STRLEN     xpv_cur;        /* length of svu_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
@@ -437,6 +449,10 @@ struct xpvuv {
     union {
        NV      xnv_nv;         /* numeric value, if any */
        HV *    xgv_stash;
+       struct {
+           U32 xlow;
+           U32 xhigh;
+       }       xpad_cop_seq;   /* used by pad.c for cop_sequence */
     }          xnv_u;
     STRLEN     xpv_cur;        /* length of svu_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
@@ -454,6 +470,10 @@ struct xpvnv {
     union {
        NV      xnv_nv;         /* numeric value, if any */
        HV *    xgv_stash;
+       struct {
+           U32 xlow;
+           U32 xhigh;
+       }       xpad_cop_seq;   /* used by pad.c for cop_sequence */
     }          xnv_u;
     STRLEN     xpv_cur;        /* length of svu_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
@@ -471,6 +491,10 @@ struct xpvmg {
     union {
        NV      xnv_nv;         /* numeric value, if any */
        HV *    xgv_stash;
+       struct {
+           U32 xlow;
+           U32 xhigh;
+       }       xpad_cop_seq;   /* used by pad.c for cop_sequence */
     }          xnv_u;
     STRLEN     xpv_cur;        /* length of svu_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
@@ -492,6 +516,10 @@ struct xpvlv {
     union {
        NV      xnv_nv;         /* numeric value, if any */
        HV *    xgv_stash;
+       struct {
+           U32 xlow;
+           U32 xhigh;
+       }       xpad_cop_seq;   /* used by pad.c for cop_sequence */
     }          xnv_u;
     STRLEN     xpv_cur;        /* length of svu_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
@@ -521,6 +549,10 @@ struct xpvgv {
     union {
        NV      xnv_nv;
        HV *    xgv_stash;      /* The stash of this GV */
+       struct {
+           U32 xlow;
+           U32 xhigh;
+       }       xpad_cop_seq;   /* used by pad.c for cop_sequence */
     }          xnv_u;
     STRLEN     xpv_cur;        /* xgv_flags */
     STRLEN     xpv_len;        /* 0 */
@@ -547,6 +579,10 @@ struct xpvfm {
     union {
        NV      xnv_nv;         /* numeric value, if any */
        HV *    xgv_stash;
+       struct {
+           U32 xlow;
+           U32 xhigh;
+       }       xpad_cop_seq;   /* used by pad.c for cop_sequence */
     }          xnv_u;
     STRLEN     xpv_cur;        /* length of svu_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
@@ -623,6 +659,10 @@ struct xpvio {
     union {
        NV      xnv_nv;         /* numeric value, if any */
        HV *    xgv_stash;
+       struct {
+           U32 xlow;
+           U32 xhigh;
+       }       xpad_cop_seq;   /* used by pad.c for cop_sequence */
     }          xnv_u;
     STRLEN     xpv_cur;        /* length of svu_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
@@ -1013,6 +1053,11 @@ the scalar's value cannot change unless written to.
 #define SvWEAKREF_on(sv)       (SvFLAGS(sv) |=  (SVf_ROK|SVprv_WEAKREF))
 #define SvWEAKREF_off(sv)      (SvFLAGS(sv) &= ~(SVf_ROK|SVprv_WEAKREF))
 
+#define SvPCS_IMPORTED(sv)     ((SvFLAGS(sv) & (SVf_ROK|SVprv_PCS_IMPORTED)) \
+                                == (SVf_ROK|SVprv_PCS_IMPORTED))
+#define SvPCS_IMPORTED_on(sv)  (SvFLAGS(sv) |=  (SVf_ROK|SVprv_PCS_IMPORTED))
+#define SvPCS_IMPORTED_off(sv) (SvFLAGS(sv) &= ~(SVf_ROK|SVprv_PCS_IMPORTED))
+
 #define SvTHINKFIRST(sv)       (SvFLAGS(sv) & SVf_THINKFIRST)
 
 #define SvPADSTALE(sv)         (SvFLAGS(sv) & SVs_PADSTALE)
@@ -1978,17 +2023,15 @@ Returns a pointer to the character buffer.
        (((SvFLAGS(pwadak) & (SVp_POK|SVpgv_GP)) == SVpgv_GP)   \
        && (SvTYPE(pwadak) == SVt_PVGV || SvTYPE(pwadak) == SVt_PVLV))
 #define isGV_with_GP_on(sv)    STMT_START {                           \
-       GV *const uggh = (GV*) sv;                                     \
-       assert (SvTYPE(uggh) == SVt_PVGV || SvTYPE(uggh) == SVt_PVLV); \
-       assert (!SvPOKp(uggh));                                        \
-       assert (!SvIOKp(uggh));                                        \
-       (SvFLAGS(uggh) |= SVpgv_GP);                                   \
+       assert (SvTYPE(sv) == SVt_PVGV || SvTYPE(sv) == SVt_PVLV); \
+       assert (!SvPOKp(sv));                                          \
+       assert (!SvIOKp(sv));                                          \
+       (SvFLAGS(sv) |= SVpgv_GP);                                     \
     } STMT_END
 #define isGV_with_GP_off(sv)   STMT_START {                           \
-       GV *const uggh = (GV *) sv;                                    \
-       assert (SvTYPE(uggh) == SVt_PVGV || SvTYPE(uggh) == SVt_PVLV); \
-       assert (!SvPOKp(uggh));                                        \
-       assert (!SvIOKp(uggh));                                        \
+       assert (SvTYPE(sv) == SVt_PVGV || SvTYPE(sv) == SVt_PVLV); \
+       assert (!SvPOKp(sv));                                          \
+       assert (!SvIOKp(sv));                                          \
        (SvFLAGS(sv) &= ~SVpgv_GP);                                    \
     } STMT_END