diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-12-19 18:28:03 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-12-19 18:28:03 +0000 |
commit | b188609906d01f80253fa5875023a178dcb87f97 (patch) | |
tree | 23ea6bfb3d039f7cfcd346577bf3ce9e96605c13 /dump.c | |
parent | 1f17861c0b41726e6113688cabd26a29acd3948d (diff) | |
download | perl-b188609906d01f80253fa5875023a178dcb87f97.tar.gz |
Make sv_dump (and therefore Devel::Peek) report the value of the
constant in inlineable constant subroutines.
p4raw-id: //depot/perl@26404
Diffstat (limited to 'dump.c')
-rw-r--r-- | dump.c | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -1477,7 +1477,21 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo if (CvROOT(sv) && dumpops) do_op_dump(level+1, file, CvROOT(sv)); 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); + { + SV *constant = cv_const_sv((CV *)sv); + + + if (constant) { + Perl_dump_indent(aTHX_ level, file, " XSUBANY = 0x%"UVxf + " (CONST SV)\n", + PTR2UV(CvXSUBANY(sv).any_ptr)); + do_sv_dump(level+1, file, constant, nest+1, maxnest, dumpops, + pvlim); + } else { + Perl_dump_indent(aTHX_ level, file, " XSUBANY = %"IVdf"\n", + (IV)CvXSUBANY(sv).any_i32); + } + } do_gvgv_dump(level, file, " GVGV::GV", CvGV(sv)); Perl_dump_indent(aTHX_ level, file, " FILE = \"%s\"\n", CvFILE(sv)); Perl_dump_indent(aTHX_ level, file, " DEPTH = %"IVdf"\n", (IV)CvDEPTH(sv)); |