Change 33214 by [EMAIL PROTECTED] on 2008/02/02 22:01:39

        Integrate:
        [ 33141]
        Integrate:
        [ 32867]
        Clarify the intent of the code in Perl_op_clear. Under ithreads, avoid
        calling sv_ivset twice. As a side effect, eliminate PM_GETRE_SAFE
        and PM_SETRE_SAFE, as we're doing "safe" explicitly in Perl_op_clear().
        
        [ 32868]
        Enforce some type safety in PM_SETRE by adding PM_SETRE_OFFSET.
        
        [ 33155]
        Integrate:
        [ 32949]
        Introduce macro PERL_MAX_SUB_DEPTH
        
        [ 32955]
        Rename PERL_MAX_SUB_DEPTH to PERL_SUB_DEPTH_WARN, per Tim Bunce's
        suggestion
        
        [ 33157]
        Integrate:
        [ 33010]
        In struct block_loop access element label via the macro CxLABEL()
        (for the places that aren't about to change)
        
        [ 33017]
        In struct block_sub and block_format, access the members hasargs and
        lval via macros CxHASARGS() and CxLVAL(), which will allow the storage
        location to be changed.
        
        [ 33029]
        In struct block_eval, access the members old_in_eval and old_op_type
        via macros CxOLD_IN_EVAL() and CxOLD_OP_TYPE(), which will allow the
        storage location to be changed.
        
        [ 33034]
        In struct block_subst, access the member once via a macro CxONCE()
        which will allow the storage location to be changed.
        
        [ 33161]
        Integrate:
        [ 33051]
        Deprecate (and remove core use of ) Nullav, Nullcv, Nullgv, Nullhe,
        Nullhek and Nullhv. Nullop is going to be a bit less simple.
        
        [ 33052]
        Purge all use of Nullch in non-dual life modules.
        Exterminate! Exterminate! Exterminate!
        
        [ 33053]
        Change 33052 missed one Nullch. Oops.
        Exterminate! Exterminate! Exterminate!
        
        
        [for maint, the "remove core use of" part, not the deprecating]
        
        [ 33167]
        Integrate:
        [ 33004]
        Avoid an unused argument in S_sv_2iuv_non_preserve() by using
        conditional compilation to only pass it in if it's needed.

Affected files ...

... //depot/maint-5.8/perl/cop.h#42 integrate
... //depot/maint-5.8/perl/embed.fnc#241 integrate
... //depot/maint-5.8/perl/embed.h#183 integrate
... //depot/maint-5.8/perl/epoc/epoc.c#2 integrate
... //depot/maint-5.8/perl/ext/B/B.xs#38 integrate
... //depot/maint-5.8/perl/ext/Data/Dumper/Dumper.xs#20 integrate
... //depot/maint-5.8/perl/ext/Opcode/Opcode.xs#11 integrate
... //depot/maint-5.8/perl/ext/PerlIO/encoding/encoding.xs#10 integrate
... //depot/maint-5.8/perl/ext/PerlIO/scalar/scalar.xs#13 integrate
... //depot/maint-5.8/perl/ext/PerlIO/via/via.xs#15 integrate
... //depot/maint-5.8/perl/ext/Storable/Storable.xs#34 integrate
... //depot/maint-5.8/perl/malloc.c#26 integrate
... //depot/maint-5.8/perl/op.c#227 integrate
... //depot/maint-5.8/perl/op.h#41 integrate
... //depot/maint-5.8/perl/perl.h#178 integrate
... //depot/maint-5.8/perl/pod/perlapio.pod#6 integrate
... //depot/maint-5.8/perl/pp_ctl.c#186 integrate
... //depot/maint-5.8/perl/pp_hot.c#144 integrate
... //depot/maint-5.8/perl/proto.h#230 integrate
... //depot/maint-5.8/perl/scope.c#71 integrate
... //depot/maint-5.8/perl/sv.c#378 integrate
... //depot/maint-5.8/perl/win32/vdir.h#5 integrate

Differences ...

==== //depot/maint-5.8/perl/cop.h#42 (text) ====
Index: perl/cop.h
--- perl/cop.h#41~33188~        2008-02-02 07:58:54.000000000 -0800
+++ perl/cop.h  2008-02-02 14:01:39.000000000 -0800
@@ -385,7 +385,7 @@
 
 #define POPSUB(cx,sv)                                                  \
     STMT_START {                                                       \
-       if (cx->blk_sub.hasargs) {                                      \
+       if (CxHASARGS(cx)) {                                            \
            POP_SAVEARRAY();                                            \
            /* abandon @_ if it got reified */                          \
            if (AvREAL(cx->blk_sub.argarray)) {                         \
@@ -426,6 +426,9 @@
     JMPENV *   cur_top_env; /* value of PL_top_env when eval CX created */
 };
 
+#define CxOLD_IN_EVAL(cx)      (0 + (cx)->blk_eval.old_in_eval)
+#define CxOLD_OP_TYPE(cx)      (0 + (cx)->blk_eval.old_op_type)
+
 #define PUSHEVAL(cx,n,fgv)                                             \
     STMT_START {                                                       \
        cx->blk_eval.old_in_eval = PL_in_eval;                          \
@@ -439,8 +442,8 @@
 
 #define POPEVAL(cx)                                                    \
     STMT_START {                                                       \
-       PL_in_eval = cx->blk_eval.old_in_eval;                          \
-       optype = cx->blk_eval.old_op_type;                              \
+       PL_in_eval = CxOLD_IN_EVAL(cx);                                 \
+       optype = CxOLD_OP_TYPE(cx);                                     \
        PL_eval_root = cx->blk_eval.old_eval_root;                      \
        if (cx->blk_eval.old_namesv)                                    \
            sv_2mortal(cx->blk_eval.old_namesv);                        \
@@ -488,6 +491,9 @@
        else                                                            \
            cx->blk_loop.itersave = NULL;
 #endif
+#define CxLABEL(c)     (0 + (c)->blk_loop.label)
+#define CxHASARGS(c)   (0 + (c)->blk_sub.hasargs)
+#define CxLVAL(c)      (0 + (c)->blk_sub.lval)
 
 #define PUSHLOOP(cx, dat, s)                                           \
        cx->blk_loop.label = PL_curcop->cop_label;                      \
@@ -628,6 +634,8 @@
        rxres_save(&cx->sb_rxres, rx);                                  \
        (void)ReREFCNT_inc(rx)
 
+#define CxONCE(cx)             (0 + cx->sb_once)
+
 #define POPSUBST(cx) cx = &cxstack[cxstack_ix--];                      \
        rxres_free(&cx->sb_rxres);                                      \
        ReREFCNT_dec(cx->sb_rx)

==== //depot/maint-5.8/perl/embed.fnc#241 (text) ====
Index: perl/embed.fnc
--- perl/embed.fnc#240~33204~   2008-02-02 10:16:39.000000000 -0800
+++ perl/embed.fnc      2008-02-02 14:01:39.000000000 -0800
@@ -1357,7 +1357,11 @@
 s      |void   |del_sv |NN SV *p
 #  endif
 #  if !defined(NV_PRESERVES_UV)
+#    ifdef DEBUGGING
 s      |int    |sv_2iuv_non_preserve   |NN SV *sv|I32 numtype
+#    else
+s      |int    |sv_2iuv_non_preserve   |NN SV *sv
+#    endif
 #  endif
 sR     |I32    |expect_number  |NN char** pattern
 #

==== //depot/maint-5.8/perl/embed.h#183 (text+w) ====
Index: perl/embed.h
--- perl/embed.h#182~33180~     2008-02-01 14:57:38.000000000 -0800
+++ perl/embed.h        2008-02-02 14:01:39.000000000 -0800
@@ -1378,9 +1378,15 @@
 #endif
 #  endif
 #  if !defined(NV_PRESERVES_UV)
+#    ifdef DEBUGGING
 #ifdef PERL_CORE
 #define sv_2iuv_non_preserve   S_sv_2iuv_non_preserve
 #endif
+#    else
+#ifdef PERL_CORE
+#define sv_2iuv_non_preserve   S_sv_2iuv_non_preserve
+#endif
+#    endif
 #  endif
 #ifdef PERL_CORE
 #define expect_number          S_expect_number
@@ -3511,9 +3517,15 @@
 #endif
 #  endif
 #  if !defined(NV_PRESERVES_UV)
+#    ifdef DEBUGGING
 #ifdef PERL_CORE
 #define sv_2iuv_non_preserve(a,b)      S_sv_2iuv_non_preserve(aTHX_ a,b)
 #endif
+#    else
+#ifdef PERL_CORE
+#define sv_2iuv_non_preserve(a)        S_sv_2iuv_non_preserve(aTHX_ a)
+#endif
+#    endif
 #  endif
 #ifdef PERL_CORE
 #define expect_number(a)       S_expect_number(aTHX_ a)

==== //depot/maint-5.8/perl/epoc/epoc.c#2 (text) ====
Index: perl/epoc/epoc.c
--- perl/epoc/epoc.c#1~17645~   2002-07-19 12:29:57.000000000 -0700
+++ perl/epoc/epoc.c    2008-02-02 14:01:39.000000000 -0800
@@ -85,7 +85,7 @@
     }
 
     /* 
-     * If ptr != Nullch 
+     * If ptr != NULL 
      *   then it worked, set PV valid, 
      *   else return 'undef' 
      */

==== //depot/maint-5.8/perl/ext/B/B.xs#38 (text) ====
Index: perl/ext/B/B.xs
--- perl/ext/B/B.xs#37~33210~   2008-02-02 11:08:57.000000000 -0800
+++ perl/ext/B/B.xs     2008-02-02 14:01:39.000000000 -0800
@@ -1142,7 +1142,7 @@
 #define PADOP_sv(o)    (o->op_padix ? PAD_SVl(o->op_padix) : Nullsv)
 #define PADOP_gv(o)    ((o->op_padix \
                          && SvTYPE(PAD_SVl(o->op_padix)) == SVt_PVGV) \
-                        ? (GV*)PAD_SVl(o->op_padix) : Nullgv)
+                        ? (GV*)PAD_SVl(o->op_padix) : (GV *)NULL)
 
 MODULE = B     PACKAGE = B::PADOP              PREFIX = PADOP_
 

==== //depot/maint-5.8/perl/ext/Data/Dumper/Dumper.xs#20 (text) ====
Index: perl/ext/Data/Dumper/Dumper.xs
--- perl/ext/Data/Dumper/Dumper.xs#19~32296~    2007-11-12 15:04:43.000000000 
-0800
+++ perl/ext/Data/Dumper/Dumper.xs      2008-02-02 14:01:39.000000000 -0800
@@ -317,7 +317,7 @@
        if (SvOBJECT(ival))
            realpack = HvNAME_get(SvSTASH(ival));
        else
-           realpack = Nullch;
+           realpack = NULL;
 
        /* if it has a name, we need to either look it up, or keep a tab
         * on it so we know when we hit it later

==== //depot/maint-5.8/perl/ext/Opcode/Opcode.xs#11 (text) ====
Index: perl/ext/Opcode/Opcode.xs
--- perl/ext/Opcode/Opcode.xs#10~30641~ 2007-03-19 14:48:55.000000000 -0700
+++ perl/ext/Opcode/Opcode.xs   2008-02-02 14:01:39.000000000 -0800
@@ -145,7 +145,7 @@
 static int
 verify_opset(pTHX_ SV *opset, int fatal)
 {
-    const char *err = Nullch;
+    const char *err = NULL;
     dMY_CXT;
 
     if      (!SvOK(opset))              err = "undefined";

==== //depot/maint-5.8/perl/ext/PerlIO/encoding/encoding.xs#10 (text) ====
Index: perl/ext/PerlIO/encoding/encoding.xs
--- perl/ext/PerlIO/encoding/encoding.xs#9~30340~       2007-02-17 
09:02:53.000000000 -0800
+++ perl/ext/PerlIO/encoding/encoding.xs        2008-02-02 14:01:39.000000000 
-0800
@@ -257,9 +257,9 @@
        STDCHAR *ptr = PerlIO_get_ptr(n);
        SSize_t use  = (avail >= 0) ? avail : 0;
        SV *uni;
-       char *s = Nullch;
+       char *s = NULL;
        STRLEN len = 0;
-       e->base.ptr = e->base.end = (STDCHAR *) Nullch;
+       e->base.ptr = e->base.end = (STDCHAR *) NULL;
        (void) PerlIOEncode_get_base(aTHX_ f);
        if (!e->dataSV)
            e->dataSV = newSV(0);

==== //depot/maint-5.8/perl/ext/PerlIO/scalar/scalar.xs#13 (text) ====
Index: perl/ext/PerlIO/scalar/scalar.xs
--- perl/ext/PerlIO/scalar/scalar.xs#12~30340~  2007-02-17 09:02:53.000000000 
-0800
+++ perl/ext/PerlIO/scalar/scalar.xs    2008-02-02 14:01:39.000000000 -0800
@@ -184,7 +184,7 @@
     if (PerlIOBase(f)->flags & PERLIO_F_CANREAD) {
        return (STDCHAR *) SvPV_nolen(s->var);
     }
-    return (STDCHAR *) Nullch;
+    return (STDCHAR *) NULL;
 }
 
 STDCHAR *
@@ -194,7 +194,7 @@
        PerlIOScalar *s = PerlIOSelf(f, PerlIOScalar);
        return PerlIOScalar_get_base(aTHX_ f) + s->posn;
     }
-    return (STDCHAR *) Nullch;
+    return (STDCHAR *) NULL;
 }
 
 SSize_t

==== //depot/maint-5.8/perl/ext/PerlIO/via/via.xs#15 (text) ====
Index: perl/ext/PerlIO/via/via.xs
--- perl/ext/PerlIO/via/via.xs#14~30340~        2007-02-17 09:02:53.000000000 
-0800
+++ perl/ext/PerlIO/via/via.xs  2008-02-02 14:01:39.000000000 -0800
@@ -489,7 +489,7 @@
            return (STDCHAR *) SvPVX(s->var);
        }
     }
-    return (STDCHAR *) Nullch;
+    return (STDCHAR *) NULL;
 }
 
 STDCHAR *
@@ -502,7 +502,7 @@
            return p;
        }
     }
-    return (STDCHAR *) Nullch;
+    return (STDCHAR *) NULL;
 }
 
 SSize_t

==== //depot/maint-5.8/perl/ext/Storable/Storable.xs#34 (text) ====
Index: perl/ext/Storable/Storable.xs
--- perl/ext/Storable/Storable.xs#33~33210~     2008-02-02 11:08:57.000000000 
-0800
+++ perl/ext/Storable/Storable.xs       2008-02-02 14:01:39.000000000 -0800
@@ -4450,7 +4450,7 @@
         * into the existing design.  -- RAM, 17/02/2001
         */
 
-       sv_magic(sv, rv, mtype, Nullch, 0);
+       sv_magic(sv, rv, mtype, (char *)NULL, 0);
        SvREFCNT_dec(rv);                       /* Undo refcnt inc from 
sv_magic() */
 
        return sv;
@@ -4647,7 +4647,7 @@
 
        sv_upgrade(tv, SVt_PVAV);
        AvREAL_off((AV *)tv);
-       sv_magic(tv, sv, 'P', Nullch, 0);
+       sv_magic(tv, sv, 'P', (char *)NULL, 0);
        SvREFCNT_dec(sv);                       /* Undo refcnt inc from 
sv_magic() */
 
        TRACEME(("ok (retrieve_tied_array at 0x%"UVxf")", PTR2UV(tv)));
@@ -4675,7 +4675,7 @@
                return (SV *) 0;                /* Failed */
 
        sv_upgrade(tv, SVt_PVHV);
-       sv_magic(tv, sv, 'P', Nullch, 0);
+       sv_magic(tv, sv, 'P', (char *)NULL, 0);
        SvREFCNT_dec(sv);                       /* Undo refcnt inc from 
sv_magic() */
 
        TRACEME(("ok (retrieve_tied_hash at 0x%"UVxf")", PTR2UV(tv)));
@@ -4707,7 +4707,7 @@
        }
 
        sv_upgrade(tv, SVt_PVMG);
-       sv_magic(tv, obj, 'q', Nullch, 0);
+       sv_magic(tv, obj, 'q', (char *)NULL, 0);
 
        if (obj) {
                /* Undo refcnt inc from sv_magic() */
@@ -4774,7 +4774,7 @@
        RLEN(idx);                                      /* Retrieve <idx> */
 
        sv_upgrade(tv, SVt_PVMG);
-       sv_magic(tv, sv, 'p', Nullch, idx);
+       sv_magic(tv, sv, 'p', (char *)NULL, idx);
        SvREFCNT_dec(sv);                       /* Undo refcnt inc from 
sv_magic() */
 
        return tv;

==== //depot/maint-5.8/perl/malloc.c#26 (text) ====
Index: perl/malloc.c
--- perl/malloc.c#25~31150~     2007-05-05 03:42:36.000000000 -0700
+++ perl/malloc.c       2008-02-02 14:01:39.000000000 -0800
@@ -379,9 +379,6 @@
 #    ifndef UVxf
 #      define UVxf                     "lx"
 #    endif
-#    ifndef Nullch
-#      define Nullch                   NULL
-#    endif
 #    ifndef MEM_ALIGNBYTES
 #      define MEM_ALIGNBYTES           4
 #    endif

==== //depot/maint-5.8/perl/op.c#227 (text) ====
Index: perl/op.c
--- perl/op.c#226~33211~        2008-02-02 12:21:10.000000000 -0800
+++ perl/op.c   2008-02-02 14:01:39.000000000 -0800
@@ -490,20 +490,22 @@
            PmopSTASH_free(cPMOPo);
        }
        cPMOPo->op_pmreplroot = NULL;
-        /* we use the "SAFE" version of the PM_ macros here
-         * since sv_clean_all might release some PMOPs
+        /* we use the same protection as the "SAFE" version of the PM_ macros
+         * here since sv_clean_all might release some PMOPs
          * after PL_regex_padav has been cleared
          * and the clearing of PL_regex_padav needs to
          * happen before sv_clean_all
          */
-       ReREFCNT_dec(PM_GETRE_SAFE(cPMOPo));
-       PM_SETRE_SAFE(cPMOPo, NULL);
 #ifdef USE_ITHREADS
        if(PL_regex_pad) {        /* We could be in destruction */
+           ReREFCNT_dec(PM_GETRE(cPMOPo));
             av_push((AV*) PL_regex_pad[0],(SV*) 
PL_regex_pad[(cPMOPo)->op_pmoffset]);
            SvREPADTMP_on(PL_regex_pad[(cPMOPo)->op_pmoffset]);
-            PM_SETRE(cPMOPo, (cPMOPo)->op_pmoffset);
+            PM_SETRE_OFFSET(cPMOPo, (cPMOPo)->op_pmoffset);
         }
+#else
+       ReREFCNT_dec(PM_GETRE(cPMOPo));
+       PM_SETRE(cPMOPo, NULL);
 #endif
 
        break;

==== //depot/maint-5.8/perl/op.h#41 (text) ====
Index: perl/op.h
--- perl/op.h#40~33204~ 2008-02-02 10:16:39.000000000 -0800
+++ perl/op.h   2008-02-02 14:01:39.000000000 -0800
@@ -292,17 +292,32 @@
 
 #ifdef USE_ITHREADS
 #define PM_GETRE(o)     
(INT2PTR(REGEXP*,SvIVX(PL_regex_pad[(o)->op_pmoffset])))
-#define PM_SETRE(o,r)   STMT_START { \
+/* The assignment is just to enforce type safety (or at least get a warning).
+ */
+#define PM_SETRE(o,r)  STMT_START {                                    \
+                            const REGEXP *const slosh = (r);           \
+                            PM_SETRE_OFFSET((o), PTR2IV(slosh));       \
+                        } STMT_END
+/* Actually you can assign any IV, not just an offset. And really should it be
+   UV? */
+#define PM_SETRE_OFFSET(o,iv) \
+                       STMT_START { \
                             SV* const sv = PL_regex_pad[(o)->op_pmoffset]; \
-                            sv_setiv(sv, PTR2IV(r)); \
+                            sv_setiv(sv, (iv)); \
                         } STMT_END
