up patchlevel &c
[p5sagit/p5-mst-13.2.git] / dump.c
diff --git a/dump.c b/dump.c
index 8f90e60..cc6682a 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -279,8 +279,12 @@ sv_peek(SV *sv)
        SET_NUMERIC_STANDARD();
        sv_catpvf(t, "(%g)",SvNVX(sv));
     }
-    else if (SvIOKp(sv))
-       sv_catpvf(t, "(%ld)",(long)SvIVX(sv));
+    else if (SvIOKp(sv)) {             /* XXXX: IV, UV? */
+       if (SvIsUV(sv))
+           sv_catpvf(t, "(%lu)",(unsigned long)SvUVX(sv));
+       else
+            sv_catpvf(t, "(%ld)",(long)SvIVX(sv));
+    }
     else
        sv_catpv(t, "()");
     
@@ -477,6 +481,8 @@ do_op_dump(I32 level, PerlIO *file, OP *o)
        else if (o->op_type == OP_CONST) {
            if (o->op_private & OPpCONST_BARE)
                sv_catpv(tmpsv, ",BARE");
+           if (o->op_private & OPpCONST_STRICT)
+               sv_catpv(tmpsv, ",STRICT");
        }
        else if (o->op_type == OP_FLIP) {
            if (o->op_private & OPpFLIP_LINENUM)
@@ -634,6 +640,7 @@ do_magic_dump(I32 level, PerlIO *file, MAGIC *mg, I32 nest, I32 maxnest, bool du
 #endif
            else if (v == &PL_vtbl_amagic)     s = "amagic";
            else if (v == &PL_vtbl_amagicelem) s = "amagicelem";
+           else if (v == &PL_vtbl_backref)    s = "backref";
            if (s)
                dump_indent(level, file, "    MG_VIRTUAL = &PL_vtbl_%s\n", s);
            else
@@ -762,7 +769,10 @@ do_sv_dump(I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bool dumpops,
     if (flags & SVf_IOK)       sv_catpv(d, "IOK,");
     if (flags & SVf_NOK)       sv_catpv(d, "NOK,");
     if (flags & SVf_POK)       sv_catpv(d, "POK,");
-    if (flags & SVf_ROK)       sv_catpv(d, "ROK,");
+    if (flags & SVf_ROK)  {    
+                               sv_catpv(d, "ROK,");
+       if (SvWEAKREF(sv))      sv_catpv(d, "WEAKREF,");
+    }
     if (flags & SVf_OOK)       sv_catpv(d, "OOK,");
     if (flags & SVf_FAKE)      sv_catpv(d, "FAKE,");
     if (flags & SVf_READONLY)  sv_catpv(d, "READONLY,");
@@ -781,6 +791,7 @@ do_sv_dump(I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bool dumpops,
        if (CvCLONE(sv))        sv_catpv(d, "CLONE,");
        if (CvCLONED(sv))       sv_catpv(d, "CLONED,");
        if (CvNODEBUG(sv))      sv_catpv(d, "NODEBUG,");
+       if (SvCOMPILED(sv))     sv_catpv(d, "COMPILED,");
        break;
     case SVt_PVHV:
        if (HvSHAREKEYS(sv))    sv_catpv(d, "SHAREKEYS,");
@@ -803,9 +814,14 @@ do_sv_dump(I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bool dumpops,
                sv_catpv(d, " ),");
            }
        }
+       /* FALL THROGH */
+    default:
+       if (SvEVALED(sv))       sv_catpv(d, "EVALED,");
+       if (SvIsUV(sv))         sv_catpv(d, "IsUV,");
+       break;
     case SVt_PVBM:
        if (SvTAIL(sv))         sv_catpv(d, "TAIL,");
-       if (SvCOMPILED(sv))     sv_catpv(d, "COMPILED,");
+       if (SvVALID(sv))        sv_catpv(d, "VALID,");
        break;
     }
 
@@ -869,7 +885,10 @@ do_sv_dump(I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bool dumpops,
        return;
     }
     if (type >= SVt_PVIV || type == SVt_IV) {
-       dump_indent(level, file, "  IV = %ld", (long)SvIVX(sv));
+       if (SvIsUV(sv))
+           dump_indent(level, file, "  UV = %lu", (unsigned long)SvUVX(sv));
+       else
+           dump_indent(level, file, "  IV = %ld", (long)SvIVX(sv));
        if (SvOOK(sv))
            PerlIO_printf(file, "  (OFFSET)");
        PerlIO_putc(file, '\n');