summaryrefslogtreecommitdiff
path: root/dump.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-12-19 18:28:03 +0000
committerNicholas Clark <nick@ccl4.org>2005-12-19 18:28:03 +0000
commitb188609906d01f80253fa5875023a178dcb87f97 (patch)
tree23ea6bfb3d039f7cfcd346577bf3ce9e96605c13 /dump.c
parent1f17861c0b41726e6113688cabd26a29acd3948d (diff)
downloadperl-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.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/dump.c b/dump.c
index 16c7281e9e..f07e95f3b7 100644
--- a/dump.c
+++ b/dump.c
@@ -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));