+
+#  ifndef PERL_CORE
+/* No longer used anywhere in the core.  Migrate to Devel::PPPort?  */
 #define PM_GETRE_SAFE(o) (PL_regex_pad ? PM_GETRE(o) : (REGEXP*)0)
 #define PM_SETRE_SAFE(o,r) if (PL_regex_pad) PM_SETRE(o,r)
+#  endif
 #else
 #define PM_GETRE(o)     ((o)->op_pmregexp)
 #define PM_SETRE(o,r)   ((o)->op_pmregexp = (r))
+#  ifndef PERL_CORE
 #define PM_GETRE_SAFE PM_GETRE
 #define PM_SETRE_SAFE PM_SETRE
+#  endif
 #endif
 
 #define PMdf_USED      0x01            /* pm has been used once already */

==== //depot/maint-5.8/perl/perl.h#178 (text) ====
Index: perl/perl.h
--- perl/perl.h#177~33204~      2008-02-02 10:16:39.000000000 -0800
+++ perl/perl.h 2008-02-02 14:01:39.000000000 -0800
@@ -813,6 +813,11 @@
 #define PERL_ARENA_SIZE 4080
 #endif
 
+/* Maximum level of recursion */
+#ifndef PERL_SUB_DEPTH_WARN
+#define PERL_SUB_DEPTH_WARN 100
+#endif
+
 #endif /* PERL_CORE */
 
 #if !defined(OS2) && !defined(WIN32) && !defined(DJGPP) && !defined(EPOC) && 
