summaryrefslogtreecommitdiff
path: root/dump.c
diff options
context:
space:
mode:
authorCharles Bailey <bailey@newman.upenn.edu>2000-01-20 00:25:30 +0000
committerbailey <bailey@newman.upenn.edu>2000-01-20 00:25:30 +0000
commit146174a91a192983720a158796dc066226ad0e55 (patch)
tree6e7f2035aae6d864035ea40ad9821bab4d0bad93 /dump.c
parentc529f79d594c53d3968d464c57ac24a21137dd09 (diff)
downloadperl-146174a91a192983720a158796dc066226ad0e55.tar.gz
Quick integration of mainline changes to date
p4raw-id: //depot/vmsperl@4821 p4raw-branched: from //depot/perl@4249 'branch in' eg/cgi/dna_small_gif.uu eg/cgi/wilogo_gif.uu epoc/config.sh epoc/epocish.c epoc/link.pl ext/DB_File/hints/sco.pl ext/DynaLoader/XSLoader_pm.PL ext/DynaLoader/hints/aix.pl ext/DynaLoader/hints/openbsd.pl ext/File/Glob/Makefile.PL ext/File/Glob/TODO ext/IPC/SysV/hints/cygwin.pl ext/NDBM_File/hints/cygwin.pl ext/NDBM_File/hints/sco.pl ext/ODBM_File/hints/cygwin.pl lib/byte.pm lib/byte_heavy.pl lib/unicode/Jamo.txt lib/unicode/NamesList.html lib/unicode/UCD300.html lib/unicode/Unicode.300 lib/unicode/Unicode3.html os2/OS2/REXX/DLL/Changes os2/OS2/REXX/DLL/DLL.pm os2/OS2/REXX/DLL/DLL.xs os2/OS2/REXX/DLL/MANIFEST os2/OS2/REXX/DLL/Makefile.PL os2/OS2/REXX/t/rx_emxrv.t t/lib/glob-case.t t/lib/glob-taint.t t/pod/multiline_items.xr t/pod/pod2usage.xr t/pod/podselect.xr win32/vmem.h t/pod/multiline_items.t t/pod/pod2usage.t t/pod/podselect.t (@4280..) pod/perlhack.pod (@4340..) ext/File/Glob/Changes ext/File/Glob/Glob.xs t/lib/glob-global.t (@4356..) t/lib/glob-basic.t (@4393..) lib/Pod/Man.pm (@4404..) pod/perlfilter.pod (@4406..) t/io/nargv.t (@4503..) ext/File/Glob/bsd_glob.c ext/File/Glob/bsd_glob.h (@4514..) epoc/createpkg.pl epoc/epoc_stubs.c (@4556..) lib/unicode/Eq/Latin1.pl lib/unicode/Eq/Unicode.pl lib/unicode/In/BopomofoExtended.pl lib/unicode/In/BraillePatterns.pl lib/unicode/In/CJKRadicalsSupplement.pl lib/unicode/In/CJKUnifiedIdeographsExtensionA.pl lib/unicode/In/Cherokee.pl lib/unicode/In/IdeographicDescriptionCharacters.pl lib/unicode/In/KangxiRadicals.pl lib/unicode/In/Khmer.pl lib/unicode/In/Mongolian.pl lib/unicode/In/Myanmar.pl lib/unicode/In/Ogham.pl lib/unicode/In/Runic.pl lib/unicode/In/Sinhala.pl lib/unicode/In/Syriac.pl lib/unicode/In/Thaana.pl lib/unicode/In/UnifiedCanadianAboriginalSyllabics.pl lib/unicode/In/YiRadicals.pl lib/unicode/In/YiSyllables.pl (@4573..) pod/perlfork.pod (@4602..) ext/File/Glob/Glob.pm (@4615..) win32/genmk95.pl (@4653..) win32/vdir.h (@4702..) win32/perlhost.h (@4789..) p4raw-deleted: from //depot/perl@4249 'delete in' eg/cgi/dna.small.gif.uu eg/cgi/wilogo.gif.uu (@2830..) os2/POSIX.mkfifo (@3518..) lib/warning.pm warning.h (@4008..) lib/unicode/Jamo-2.txt lib/unicode/UnicodeData-Latest.txt (@4184..) lib/unicode/Unicode.html (@4209..) lib/unicode/Eq/Latin1 lib/unicode/Eq/Unicode (@4228..) lib/Pod/PlainText.pm (@4280..) ext/DynaLoader/dl_cygwin.xs (@4302..) epoc/config.h (@4475..) epoc/perl.mmp epoc/perl.pkg (@4556..) p4raw-integrated: from //depot/perl@4249 'copy in' ext/B/NOTES ext/B/ramblings/runtime.porting (@562..) hints/amigaos.sh (@575..) lib/Net/Ping.pm (@854..) lib/strict.pm (@988..) ext/Thread/Thread/Queue.pm (@1085..) ext/Thread/Thread/Semaphore.pm (@1086..) lib/ExtUtils/Installed.pm (@1315..) plan9/plan9ish.h (@1451..) mpeix/mpeixish.h (@1478..) Porting/p4d2p (@1485..) ext/ODBM_File/hints/sco.pl ext/Thread/sync.t ext/Thread/sync2.t hints/lynxos.sh lib/Text/Tabs.pm os2/OS2/REXX/Changes os2/OS2/REXX/t/rx_dllld.t os2/OS2/REXX/t/rx_objcall.t os2/OS2/REXX/t/rx_tievar.t os2/OS2/REXX/t/rx_tieydb.t os2/OS2/REXX/t/rx_vrexx.t os2/dl_os2.c t/comp/term.t t/io/print.t t/op/glob.t util.h win32/bin/perlglob.pl (@1575..) ext/B/O.pm (@1617..) ext/Thread/typemap lib/File/DosGlob.pm (@1760..) t/op/substr.t (@1780..) vos/vosish.h (@1838..) lib/ExtUtils/Mkbootstrap.pm (@1932..) Porting/genlog (@1978..) lib/constant.pm (@2029..) t/op/array.t (@2210..) lib/Math/Complex.pm (@2219..) hints/dynixptx.sh (@2318..) ext/IO/IO.pm (@2354..) hints/mint.sh lib/Tie/Array.pm lib/Tie/Hash.pm (@2620..) os2/Changes (@2695..) globvar.sym (@2746..) t/comp/bproto.t (@2817..) lib/DB.pm (@2820..) hints/mpeix.sh lib/FindBin.pm (@2830..) ext/IO/lib/IO/Select.pm (@2882..) t/lib/english.t (@2891..) t/op/subst.t (@2892..) t/op/range.t (@2923..) pod/perl5005delta.pod (@2929..) hints/next_3.sh hints/next_3_0.sh (@3023..) lib/Getopt/Std.pm (@3034..) lib/File/Spec.pm (@3042..) t/pragma/warn/1global (@3096..) t/pod/emptycmd.t t/pod/for.t t/pod/for.xr t/pod/headings.t t/pod/headings.xr t/pod/include.t t/pod/include.xr t/pod/included.t t/pod/included.xr t/pod/lref.t t/pod/lref.xr t/pod/nested_items.t t/pod/nested_items.xr t/pod/nested_seqs.t t/pod/nested_seqs.xr t/pod/oneline_cmds.t t/pod/oneline_cmds.xr t/pod/testcmp.pl (@3129..) README.hurd (@3148..) ext/re/re.pm (@3152..) lib/ExtUtils/Liblist.pm t/comp/require.t (@3153..) Porting/p4desc (@3183..) Porting/pumpkin.pod hints/linux.sh myconfig.SH (@3267..) t/op/readdir.t (@3299..) t/pod/special_seqs.t t/pod/special_seqs.xr (@3304..) t/lib/fields.t (@3335..) t/op/taint.t (@3357..) lib/File/Copy.pm (@3362..) installhtml (@3371..) ext/Socket/Socket.pm (@3391..) t/lib/ipc_sysv.t t/op/nothread.t (@3399..) lib/CPAN/FirstTime.pm (@3458..) pod/perlfaq8.pod (@3459..) pod/perlcall.pod pod/perlipc.pod pod/perltie.pod pod/perlxs.pod (@3460..) t/pragma/strict-subs (@3514..) ext/ByteLoader/ByteLoader.pm lib/Math/BigFloat.pm (@3516..) x2p/walk.c (@3518..) win32/win32thread.c win32/win32thread.h (@3525..) os2/OS2/REXX/REXX.xs (@3531..) utf8.h (@3537..) lib/ExtUtils/Embed.pm (@3553..) ext/Thread/Thread/Specific.pm (@3564..) ext/POSIX/Makefile.PL lib/Cwd.pm (@3582..) hv.h (@3602..) ext/NDBM_File/NDBM_File.pm ext/ODBM_File/ODBM_File.pm ext/SDBM_File/SDBM_File.pm (@3603..) lib/Sys/Hostname.pm (@3631..) os2/os2.c (@3640..) emacs/ptags miniperlmain.c (@3660..) ext/IO/IO.xs win32/config_h.PL win32/dl_win32.xs win32/runperl.c win32/win32sck.c (@3667..) pod/Win32.pod pod/perlfaq4.pod pod/perltodo.pod (@3676..) lib/vars.pm (@3686..) lib/ExtUtils/Manifest.pm (@3693..) hints/README.hints hints/epix.sh hints/esix4.sh hints/next_4.sh (@3753..) ext/GDBM_File/GDBM_File.pm lib/CPAN.pm pod/perllocale.pod (@3754..) lib/bigfloat.pl (@3759..) lib/Pod/Text/Color.pm lib/Pod/Text/Termcap.pm pod/pod2text.PL (@3788..) ext/POSIX/POSIX.pm lib/AutoLoader.pm (@3794..) Porting/makerel (@3797..) t/lib/io_unix.t (@3825..) EXTERN.h Porting/patchls ext/SDBM_File/sdbm/pair.c makedepend.SH (@3852..) lib/File/Spec/Unix.pm unixish.h (@3855..) lib/ExtUtils/Mksymlists.pm (@3856..) t/pragma/utf8.t (@3892..) README (@3901..) t/op/eval.t (@3988..) MAINTAIN ext/B/B/Stash.pm ext/ByteLoader/ByteLoader.xs ext/Fcntl/Fcntl.xs ext/SDBM_File/Makefile.PL lib/Math/Trig.pm os2/OS2/REXX/Makefile.PL perlsdio.h regnodes.h utils/perlbug.PL (@4008..) epoc/epoc.c pod/perltoc.pod pod/perlvar.pod regexp.h t/lib/attrs.t t/op/time.t t/pragma/warn/2use t/pragma/warn/3both t/pragma/warn/7fatal universal.c warnings.h warnings.pl (@4076..) ext/Opcode/Opcode.pm ext/attrs/attrs.xs t/pragma/warn/pp_ctl (@4081..) t/pragma/warn/pp_sys (@4088..) t/pragma/sub_lval.t (@4090..) t/TEST (@4092..) xsutils.c (@4101..) pod/buildtoc (@4120..) djgpp/config.over djgpp/djgppsed.sh pod/pod2usage.PL pod/podselect.PL (@4121..) lib/Pod/Html.pm (@4122..) av.h (@4123..) t/pragma/locale.t (@4130..) pod/perldata.pod (@4131..) pod/perllexwarn.pod (@4132..) ext/B/typemap ext/DB_File/DB_File.pm lib/ExtUtils/typemap (@4142..) ext/B/Makefile.PL t/lib/bigfltpm.t (@4149..) lib/ExtUtils/MM_VMS.pm vms/descrip_mms.template (@4182..) ext/DynaLoader/dl_vmesa.xs ext/DynaLoader/dl_vms.xs lib/unicode/ReadMe.txt pod/perlsyn.pod t/op/groups.t (@4184..) t/pragma/warn/op (@4189..) thrdvar.h (@4197..) ext/B/B/Terse.pm (@4199..) t/lib/posix.t (@4223..) keywords.h keywords.pl pod/perlfaq3.pod pod/perlsub.pod t/pragma/strict-vars (@4227..) pod/perlfaq9.pod (@4228..) djgpp/configure.bat lib/Exporter/Heavy.pm (@4242..) Porting/findvars lib/ExtUtils/xsubpp pod/perlguts.pod t/lib/filecopy.t (@4271..) ext/attrs/attrs.pm (@4278..) t/op/avhv.t (@4279..) lib/Pod/Checker.pm lib/Pod/InputObjects.pm t/pod/testp2pt.pl (@4280..) lib/Pod/Usage.pm pod/podchecker.PL t/pod/poderrs.t t/pod/poderrs.xr t/pod/testpchk.pl (@4281..) lib/Pod/Text.pm pod/pod2man.PL (@4282..) ext/Devel/Peek/Peek.xs ext/DynaLoader/dl_beos.xs ext/DynaLoader/dl_dld.xs ext/DynaLoader/dl_mpeix.xs ext/DynaLoader/dlutils.c perlio.c (@4302..) ext/B/defsubs_h.PL t/pragma/constant.t (@4303..) ext/Thread/Thread.xs (@4316..) ext/Thread/Thread.pm (@4328..) lib/Exporter.pm (@4331..) ext/DynaLoader/dl_aix.xs (@4336..) pod/Makefile pod/roffitall (@4340..) lib/lib.pm (@4343..) pod/perlref.pod (@4345..) perly.y perly_c.diff (@4350..) t/lib/safe2.t (@4353..) hints/svr5.sh (@4377..) pod/perlfaq2.pod (@4383..) lib/Benchmark.pm (@4384..) win32/include/dirent.h (@4385..) pod/perlopentut.pod (@4390..) hints/os2.sh os2/Makefile.SHs (@4393..) lib/Pod/Parser.pm lib/Pod/Select.pm (@4400..) malloc.c (@4402..) pod/perlmodlib.pod (@4404..) perlvars.h (@4409..) t/op/sort.t (@4418..) t/op/int.t (@4430..) os2/OS2/REXX/REXX.pm t/io/fs.t t/op/magic.t (@4432..) lib/File/Path.pm (@4433..) t/op/lex_assign.t (@4436..) lib/attributes.pm (@4437..) pod/perlop.pod (@4438..) ext/POSIX/POSIX.xs (@4448..) Policy_sh.SH ext/Data/Dumper/Dumper.xs hints/dec_osf.sh t/lib/charnames.t (@4475..) lib/Time/Local.pm (@4481..) cv.h ext/B/B/Xref.pm (@4485..) doop.c handy.h hints/irix_6.sh pp.h taint.c (@4496..) deb.c (@4505..) dosish.h os2/os2ish.h perly.c vms/perly_c.vms (@4511..) ext/B/B/Lint.pm pod/perlmod.pod pod/perlrun.pod (@4515..) bytecode.pl ext/B/B.pm ext/B/B/Asmdata.pm ext/B/B/CC.pm ext/B/B/Debug.pm ext/B/B/Deparse.pm ext/ByteLoader/bytecode.h ext/ByteLoader/byterun.c ext/ByteLoader/byterun.h ext/Devel/Peek/Peek.pm gv.h (@4545..) README.epoc epoc/epocish.h ext/B/B.xs ext/Fcntl/Fcntl.pm hints/hpux.sh t/lib/syslfs.t t/op/lfs.t t/op/pat.t (@4556..) ext/DynaLoader/DynaLoader_pm.PL hints/solaris_2.sh lib/unicode/Is/SylA.pl lib/unicode/Is/SylC.pl lib/unicode/Is/SylE.pl lib/unicode/Is/SylI.pl lib/unicode/Is/SylO.pl lib/unicode/Is/SylU.pl lib/unicode/Is/SylV.pl lib/unicode/Is/SylWA.pl lib/unicode/Is/SylWC.pl lib/unicode/Is/SylWE.pl lib/unicode/Is/SylWI.pl lib/unicode/Is/SylWV.pl lib/unicode/mktables.PL t/op/pack.t t/op/regexp.t utils/h2xs.PL utils/perldoc.PL vms/vms.c vms/vmsish.h win32/win32iop.h (@4573..) t/lib/dumper.t t/pragma/overload.t (@4574..) ext/Errno/Errno_pm.PL ext/IO/lib/IO/Socket.pm (@4575..) t/op/misc.t (@4578..) ext/Opcode/Opcode.xs (@4579..) cop.h (@4588..) lib/perl5db.pl (@4601..) XSUB.h globals.c pod/perl.pod run.c scope.c (@4602..) op.h win32/perllib.c (@4603..) AUTHORS pod/perlport.pod t/op/runlevel.t (@4604..) scope.h (@4605..) README.vms hints/aix.sh vms/subconfigure.com (@4606..) pod/perlxstut.pod (@4620..) regcomp.h (@4622..) ext/Devel/DProf/DProf.pm ext/DynaLoader/Makefile.PL (@4623..) pod/perltrap.pod (@4630..) ext/B/B/Bytecode.pm (@4631..) opcode.h opcode.pl t/pragma/warn/4lint t/pragma/warn/doio t/pragma/warn/pp_hot (@4641..) mg.c (@4658..) iperlsys.h (@4660..) ext/B/B/C.pm (@4662..) pod/perlre.pod (@4666..) embedvar.h (@4668..) t/lib/filefind.t (@4671..) intrpvar.h (@4672..) ext/DynaLoader/dl_hpux.xs ext/DynaLoader/dl_next.xs ext/DynaLoader/dl_rhapsody.xs (@4686..) lib/File/Find.pm (@4687..) cygwin/Makefile.SHs (@4688..) t/op/re_tests (@4693..) hv.c (@4694..) t/op/delete.t (@4695..) utf8.c (@4698..) thread.h (@4704..) pod/perldiag.pod pp_sys.c (@4709..) Makefile.SH (@4712..) hints/cygwin.sh t/op/stat.t (@4717..) README.os2 lib/ExtUtils/Install.pm (@4720..) t/pragma/warn/doop t/pragma/warn/pp t/pragma/warn/regcomp t/pragma/warn/sv t/pragma/warn/toke t/pragma/warn/utf8 (@4721..) lib/diagnostics.pm (@4722..) regcomp.c (@4724..) configpm pp_ctl.c sv.h (@4726..) global.sym (@4727..) INTERN.h README.win32 lib/ExtUtils/MM_Win32.pm makedef.pl (@4729..) t/io/argv.t (@4732..) doio.c pp_hot.c (@4736..) toke.c (@4740..) gv.c (@4742..) win32/win32.h (@4743..) ext/Devel/DProf/DProf.xs objXSUB.h (@4744..) ext/Data/Dumper/Dumper.pm (@4745..) embed.h embed.pl ext/DynaLoader/dl_dlopen.xs proto.h (@4746..) pp.c (@4747..) sv.c (@4749..) lib/ExtUtils/MM_Unix.pm lib/ExtUtils/MakeMaker.pm (@4754..) util.c utils/perlcc.PL (@4755..) t/io/open.t (@4757..) regexec.c (@4759..) MANIFEST installman (@4769..) Porting/Glossary (@4771..) t/lib/thread.t (@4772..) Changes INSTALL Porting/config.sh Porting/config_H config_h.SH installperl patchlevel.h win32/config.bc win32/config.gc win32/config.vc win32/config_sh.PL win32/win32.c (@4773..) win32/Makefile win32/config_H.bc win32/config_H.gc win32/config_H.vc win32/makefile.mk (@4774..) perl.c (@4779..) t/op/fork.t (@4791..) av.c pod/perldelta.pod (@4796..) pod/perlfunc.pod (@4799..) dump.c (@4800..) op.c (@4801..) perl.h (@4805..) Configure (@4814..) 'merge in' configure.com (@4767..)
Diffstat (limited to 'dump.c')
-rw-r--r--dump.c367
1 files changed, 112 insertions, 255 deletions
diff --git a/dump.c b/dump.c
index 7f1dba499c..ee64af5b89 100644
--- a/dump.c
+++ b/dump.c
@@ -30,7 +30,7 @@ void
Perl_dump_vindent(pTHX_ I32 level, PerlIO *file, const char* pat, va_list *args)
{
dTHR;
- PerlIO_printf(file, "%*s", level*PL_dumpindent, "");
+ PerlIO_printf(file, "%*s", (int)(level*PL_dumpindent), "");
PerlIO_vprintf(file, pat, *args);
}
@@ -283,18 +283,11 @@ Perl_sv_peek(pTHX_ SV *sv)
Perl_sv_catpvf(aTHX_ t, "(%g)",SvNVX(sv));
RESTORE_NUMERIC_LOCAL();
}
- else if (SvIOKp(sv)) { /* XXXX: IV, UV? */
-#ifdef IV_IS_QUAD
+ else if (SvIOKp(sv)) {
if (SvIsUV(sv))
- Perl_sv_catpvf(aTHX_ t, "(%" PERL_PRIu64 ")",(UV)SvUVX(sv));
+ Perl_sv_catpvf(aTHX_ t, "(%"UVuf")", (UV)SvUVX(sv));
else
- Perl_sv_catpvf(aTHX_ t, "(%" PERL_PRId64 ")",(IV)SvIVX(sv));
-#else
- if (SvIsUV(sv))
- Perl_sv_catpvf(aTHX_ t, "(%lu)",(unsigned long)SvUVX(sv));
- else
- Perl_sv_catpvf(aTHX_ t, "(%ld)",(long)SvIVX(sv));
-#endif
+ Perl_sv_catpvf(aTHX_ t, "(%"IVdf")", (IV)SvIVX(sv));
}
else
sv_catpv(t, "()");
@@ -384,7 +377,9 @@ Perl_do_op_dump(pTHX_ I32 level, PerlIO *file, OP *o)
PerlIO_printf(file, "%-4d", o->op_seq);
else
PerlIO_printf(file, " ");
- PerlIO_printf(file, "%*sTYPE = %s ===> ", PL_dumpindent*level-4, "", PL_op_name[o->op_type]);
+ PerlIO_printf(file,
+ "%*sTYPE = %s ===> ",
+ (int)(PL_dumpindent*level-4), "", PL_op_name[o->op_type]);
if (o->op_next) {
if (o->op_seq)
PerlIO_printf(file, "%d\n", o->op_next->op_seq);
@@ -400,11 +395,7 @@ Perl_do_op_dump(pTHX_ I32 level, PerlIO *file, OP *o)
Perl_dump_indent(aTHX_ level, file, "TARG = %d\n", o->op_targ);
}
#ifdef DUMPADDR
-#ifdef IV_IS_QUAD
- Perl_dump_indent(aTHX_ level, file, "ADDR = 0x%" PERL_PRIx64 " => 0x%" PERL_PRIx64 "\n", (IV)o, (IV)o->op_next);
-#else
- Perl_dump_indent(aTHX_ level, file, "ADDR = 0x%lx => 0x%lx\n", (long)o, (long)o->op_next);
-#endif
+ Perl_dump_indent(aTHX_ level, file, "ADDR = 0x%"UVxf" => 0x%"UVxf"\n", (UV)o, (UV)o->op_next);
#endif
if (o->op_flags) {
SV *tmpsv = newSVpvn("", 0);
@@ -494,6 +485,8 @@ Perl_do_op_dump(pTHX_ I32 level, PerlIO *file, OP *o)
else {
if (o->op_private & HINT_STRICT_REFS)
sv_catpv(tmpsv, ",STRICT_REFS");
+ if (o->op_private & OPpOUR_INTRO)
+ sv_catpv(tmpsv, ",OUR_INTRO");
}
}
else if (o->op_type == OP_CONST) {
@@ -521,30 +514,41 @@ Perl_do_op_dump(pTHX_ I32 level, PerlIO *file, OP *o)
}
switch (o->op_type) {
+ case OP_AELEMFAST:
case OP_GVSV:
case OP_GV:
- if (cGVOPo->op_gv) {
+#ifdef USE_ITHREADS
+ Perl_dump_indent(aTHX_ level, file, "PADIX = %d\n", cPADOPo->op_padix);
+#else
+ if (cSVOPo->op_sv) {
SV *tmpsv = NEWSV(0,0);
ENTER;
SAVEFREESV(tmpsv);
- gv_fullname3(tmpsv, cGVOPo->op_gv, Nullch);
+ gv_fullname3(tmpsv, (GV*)cSVOPo->op_sv, Nullch);
Perl_dump_indent(aTHX_ level, file, "GV = %s\n", SvPV(tmpsv, n_a));
LEAVE;
}
else
Perl_dump_indent(aTHX_ level, file, "GV = NULL\n");
+#endif
break;
case OP_CONST:
+ Perl_dump_indent(aTHX_ level, file, "SV = %s\n", SvPEEK(cSVOPo_sv));
+ break;
case OP_METHOD_NAMED:
Perl_dump_indent(aTHX_ level, file, "SV = %s\n", SvPEEK(cSVOPo->op_sv));
break;
case OP_SETSTATE:
case OP_NEXTSTATE:
case OP_DBSTATE:
- if (cCOPo->cop_line)
- Perl_dump_indent(aTHX_ level, file, "LINE = %d\n",cCOPo->cop_line);
+ if (CopLINE(cCOPo))
+ Perl_dump_indent(aTHX_ level, file, "LINE = %d\n",CopLINE(cCOPo));
+ if (CopSTASHPV(cCOPo))
+ Perl_dump_indent(aTHX_ level, file, "PACKAGE = \"%s\"\n",
+ CopSTASHPV(cCOPo));
if (cCOPo->cop_label)
- Perl_dump_indent(aTHX_ level, file, "LABEL = \"%s\"\n",cCOPo->cop_label);
+ Perl_dump_indent(aTHX_ level, file, "LABEL = \"%s\"\n",
+ cCOPo->cop_label);
break;
case OP_ENTERLOOP:
Perl_dump_indent(aTHX_ level, file, "REDO ===> ");
@@ -581,6 +585,15 @@ Perl_do_op_dump(pTHX_ I32 level, PerlIO *file, OP *o)
case OP_SUBST:
do_pmop_dump(level, file, cPMOPo);
break;
+ case OP_LEAVE:
+ case OP_LEAVEEVAL:
+ case OP_LEAVESUB:
+ case OP_LEAVESUBLV:
+ case OP_LEAVEWRITE:
+ case OP_SCOPE:
+ if (o->op_private & OPpREFCOUNTED)
+ Perl_dump_indent(aTHX_ level, file, "REFCNT = %"UVuf"\n", (UV)o->op_targ);
+ break;
default:
break;
}
@@ -623,7 +636,8 @@ void
Perl_do_magic_dump(pTHX_ I32 level, PerlIO *file, MAGIC *mg, I32 nest, I32 maxnest, bool dumpops, STRLEN pvlim)
{
for (; mg; mg = mg->mg_moremagic) {
- Perl_dump_indent(aTHX_ level, file, " MAGIC = 0x%lx\n", (long)mg);
+ Perl_dump_indent(aTHX_ level, file,
+ " MAGIC = 0x%"UVxf"\n", PTR2UV(mg));
if (mg->mg_virtual) {
MGVTBL *v = mg->mg_virtual;
char *s = 0;
@@ -657,7 +671,7 @@ Perl_do_magic_dump(pTHX_ I32 level, PerlIO *file, MAGIC *mg, I32 nest, I32 maxne
if (s)
Perl_dump_indent(aTHX_ level, file, " MG_VIRTUAL = &PL_vtbl_%s\n", s);
else
- Perl_dump_indent(aTHX_ level, file, " MG_VIRTUAL = 0x%lx\n", (long)v);
+ Perl_dump_indent(aTHX_ level, file, " MG_VIRTUAL = 0x%"UVxf"\n", PTR2UV(v));
}
else
Perl_dump_indent(aTHX_ level, file, " MG_VIRTUAL = 0\n");
@@ -682,14 +696,14 @@ Perl_do_magic_dump(pTHX_ I32 level, PerlIO *file, MAGIC *mg, I32 nest, I32 maxne
Perl_dump_indent(aTHX_ level, file, " MINMATCH\n");
}
if (mg->mg_obj) {
- Perl_dump_indent(aTHX_ level, file, " MG_OBJ = 0x%lx\n", (long)mg->mg_obj);
+ Perl_dump_indent(aTHX_ level, file, " MG_OBJ = 0x%"UVxf"\n", PTR2UV(mg->mg_obj));
if (mg->mg_flags & MGf_REFCOUNTED)
do_sv_dump(level+2, file, mg->mg_obj, nest+1, maxnest, dumpops, pvlim); /* MG is already +1 */
}
if (mg->mg_len)
Perl_dump_indent(aTHX_ level, file, " MG_LEN = %d\n", mg->mg_len);
if (mg->mg_ptr) {
- Perl_dump_indent(aTHX_ level, file, " MG_PTR = 0x%lx", (long)mg->mg_ptr);
+ Perl_dump_indent(aTHX_ level, file, " MG_PTR = 0x%"UVxf, PTR2UV(mg->mg_ptr));
if (mg->mg_len >= 0) {
SV *sv = newSVpvn("", 0);
PerlIO_printf(file, " %s", pv_display(sv, mg->mg_ptr, mg->mg_len, 0, pvlim));
@@ -716,7 +730,7 @@ Perl_magic_dump(pTHX_ MAGIC *mg)
void
Perl_do_hv_dump(pTHX_ I32 level, PerlIO *file, char *name, HV *sv)
{
- Perl_dump_indent(aTHX_ level, file, "%s = 0x%lx", name, (long)sv);
+ Perl_dump_indent(aTHX_ level, file, "%s = 0x%"UVxf, name, PTR2UV(sv));
if (sv && HvNAME(sv))
PerlIO_printf(file, "\t\"%s\"\n", HvNAME(sv));
else
@@ -726,7 +740,7 @@ Perl_do_hv_dump(pTHX_ I32 level, PerlIO *file, char *name, HV *sv)
void
Perl_do_gv_dump(pTHX_ I32 level, PerlIO *file, char *name, GV *sv)
{
- Perl_dump_indent(aTHX_ level, file, "%s = 0x%lx", name, (long)sv);
+ Perl_dump_indent(aTHX_ level, file, "%s = 0x%"UVxf, name, PTR2UV(sv));
if (sv && GvNAME(sv))
PerlIO_printf(file, "\t\"%s\"\n", GvNAME(sv));
else
@@ -736,7 +750,7 @@ Perl_do_gv_dump(pTHX_ I32 level, PerlIO *file, char *name, GV *sv)
void
Perl_do_gvgv_dump(pTHX_ I32 level, PerlIO *file, char *name, GV *sv)
{
- Perl_dump_indent(aTHX_ level, file, "%s = 0x%lx", name, (long)sv);
+ Perl_dump_indent(aTHX_ level, file, "%s = 0x%"UVxf, name, PTR2UV(sv));
if (sv && GvNAME(sv)) {
PerlIO_printf(file, "\t\"");
if (GvSTASH(sv) && HvNAME(GvSTASH(sv)))
@@ -765,19 +779,11 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
flags = SvFLAGS(sv);
type = SvTYPE(sv);
-#ifdef IV_IS_QUAD
Perl_sv_setpvf(aTHX_ d,
- "(0x%" PERL_PRIx64") at 0x%" PERL_PRIx64 "\n%*s REFCNT = %" PERL_PRId64 "\n%*s FLAGS = (",
+ "(0x%"UVxf") at 0x%"UVxf"\n%*s REFCNT = %"IVdf"\n%*s FLAGS = (",
PTR2UV(SvANY(sv)), PTR2UV(sv),
PL_dumpindent*level, "", (IV)SvREFCNT(sv),
PL_dumpindent*level, "");
-#else
- Perl_sv_setpvf(aTHX_ d,
- "(0x%lx) at 0x%lx\n%*s REFCNT = %ld\n%*s FLAGS = (",
- (unsigned long)SvANY(sv), (unsigned long)sv,
- PL_dumpindent*level, "", (long)SvREFCNT(sv),
- PL_dumpindent*level, "");
-#endif
if (flags & SVs_PADBUSY) sv_catpv(d, "PADBUSY,");
if (flags & SVs_PADTMP) sv_catpv(d, "PADTMP,");
@@ -903,27 +909,21 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
PerlIO_printf(file, "PVIO%s\n", s);
break;
default:
- PerlIO_printf(file, "UNKNOWN(0x%x) %s\n", type, s);
+ PerlIO_printf(file, "UNKNOWN(0x%"UVxf") %s\n", (UV)type, s);
return;
}
if (type >= SVt_PVIV || type == SVt_IV) {
-#ifdef IV_IS_QUAD
- if (SvIsUV(sv))
- Perl_dump_indent(aTHX_ level, file, " UV = %" PERL_PRIu64, (UV)SvUVX(sv));
- else
- Perl_dump_indent(aTHX_ level, file, " IV = %" PERL_PRId64, (IV)SvIVX(sv));
-#else
if (SvIsUV(sv))
- Perl_dump_indent(aTHX_ level, file, " UV = %lu", (unsigned long)SvUVX(sv));
+ Perl_dump_indent(aTHX_ level, file, " UV = %"UVuf, (UV)SvUVX(sv));
else
- Perl_dump_indent(aTHX_ level, file, " IV = %ld", (long)SvIVX(sv));
-#endif
+ Perl_dump_indent(aTHX_ level, file, " IV = %"IVdf, (IV)SvIVX(sv));
if (SvOOK(sv))
PerlIO_printf(file, " (OFFSET)");
PerlIO_putc(file, '\n');
}
if (type >= SVt_PVNV || type == SVt_NV) {
RESTORE_NUMERIC_STANDARD();
+ /* %Vg doesn't work? --jhi */
#ifdef USE_LONG_DOUBLE
Perl_dump_indent(aTHX_ level, file, " NV = %.*" PERL_PRIgldbl "\n", LDBL_DIG, SvNVX(sv));
#else
@@ -932,11 +932,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
RESTORE_NUMERIC_LOCAL();
}
if (SvROK(sv)) {
-#ifdef IV_IS_QUAD
- Perl_dump_indent(aTHX_ level, file, " RV = 0x%" PERL_PRIx64 "\n", PTR2IV(SvRV(sv)));
-#else
- Perl_dump_indent(aTHX_ level, file, " RV = 0x%lx\n", (long)SvRV(sv));
-#endif
+ Perl_dump_indent(aTHX_ level, file, " RV = 0x%"UVxf"\n", PTR2UV(SvRV(sv)));
if (nest < maxnest)
do_sv_dump(level+1, file, SvRV(sv), nest+1, maxnest, dumpops, pvlim);
return;
@@ -945,21 +941,12 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
return;
if (type <= SVt_PVLV) {
if (SvPVX(sv)) {
-#ifdef IV_IS_QUAD
- Perl_dump_indent(aTHX_ level, file," PV = 0x%" PERL_PRIx64 " ", PTR2IV(SvPVX(sv)));
-#else
- Perl_dump_indent(aTHX_ level, file," PV = 0x%lx ", (long)SvPVX(sv));
-#endif
+ Perl_dump_indent(aTHX_ level, file," PV = 0x%"UVxf" ", PTR2UV(SvPVX(sv)));
if (SvOOK(sv))
PerlIO_printf(file, "( %s . ) ", pv_display(d, SvPVX(sv)-SvIVX(sv), SvIVX(sv), 0, pvlim));
PerlIO_printf(file, "%s\n", pv_display(d, SvPVX(sv), SvCUR(sv), SvLEN(sv), pvlim));
-#ifdef IV_IS_QUAD
- Perl_dump_indent(aTHX_ level, file, " CUR = %" PERL_PRId64 "\n", (IV)SvCUR(sv));
- Perl_dump_indent(aTHX_ level, file, " LEN = %" PERL_PRId64 "\n", (IV)SvLEN(sv));
-#else
- Perl_dump_indent(aTHX_ level, file, " CUR = %ld\n", (long)SvCUR(sv));
- Perl_dump_indent(aTHX_ level, file, " LEN = %ld\n", (long)SvLEN(sv));
-#endif
+ Perl_dump_indent(aTHX_ level, file, " CUR = %"IVdf"\n", (IV)SvCUR(sv));
+ Perl_dump_indent(aTHX_ level, file, " LEN = %"IVdf"\n", (IV)SvLEN(sv));
}
else
Perl_dump_indent(aTHX_ level, file, " PV = 0\n");
@@ -973,43 +960,23 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
switch (type) {
case SVt_PVLV:
Perl_dump_indent(aTHX_ level, file, " TYPE = %c\n", LvTYPE(sv));
-#ifdef IV_IS_QUAD
- Perl_dump_indent(aTHX_ level, file, " TARGOFF = %" PERL_PRId64 "\n", (IV)LvTARGOFF(sv));
- Perl_dump_indent(aTHX_ level, file, " TARGLEN = %" PERL_PRId64 "\n", (IV)LvTARGLEN(sv));
- Perl_dump_indent(aTHX_ level, file, " TARG = 0x%" PERL_PRIx64 "\n", PTR2IV(LvTARG(sv)));
-#else
- Perl_dump_indent(aTHX_ level, file, " TARGOFF = %ld\n", (long)LvTARGOFF(sv));
- Perl_dump_indent(aTHX_ level, file, " TARGLEN = %ld\n", (long)LvTARGLEN(sv));
- Perl_dump_indent(aTHX_ level, file, " TARG = 0x%lx\n", (long)LvTARG(sv));
-#endif
+ Perl_dump_indent(aTHX_ level, file, " TARGOFF = %"IVdf"\n", (IV)LvTARGOFF(sv));
+ Perl_dump_indent(aTHX_ level, file, " TARGLEN = %"IVdf"\n", (IV)LvTARGLEN(sv));
+ Perl_dump_indent(aTHX_ level, file, " TARG = 0x%"UVxf"\n", PTR2UV(LvTARG(sv)));
/* XXX level+1 ??? */
do_sv_dump(level, file, LvTARG(sv), nest+1, maxnest, dumpops, pvlim);
break;
case SVt_PVAV:
-#ifdef IV_IS_QUAD
- Perl_dump_indent(aTHX_ level, file, " ARRAY = 0x%" PERL_PRIx64 , PTR2IV(AvARRAY(sv)));
-#else
- Perl_dump_indent(aTHX_ level, file, " ARRAY = 0x%lx", (long)AvARRAY(sv));
-#endif
+ Perl_dump_indent(aTHX_ level, file, " ARRAY = 0x%"UVxf, PTR2UV(AvARRAY(sv)));
if (AvARRAY(sv) != AvALLOC(sv)) {
- PerlIO_printf(file, " (offset=%d)\n", (AvARRAY(sv) - AvALLOC(sv)));
-#ifdef IV_IS_QUAD
- Perl_dump_indent(aTHX_ level, file, " ALLOC = 0x%" PERL_PRIx64 "\n", PTR2IV(AvALLOC(sv)));
-#else
- Perl_dump_indent(aTHX_ level, file, " ALLOC = 0x%lx\n", (long)AvALLOC(sv));
-#endif
+ PerlIO_printf(file, " (offset=%"IVdf")\n", (IV)(AvARRAY(sv) - AvALLOC(sv)));
+ Perl_dump_indent(aTHX_ level, file, " ALLOC = 0x%"UVxf"\n", PTR2UV(AvALLOC(sv)));
}
else
PerlIO_putc(file, '\n');
-#ifdef IV_IS_QUAD
- Perl_dump_indent(aTHX_ level, file, " FILL = %" PERL_PRId64 "\n", (IV)AvFILLp(sv));
- Perl_dump_indent(aTHX_ level, file, " MAX = %" PERL_PRId64 "\n", (IV)AvMAX(sv));
- Perl_dump_indent(aTHX_ level, file, " ARYLEN = 0x%" PERL_PRIx64 "\n", PTR2IV(AvARYLEN(sv)));
-#else
- Perl_dump_indent(aTHX_ level, file, " FILL = %ld\n", (long)AvFILLp(sv));
- Perl_dump_indent(aTHX_ level, file, " MAX = %ld\n", (long)AvMAX(sv));
- Perl_dump_indent(aTHX_ level, file, " ARYLEN = 0x%lx\n", (long)AvARYLEN(sv));
-#endif
+ Perl_dump_indent(aTHX_ level, file, " FILL = %"IVdf"\n", (IV)AvFILLp(sv));
+ Perl_dump_indent(aTHX_ level, file, " MAX = %"IVdf"\n", (IV)AvMAX(sv));
+ Perl_dump_indent(aTHX_ level, file, " ARYLEN = 0x%"UVxf"\n", PTR2UV(AvARYLEN(sv)));
flags = AvFLAGS(sv);
sv_setpv(d, "");
if (flags & AVf_REAL) sv_catpv(d, ",REAL");
@@ -1021,22 +988,14 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
for (count = 0; count <= av_len((AV*)sv) && count < maxnest; count++) {
SV** elt = av_fetch((AV*)sv,count,0);
-#ifdef IV_IS_QUAD
- Perl_dump_indent(aTHX_ level + 1, file, "Elt No. %" PERL_PRId64 "\n", (IV)count);
-#else
- Perl_dump_indent(aTHX_ level + 1, file, "Elt No. %ld\n", (long)count);
-#endif
+ Perl_dump_indent(aTHX_ level + 1, file, "Elt No. %"IVdf"\n", (IV)count);
if (elt)
do_sv_dump(level+1, file, *elt, nest+1, maxnest, dumpops, pvlim);
}
}
break;
case SVt_PVHV:
-#ifdef IV_IS_QUAD
- Perl_dump_indent(aTHX_ level, file, " ARRAY = 0x%" PERL_PRIx64,PTR2IV(HvARRAY(sv)));
-#else
- Perl_dump_indent(aTHX_ level, file, " ARRAY = 0x%lx",(long)HvARRAY(sv));
-#endif
+ Perl_dump_indent(aTHX_ level, file, " ARRAY = 0x%"UVxf, PTR2UV(HvARRAY(sv)));
if (HvARRAY(sv) && HvKEYS(sv)) {
/* Show distribution of HEs in the ARRAY */
int freq[200];
@@ -1081,25 +1040,13 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
Perl_dump_indent(aTHX_ level, file, " hash quality = %.1f%%", theoret/sum*100);
}
PerlIO_putc(file, '\n');
-#ifdef IV_IS_QUAD
- Perl_dump_indent(aTHX_ level, file, " KEYS = %" PERL_PRId64 "\n", (IV)HvKEYS(sv));
- Perl_dump_indent(aTHX_ level, file, " FILL = %" PERL_PRId64 "\n", (IV)HvFILL(sv));
- Perl_dump_indent(aTHX_ level, file, " MAX = %" PERL_PRId64 "\n", (IV)HvMAX(sv));
- Perl_dump_indent(aTHX_ level, file, " RITER = %" PERL_PRId64 "\n", (IV)HvRITER(sv));
- Perl_dump_indent(aTHX_ level, file, " EITER = 0x%" PERL_PRIx64 "\n",PTR2IV(HvEITER(sv)));
-#else
- Perl_dump_indent(aTHX_ level, file, " KEYS = %ld\n", (long)HvKEYS(sv));
- Perl_dump_indent(aTHX_ level, file, " FILL = %ld\n", (long)HvFILL(sv));
- Perl_dump_indent(aTHX_ level, file, " MAX = %ld\n", (long)HvMAX(sv));
- Perl_dump_indent(aTHX_ level, file, " RITER = %ld\n", (long)HvRITER(sv));
- Perl_dump_indent(aTHX_ level, file, " EITER = 0x%lx\n",(long) HvEITER(sv));
-#endif
+ Perl_dump_indent(aTHX_ level, file, " KEYS = %"IVdf"\n", (IV)HvKEYS(sv));
+ Perl_dump_indent(aTHX_ level, file, " FILL = %"IVdf"\n", (IV)HvFILL(sv));
+ Perl_dump_indent(aTHX_ level, file, " MAX = %"IVdf"\n", (IV)HvMAX(sv));
+ Perl_dump_indent(aTHX_ level, file, " RITER = %"IVdf"\n", (IV)HvRITER(sv));
+ Perl_dump_indent(aTHX_ level, file, " EITER = 0x%"UVxf"\n", PTR2UV(HvEITER(sv)));
if (HvPMROOT(sv))
-#ifdef IV_IS_QUAD
- Perl_dump_indent(aTHX_ level, file, " PMROOT = 0x%" PERL_PRIx64 "\n",PTR2IV(HvPMROOT(sv)));
-#else
- Perl_dump_indent(aTHX_ level, file, " PMROOT = 0x%lx\n",(long)HvPMROOT(sv));
-#endif
+ Perl_dump_indent(aTHX_ level, file, " PMROOT = 0x%"UVxf"\n", PTR2UV(HvPMROOT(sv)));
if (HvNAME(sv))
Perl_dump_indent(aTHX_ level, file, " NAME = \"%s\"\n", HvNAME(sv));
if (nest < maxnest && !HvEITER(sv)) { /* Try to preserve iterator */
@@ -1116,11 +1063,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
key = hv_iterkey(he, &len);
elt = hv_iterval(hv, he);
-#ifdef IV_IS_QUAD
- Perl_dump_indent(aTHX_ level+1, file, "Elt %s HASH = 0x%" PERL_PRIx64 "\n", pv_display(d, key, len, 0, pvlim), hash);
-#else
- Perl_dump_indent(aTHX_ level+1, file, "Elt %s HASH = 0x%lx\n", pv_display(d, key, len, 0, pvlim), hash);
-#endif
+ Perl_dump_indent(aTHX_ level+1, file, "Elt %s HASH = 0x%"UVxf"\n", pv_display(d, key, len, 0, pvlim), (UV)hash);
do_sv_dump(level+1, file, elt, nest+1, maxnest, dumpops, pvlim);
}
hv_iterinit(hv); /* Return to status quo */
@@ -1133,54 +1076,23 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
case SVt_PVFM:
do_hv_dump(level, file, " COMP_STASH", CvSTASH(sv));
if (CvSTART(sv))
-#ifdef IV_IS_QAUD
- Perl_dump_indent(aTHX_ level, file, " START = 0x%" PERL_PRIx64 " ===> %d\n", (IV)CvSTART(sv), CvSTART(sv)->op_seq);
- Perl_dump_indent(aTHX_ level, file, " ROOT = 0x%" PERL_PRIx64 "\n", (IV)CvROOT(sv));
-#else
- Perl_dump_indent(aTHX_ level, file, " START = 0x%lx ===> %d\n", (long)CvSTART(sv), CvSTART(sv)->op_seq);
- Perl_dump_indent(aTHX_ level, file, " ROOT = 0x%lx\n", (long)CvROOT(sv));
-#endif
+ Perl_dump_indent(aTHX_ level, file, " START = 0x%"UVxf" ===> %"IVdf"\n", PTR2UV(CvSTART(sv)), (IV)CvSTART(sv)->op_seq);
+ Perl_dump_indent(aTHX_ level, file, " ROOT = 0x%"UVxf"\n", PTR2UV(CvROOT(sv)));
if (CvROOT(sv) && dumpops)
do_op_dump(level+1, file, CvROOT(sv));
-#ifdef IV_IS_QUAD
- Perl_dump_indent(aTHX_ level, file, " XSUB = 0x%" PERL_PRIx64 "\n", PTR2IV(CvXSUB(sv)));
- Perl_dump_indent(aTHX_ level, file, " XSUBANY = %" PERL_PRId64 "\n", (IV)CvXSUBANY(sv).any_i32);
-#else
- Perl_dump_indent(aTHX_ level, file, " XSUB = 0x%lx\n", (long)CvXSUB(sv));
- Perl_dump_indent(aTHX_ level, file, " XSUBANY = %ld\n", (long)CvXSUBANY(sv).any_i32);
-#endif
+ Perl_dump_indent(aTHX_ level, file, " XSUB = 0x%"UVxf"\n", PTR2UV(CvXSUB(sv)));
+ Perl_dump_indent(aTHX_ level, file, " XSUBANY = %"IVdf"\n", (IV)CvXSUBANY(sv).any_i32);
do_gvgv_dump(level, file, " GVGV::GV", CvGV(sv));
- do_gv_dump(level, file, " FILEGV", CvFILEGV(sv));
-#ifdef IV_IS_QUAD
- Perl_dump_indent(aTHX_ level, file, " DEPTH = %" PERL_PRId64 "\n", (IV)CvDEPTH(sv));
-#else
- Perl_dump_indent(aTHX_ level, file, " DEPTH = %ld\n", (long)CvDEPTH(sv));
-#endif
+ Perl_dump_indent(aTHX_ level, file, " FILE = \"%s\"\n", CvFILE(sv));
+ Perl_dump_indent(aTHX_ level, file, " DEPTH = %"IVdf"\n", (IV)CvDEPTH(sv));
#ifdef USE_THREADS
-#ifdef IV_IS_QUAD
- Perl_dump_indent(aTHX_ level, file, " MUTEXP = 0x%" PERL_PRIx64 "\n", (IV)CvMUTEXP(sv));
- Perl_dump_indent(aTHX_ level, file, " OWNER = 0x%" PERL_PRIx64 "\n", (IV)CvOWNER(sv));
-#else
- Perl_dump_indent(aTHX_ level, file, " MUTEXP = 0x%lx\n", (long)CvMUTEXP(sv));
- Perl_dump_indent(aTHX_ level, file, " OWNER = 0x%lx\n", (long)CvOWNER(sv));
-#endif /* IV_IS_QUAD */
+ Perl_dump_indent(aTHX_ level, file, " MUTEXP = 0x%"UVxf"\n", PTR2UV(CvMUTEXP(sv)));
+ Perl_dump_indent(aTHX_ level, file, " OWNER = 0x%"UVxf"\n", PTR2UV(CvOWNER(sv)));
#endif /* USE_THREADS */
-#ifdef IV_IS_QUAD
- Perl_dump_indent(aTHX_ level, file, " FLAGS = 0x%" PERL_PRIx64 "\n", (UV)CvFLAGS(sv));
-#else
- Perl_dump_indent(aTHX_ level, file, " FLAGS = 0x%lx\n", (unsigned long)CvFLAGS(sv));
-#endif
+ Perl_dump_indent(aTHX_ level, file, " FLAGS = 0x%"UVxf"\n", CvFLAGS(sv));
if (type == SVt_PVFM)
-#ifdef IV_IS_QUAD
- Perl_dump_indent(aTHX_ level, file, " LINES = %" PERL_PRId64 "\n", (IV)FmLINES(sv));
-#else
- Perl_dump_indent(aTHX_ level, file, " LINES = %ld\n", (long)FmLINES(sv));
-#endif
-#ifdef IV_IS_QUAD
- Perl_dump_indent(aTHX_ level, file, " PADLIST = 0x%" PERL_PRIx64 "\n", PTR2IV(CvPADLIST(sv)));
-#else
- Perl_dump_indent(aTHX_ level, file, " PADLIST = 0x%lx\n", (long)CvPADLIST(sv));
-#endif
+ Perl_dump_indent(aTHX_ level, file, " LINES = %"IVdf"\n", (IV)FmLINES(sv));
+ Perl_dump_indent(aTHX_ level, file, " PADLIST = 0x%"UVxf"\n", PTR2UV(CvPADLIST(sv)));
if (nest < maxnest && CvPADLIST(sv)) {
AV* padlist = CvPADLIST(sv);
AV* pad_name = (AV*)*av_fetch(padlist, 0, FALSE);
@@ -1190,107 +1102,60 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
I32 ix;
for (ix = 1; ix <= AvFILL(pad_name); ix++) {
-#ifdef IV_IS_QUAD
if (SvPOK(pname[ix]))
- Perl_dump_indent(aTHX_ level, /* %5d below is enough whitespace. */
+ Perl_dump_indent(aTHX_ level,
+ /* %5d below is enough whitespace. */
file,
- "%5d. 0x%" PERL_PRIx64 " (%s\"%s\" %" PERL_PRId64 "-%" PERL_PRId64 ")\n",
- ix, ppad[ix],
+ "%5d. 0x%"UVxf" (%s\"%s\" %"IVdf"-%"IVdf")\n",
+ ix, PTR2UV(ppad[ix]),
SvFAKE(pname[ix]) ? "FAKE " : "",
SvPVX(pname[ix]),
(IV)SvNVX(pname[ix]),
(IV)SvIVX(pname[ix]));
-#else
- if (SvPOK(pname[ix]))
- Perl_dump_indent(aTHX_ level, /* %5d below is enough whitespace. */
- file,
- "%5d. 0x%lx (%s\"%s\" %ld-%ld)\n",
- ix, ppad[ix],
- SvFAKE(pname[ix]) ? "FAKE " : "",
- SvPVX(pname[ix]),
- (long)I_32(SvNVX(pname[ix])),
- (long)SvIVX(pname[ix]));
-#endif
}
}
{
CV *outside = CvOUTSIDE(sv);
-#ifdef IV_IS_QUAD
- Perl_dump_indent(aTHX_ level, file, " OUTSIDE = 0x%" PERL_PRIx64 " (%s)\n",
- PTR2IV(outside),
- (!outside ? "null"
- : CvANON(outside) ? "ANON"
- : (outside == PL_main_cv) ? "MAIN"
- : CvUNIQUE(outside) ? "UNIQUE"
- : CvGV(outside) ? GvNAME(CvGV(outside)) : "UNDEFINED"));
-#else
- Perl_dump_indent(aTHX_ level, file, " OUTSIDE = 0x%lx (%s)\n",
- (long)outside,
+ Perl_dump_indent(aTHX_ level, file, " OUTSIDE = 0x%"UVxf" (%s)\n",
+ PTR2UV(outside),
(!outside ? "null"
: CvANON(outside) ? "ANON"
: (outside == PL_main_cv) ? "MAIN"
: CvUNIQUE(outside) ? "UNIQUE"
: CvGV(outside) ? GvNAME(CvGV(outside)) : "UNDEFINED"));
-#endif
}
if (nest < maxnest && (CvCLONE(sv) || CvCLONED(sv)))
do_sv_dump(level+1, file, (SV*)CvOUTSIDE(sv), nest+1, maxnest, dumpops, pvlim);
break;
case SVt_PVGV:
Perl_dump_indent(aTHX_ level, file, " NAME = \"%s\"\n", GvNAME(sv));
-#ifdef IV_IS_QUAD
- Perl_dump_indent(aTHX_ level, file, " NAMELEN = %" PERL_PRId64 "\n", (IV)GvNAMELEN(sv));
-#else
- Perl_dump_indent(aTHX_ level, file, " NAMELEN = %ld\n", (long)GvNAMELEN(sv));
-#endif
+ Perl_dump_indent(aTHX_ level, file, " NAMELEN = %"IVdf"\n", (IV)GvNAMELEN(sv));
do_hv_dump (level, file, " GvSTASH", GvSTASH(sv));
-#ifdef IV_IS_QUAD
- Perl_dump_indent(aTHX_ level, file, " GP = 0x%" PERL_PRIx64 "\n", PTR2IV(GvGP(sv)));
- Perl_dump_indent(aTHX_ level, file, " SV = 0x%" PERL_PRIx64 "\n", PTR2IV(GvSV(sv)));
- Perl_dump_indent(aTHX_ level, file, " REFCNT = %" PERL_PRId64 "\n", (IV)GvREFCNT(sv));
- Perl_dump_indent(aTHX_ level, file, " IO = 0x%" PERL_PRIx64 "\n", PTR2IV(GvIOp(sv)));
- Perl_dump_indent(aTHX_ level, file, " FORM = 0x%" PERL_PRIx64 " \n", PTR2IV(GvFORM(sv)));
- Perl_dump_indent(aTHX_ level, file, " AV = 0x%" PERL_PRIx64 "\n", PTR2IV(GvAV(sv)));
- Perl_dump_indent(aTHX_ level, file, " HV = 0x%" PERL_PRIx64 "\n", PTR2IV(GvHV(sv)));
- Perl_dump_indent(aTHX_ level, file, " CV = 0x%" PERL_PRIx64 "\n", PTR2IV(GvCV(sv)));
- Perl_dump_indent(aTHX_ level, file, " CVGEN = 0x%" PERL_PRIx64 "\n", (IV)GvCVGEN(sv));
- Perl_dump_indent(aTHX_ level, file, " LASTEXPR = %" PERL_PRId64 "\n", (IV)GvLASTEXPR(sv));
- Perl_dump_indent(aTHX_ level, file, " LINE = %" PERL_PRId64 "\n", (IV)GvLINE(sv));
-#else
- Perl_dump_indent(aTHX_ level, file, " GP = 0x%lx\n", (long)GvGP(sv));
- Perl_dump_indent(aTHX_ level, file, " SV = 0x%lx\n", (long)GvSV(sv));
- Perl_dump_indent(aTHX_ level, file, " REFCNT = %ld\n", (long)GvREFCNT(sv));
- Perl_dump_indent(aTHX_ level, file, " IO = 0x%lx\n", (long)GvIOp(sv));
- Perl_dump_indent(aTHX_ level, file, " FORM = 0x%lx\n", (long)GvFORM(sv));
- Perl_dump_indent(aTHX_ level, file, " AV = 0x%lx\n", (long)GvAV(sv));
- Perl_dump_indent(aTHX_ level, file, " HV = 0x%lx\n", (long)GvHV(sv));
- Perl_dump_indent(aTHX_ level, file, " CV = 0x%lx\n", (long)GvCV(sv));
- Perl_dump_indent(aTHX_ level, file, " CVGEN = 0x%lx\n", (long)GvCVGEN(sv));
- Perl_dump_indent(aTHX_ level, file, " LASTEXPR = %ld\n", (long)GvLASTEXPR(sv));
- Perl_dump_indent(aTHX_ level, file, " LINE = %ld\n", (long)GvLINE(sv));
-#endif
- Perl_dump_indent(aTHX_ level, file, " FLAGS = 0x%x\n", (int)GvFLAGS(sv));
- do_gv_dump (level, file, " FILEGV", GvFILEGV(sv));
+ Perl_dump_indent(aTHX_ level, file, " GP = 0x%"UVxf"\n", PTR2UV(GvGP(sv)));
+ if (!GvGP(sv))
+ break;
+ Perl_dump_indent(aTHX_ level, file, " SV = 0x%"UVxf"\n", PTR2UV(GvSV(sv)));
+ Perl_dump_indent(aTHX_ level, file, " REFCNT = %"IVdf"\n", (IV)GvREFCNT(sv));
+ Perl_dump_indent(aTHX_ level, file, " IO = 0x%"UVxf"\n", PTR2UV(GvIOp(sv)));
+ Perl_dump_indent(aTHX_ level, file, " FORM = 0x%"UVxf" \n", PTR2UV(GvFORM(sv)));
+ Perl_dump_indent(aTHX_ level, file, " AV = 0x%"UVxf"\n", PTR2UV(GvAV(sv)));
+ Perl_dump_indent(aTHX_ level, file, " HV = 0x%"UVxf"\n", PTR2UV(GvHV(sv)));
+ Perl_dump_indent(aTHX_ level, file, " CV = 0x%"UVxf"\n", PTR2UV(GvCV(sv)));
+ Perl_dump_indent(aTHX_ level, file, " CVGEN = 0x%"UVxf"\n", (UV)GvCVGEN(sv));
+ Perl_dump_indent(aTHX_ level, file, " GPFLAGS = 0x%"UVxf"\n", (UV)GvGPFLAGS(sv));
+ Perl_dump_indent(aTHX_ level, file, " LINE = %"IVdf"\n", (IV)GvLINE(sv));
+ Perl_dump_indent(aTHX_ level, file, " FILE = \"%s\"\n", GvFILE(sv));
+ Perl_dump_indent(aTHX_ level, file, " FLAGS = 0x%"UVxf"\n", (UV)GvFLAGS(sv));
do_gv_dump (level, file, " EGV", GvEGV(sv));
break;
case SVt_PVIO:
-#ifdef IV_IS_QUAD
- Perl_dump_indent(aTHX_ level, file, " IFP = 0x%" PERL_PRIx64 "\n", PTR2IV(IoIFP(sv)));
- Perl_dump_indent(aTHX_ level, file, " OFP = 0x%" PERL_PRIx64 "\n", PTR2IV(IoOFP(sv)));
- Perl_dump_indent(aTHX_ level, file, " DIRP = 0x%" PERL_PRIx64 "\n", PTR2IV(IoDIRP(sv)));
- Perl_dump_indent(aTHX_ level, file, " LINES = %" PERL_PRId64 "\n", (IV)IoLINES(sv));
- Perl_dump_indent(aTHX_ level, file, " PAGE = %" PERL_PRId64 "\n", (IV)IoPAGE(sv));
- Perl_dump_indent(aTHX_ level, file, " PAGE_LEN = %" PERL_PRId64 "\n", (IV)IoPAGE_LEN(sv));
- Perl_dump_indent(aTHX_ level, file, " LINES_LEFT = %" PERL_PRId64 "\n", (IV)IoLINES_LEFT(sv));
-#else
- Perl_dump_indent(aTHX_ level, file, " IFP = 0x%lx\n", (long)IoIFP(sv));
- Perl_dump_indent(aTHX_ level, file, " OFP = 0x%lx\n", (long)IoOFP(sv));
- Perl_dump_indent(aTHX_ level, file, " DIRP = 0x%lx\n", (long)IoDIRP(sv));
- Perl_dump_indent(aTHX_ level, file, " LINES = %ld\n", (long)IoLINES(sv));
- Perl_dump_indent(aTHX_ level, file, " PAGE = %ld\n", (long)IoPAGE(sv));
- Perl_dump_indent(aTHX_ level, file, " PAGE_LEN = %ld\n", (long)IoPAGE_LEN(sv));
- Perl_dump_indent(aTHX_ level, file, " LINES_LEFT = %ld\n", (long)IoLINES_LEFT(sv));
-#endif
+ Perl_dump_indent(aTHX_ level, file, " IFP = 0x%"UVxf"\n", PTR2UV(IoIFP(sv)));
+ Perl_dump_indent(aTHX_ level, file, " OFP = 0x%"UVxf"\n", PTR2UV(IoOFP(sv)));
+ Perl_dump_indent(aTHX_ level, file, " DIRP = 0x%"UVxf"\n", PTR2UV(IoDIRP(sv)));
+ Perl_dump_indent(aTHX_ level, file, " LINES = %"IVdf"\n", (IV)IoLINES(sv));
+ Perl_dump_indent(aTHX_ level, file, " PAGE = %"IVdf"\n", (IV)IoPAGE(sv));
+ Perl_dump_indent(aTHX_ level, file, " PAGE_LEN = %"IVdf"\n", (IV)IoPAGE_LEN(sv));
+ Perl_dump_indent(aTHX_ level, file, " LINES_LEFT = %"IVdf"\n", (IV)IoLINES_LEFT(sv));
if (IoTOP_NAME(sv))
Perl_dump_indent(aTHX_ level, file, " TOP_NAME = \"%s\"\n", IoTOP_NAME(sv));
do_gv_dump (level, file, " TOP_GV", IoTOP_GV(sv));
@@ -1300,20 +1165,12 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
if (IoBOTTOM_NAME(sv))
Perl_dump_indent(aTHX_ level, file, " BOTTOM_NAME = \"%s\"\n", IoBOTTOM_NAME(sv));
do_gv_dump (level, file, " BOTTOM_GV", IoBOTTOM_GV(sv));
-#ifdef IV_IS_QUAD
- Perl_dump_indent(aTHX_ level, file, " SUBPROCESS = %" PERL_PRId64 "\n", (IV)IoSUBPROCESS(sv));
-#else
- Perl_dump_indent(aTHX_ level, file, " SUBPROCESS = %ld\n", (long)IoSUBPROCESS(sv));
-#endif
+ Perl_dump_indent(aTHX_ level, file, " SUBPROCESS = %"IVdf"\n", (IV)IoSUBPROCESS(sv));
if (isPRINT(IoTYPE(sv)))
Perl_dump_indent(aTHX_ level, file, " TYPE = '%c'\n", IoTYPE(sv));
else
Perl_dump_indent(aTHX_ level, file, " TYPE = '\\%o'\n", IoTYPE(sv));
-#ifdef IV_IS_QUAD
- Perl_dump_indent(aTHX_ level, file, " FLAGS = 0x%" PERL_PRIx64 "\n", (IV)IoFLAGS(sv));
-#else
- Perl_dump_indent(aTHX_ level, file, " FLAGS = 0x%lx\n", (long)IoFLAGS(sv));
-#endif
+ Perl_dump_indent(aTHX_ level, file, " FLAGS = 0x%"UVxf"\n", (UV)IoFLAGS(sv));
break;
}
}