!defined(__SYMBIAN32__) && !defined(MACOS_TRADITIONAL)

==== //depot/maint-5.8/perl/pod/perlapio.pod#6 (text) ====
Index: perl/pod/perlapio.pod
--- perl/pod/perlapio.pod#5~25370~      2005-09-10 06:47:01.000000000 -0700
+++ perl/pod/perlapio.pod       2008-02-02 14:01:39.000000000 -0800
@@ -486,7 +486,7 @@
 
 Portable cases are:
 
-    PerlIO_binmode(f,ptype,O_BINARY,Nullch);
+    PerlIO_binmode(f,ptype,O_BINARY,NULL);
 and
     PerlIO_binmode(f,ptype,O_TEXT,":crlf");
 

==== //depot/maint-5.8/perl/pp_ctl.c#186 (text) ====
Index: perl/pp_ctl.c
--- perl/pp_ctl.c#185~33213~    2008-02-02 13:34:53.000000000 -0800
+++ perl/pp_ctl.c       2008-02-02 14:01:39.000000000 -0800
@@ -185,7 +185,7 @@
        FREETMPS; /* Prevent excess tmp stack */
 
        /* Are we done */
-       if (cx->sb_once || !CALLREGEXEC(aTHX_ rx, s, cx->sb_strend, orig,
+       if (CxONCE(cx) || !CALLREGEXEC(aTHX_ rx, s, cx->sb_strend, orig,
                                     s == m, cx->sb_targ, NULL,
                                     ((cx->sb_rflags & REXEC_COPY_STR)
                                      ? (REXEC_IGNOREPOS|REXEC_NOT_FIRST)
@@ -1207,8 +1207,8 @@
     const I32 cxix = dopoptosub(cxstack_ix);
     assert(cxix >= 0);  /* We should only be called from inside subs */
 
-    if (cxstack[cxix].blk_sub.lval && CvLVALUE(cxstack[cxix].blk_sub.cv))
-       return cxstack[cxix].blk_sub.lval;
+    if (CxLVAL(cxstack + cxix) && CvLVALUE(cxstack[cxix].blk_sub.cv))
+       return CxLVAL(cxstack + cxix);
     else
        return 0;
 }
@@ -1499,11 +1499,11 @@
            SV * const sv = newSV(0);
            gv_efullname3(sv, cvgv, NULL);
            PUSHs(sv_2mortal(sv));
-           PUSHs(sv_2mortal(newSViv((I32)cx->blk_sub.hasargs)));
+           PUSHs(sv_2mortal(newSViv((I32)CxHASARGS(cx))));
        }
        else {
            PUSHs(sv_2mortal(newSVpvs("(unknown)")));
-           PUSHs(sv_2mortal(newSViv((I32)cx->blk_sub.hasargs)));
+           PUSHs(sv_2mortal(newSViv((I32)CxHASARGS(cx))));
        }
     }
     else {
@@ -1517,7 +1517,7 @@
        PUSHs(sv_2mortal(newSViv(gimme & G_ARRAY)));
     if (CxTYPE(cx) == CXt_EVAL) {
        /* eval STRING */
-       if (cx->blk_eval.old_op_type == OP_ENTEREVAL) {
+       if (CxOLD_OP_TYPE(cx) == OP_ENTEREVAL) {
            PUSHs(cx->blk_eval.cur_text);
            PUSHs(&PL_sv_no);
        }
@@ -1536,7 +1536,7 @@
        PUSHs(&PL_sv_undef);
        PUSHs(&PL_sv_undef);
     }
-    if (CxTYPE(cx) == CXt_SUB && cx->blk_sub.hasargs
+    if (CxTYPE(cx) == CXt_SUB && CxHASARGS(cx)
        && CopSTASH_eq(PL_curcop, PL_debstash))
     {
        AV * const ary = cx->blk_sub.argarray;
@@ -2201,7 +2201,7 @@
            }
            else if (CxMULTICALL(cx))
                DIE(aTHX_ "Can't goto subroutine from a sort sub (or similar 
callback)");
-           if (CxTYPE(cx) == CXt_SUB && cx->blk_sub.hasargs) {
+           if (CxTYPE(cx) == CXt_SUB && CxHASARGS(cx)) {
                /* put @_ back onto stack */
                AV* av = cx->blk_sub.argarray;
 
@@ -2288,7 +2288,7 @@
            else {
                AV* const padlist = CvPADLIST(cv);
                if (CxTYPE(cx) == CXt_EVAL) {
-                   PL_in_eval = cx->blk_eval.old_in_eval;
+                   PL_in_eval = CxOLD_IN_EVAL(cx);
                    PL_eval_root = cx->blk_eval.old_eval_root;
                    cx->cx_type = CXt_SUB;
                    cx->blk_sub.hasargs = 0;
@@ -2300,7 +2300,7 @@
                if (CvDEPTH(cv) < 2)
                    SvREFCNT_inc_simple_void_NN(cv);
                else {
-                   if (CvDEPTH(cv) == 100 && ckWARN(WARN_RECURSION))
+                   if (CvDEPTH(cv) == PERL_SUB_DEPTH_WARN && 
ckWARN(WARN_RECURSION))
                        sub_crush_depth(cv);
                    pad_push(padlist, CvDEPTH(cv), 1);
                }
@@ -2321,7 +2321,7 @@
                SAVECOMPPAD();
                PAD_SET_CUR_NOSAVE(padlist, CvDEPTH(cv));
 #ifndef USE_5005THREADS
-               if (cx->blk_sub.hasargs)
+               if (CxHASARGS(cx))
 #endif /* USE_5005THREADS */
                {
                    AV* const av = (AV*)PAD_SVl(0);

==== //depot/maint-5.8/perl/pp_hot.c#144 (text) ====
Index: perl/pp_hot.c
--- perl/pp_hot.c#143~33213~    2008-02-02 13:34:53.000000000 -0800
+++ perl/pp_hot.c       2008-02-02 14:01:39.000000000 -0800
@@ -2399,7 +2399,7 @@
 
     TAINT_NOT;
 
-    if (cx->blk_sub.lval & OPpENTERSUB_INARGS) {
+    if (CxLVAL(cx) & OPpENTERSUB_INARGS) {
        /* We are an argument to a function or grep().
         * This kind of lvalueness was legal before lvalue
         * subroutines too, so be backward compatible:
@@ -2426,7 +2426,7 @@
            }
        }
     }
-    else if (cx->blk_sub.lval) {     /* Leave it as it is if we can. */
+    else if (CxLVAL(cx)) {     /* Leave it as it is if we can. */
        /* Here we go for robustness, not for speed, so we change all
         * the refcounts so the caller gets a live guy. Cannot set
         * TEMP, so sv_2mortal is out of question. */
@@ -2937,7 +2937,7 @@
         * stuff so that __WARN__ handlers can safely dounwind()
         * if they want to
         */
-       if (CvDEPTH(cv) == 100 && ckWARN(WARN_RECURSION)
+       if (CvDEPTH(cv) == PERL_SUB_DEPTH_WARN && ckWARN(WARN_RECURSION)
            && !(PERLDB_SUB && cv == GvCV(PL_DBsub)))
            sub_crush_depth(cv);
 #if 0

==== //depot/maint-5.8/perl/proto.h#230 (text+w) ====
Index: perl/proto.h
--- perl/proto.h#229~33180~     2008-02-01 14:57:38.000000000 -0800
+++ perl/proto.h        2008-02-02 14:01:39.000000000 -0800
@@ -1929,7 +1929,13 @@
 STATIC void    S_del_sv(pTHX_ SV *p);
 #  endif
 #  if !defined(NV_PRESERVES_UV)
+#    ifdef DEBUGGING
 STATIC int     S_sv_2iuv_non_preserve(pTHX_ SV *sv, I32 numtype);
+#    else
+STATIC int     S_sv_2iuv_non_preserve(pTHX_ SV *sv)
+                       __attribute__nonnull__(pTHX_1);
+
+#    endif
 #  endif
 STATIC I32     S_expect_number(pTHX_ char** pattern)
                        __attribute__warn_unused_result__;

==== //depot/maint-5.8/perl/scope.c#71 (text) ====
Index: perl/scope.c
--- perl/scope.c#70~32417~      2007-11-20 05:39:23.000000000 -0800
+++ perl/scope.c        2008-02-02 14:01:39.000000000 -0800
@@ -1075,7 +1075,7 @@
        PerlIO_printf(Perl_debug_log, "BLK_SUB.DFOUTGV = 0x%"UVxf"\n",
                PTR2UV(cx->blk_sub.dfoutgv));
        PerlIO_printf(Perl_debug_log, "BLK_SUB.HASARGS = %d\n",
-               (int)cx->blk_sub.hasargs);
+                     (int)CxHASARGS(cx));
        break;
     case CXt_SUB:
        PerlIO_printf(Perl_debug_log, "BLK_SUB.CV = 0x%"UVxf"\n",
@@ -1083,16 +1083,15 @@
        PerlIO_printf(Perl_debug_log, "BLK_SUB.OLDDEPTH = %ld\n",
                (long)cx->blk_sub.olddepth);
        PerlIO_printf(Perl_debug_log, "BLK_SUB.HASARGS = %d\n",
-               (int)cx->blk_sub.hasargs);
-       PerlIO_printf(Perl_debug_log, "BLK_SUB.LVAL = %d\n",
-               (int)cx->blk_sub.lval);
+               (int)CxHASARGS(cx));
+       PerlIO_printf(Perl_debug_log, "BLK_SUB.LVAL = %d\n", (int)CxLVAL(cx));
        break;
     case CXt_EVAL:
        PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_IN_EVAL = %ld\n",
-               (long)cx->blk_eval.old_in_eval);
+               (long)CxOLD_IN_EVAL(cx));
        PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_OP_TYPE = %s (%s)\n",
-               PL_op_name[cx->blk_eval.old_op_type],
-               PL_op_desc[cx->blk_eval.old_op_type]);
+               PL_op_name[CxOLD_OP_TYPE(cx)],
+               PL_op_desc[CxOLD_OP_TYPE(cx)]);
        if (cx->blk_eval.old_namesv)
            PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_NAME = %s\n",
                          SvPVX_const(cx->blk_eval.old_namesv));
@@ -1101,8 +1100,7 @@
        break;
 
     case CXt_LOOP:
-       PerlIO_printf(Perl_debug_log, "BLK_LOOP.LABEL = %s\n",
-               cx->blk_loop.label);
+       PerlIO_printf(Perl_debug_log, "BLK_LOOP.LABEL = %s\n", CxLABEL(cx));
        PerlIO_printf(Perl_debug_log, "BLK_LOOP.RESETSP = %ld\n",
                (long)cx->blk_loop.resetsp);
        PerlIO_printf(Perl_debug_log, "BLK_LOOP.REDO_OP = 0x%"UVxf"\n",
@@ -1132,7 +1130,7 @@
        PerlIO_printf(Perl_debug_log, "SB_RFLAGS = %ld\n",
                (long)cx->sb_rflags);
        PerlIO_printf(Perl_debug_log, "SB_ONCE = %ld\n",
-               (long)cx->sb_once);
+               (long)CxONCE(cx));
        PerlIO_printf(Perl_debug_log, "SB_ORIG = %s\n",
                cx->sb_orig);
        PerlIO_printf(Perl_debug_log, "SB_DSTR = 0x%"UVxf"\n",

==== //depot/maint-5.8/perl/sv.c#378 (text) ====
Index: perl/sv.c
--- perl/sv.c#377~33213~        2008-02-02 13:34:53.000000000 -0800
+++ perl/sv.c   2008-02-02 14:01:39.000000000 -0800
@@ -1782,9 +1782,12 @@
 
 /* For sv_2nv these three cases are "SvNOK and don't bother casting"  */
 STATIC int
-S_sv_2iuv_non_preserve(pTHX_ register SV *sv, I32 numtype)
+S_sv_2iuv_non_preserve(pTHX_ register SV *sv
+#  ifdef DEBUGGING
+                      , I32 numtype
+#  endif
+                      )
 {
-    PERL_UNUSED_ARG(numtype); /* Used only under DEBUGGING? */
     DEBUG_c(PerlIO_printf(Perl_debug_log,"sv_2iuv_non '%s', IV=0x%"UVxf" 
NV=%"NVgf" inttype=%"UVXf"\n", SvPVX_const(sv), SvIVX(sv), SvNVX(sv), 
(UV)numtype));
     if (SvNVX(sv) < (NV)IV_MIN) {
        (void)SvIOKp_on(sv);
@@ -2056,7 +2059,11 @@
                          1      1       already read UV.
                        so there's no point in sv_2iuv_non_preserve() attempting
                        to use atol, strtol, strtoul etc.  */
+#  ifdef DEBUGGING
                     sv_2iuv_non_preserve (sv, numtype);
+#  else
+                    sv_2iuv_non_preserve (sv);
+#  endif
                 }
             }
 #endif /* NV_PRESERVES_UV */
@@ -9839,7 +9846,7 @@
                ncx->blk_sub.cv         = (ncx->blk_sub.olddepth == 0
                                           ? cv_dup_inc(ncx->blk_sub.cv, param)
                                           : cv_dup(ncx->blk_sub.cv,param));
-               ncx->blk_sub.argarray   = (ncx->blk_sub.hasargs
+               ncx->blk_sub.argarray   = (CxHASARGS(ncx)
                                           ? av_dup_inc(ncx->blk_sub.argarray,
                                                        param)
                                           : NULL);

==== //depot/maint-5.8/perl/win32/vdir.h#5 (text) ====
Index: perl/win32/vdir.h
--- perl/win32/vdir.h#4~32416~  2007-11-20 04:43:02.000000000 -0800
+++ perl/win32/vdir.h   2008-02-02 14:01:39.000000000 -0800
@@ -316,7 +316,7 @@
 
     /*
      * On WinNT GetFullPathName does not fail, (or at least always
-     * succeeds when the drive is valid) WinNT does set *Dest to Nullch
+     * succeeds when the drive is valid) WinNT does set *Dest to NULL
      * On Win98 GetFullPathName will set last error if it fails, but
      * does not touch *Dest
      */
@@ -544,7 +544,7 @@
 
     /*
      * On WinNT GetFullPathName does not fail, (or at least always
-     * succeeds when the drive is valid) WinNT does set *Dest to Nullch
+     * succeeds when the drive is valid) WinNT does set *Dest to NULL
      * On Win98 GetFullPathName will set last error if it fails, but
      * does not touch *Dest
      */
End of Patch.

Reply via email to