summaryrefslogtreecommitdiff
path: root/dump.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-12-30 01:08:46 +0000
committerNicholas Clark <nick@ccl4.org>2005-12-30 01:08:46 +0000
commit86f5593612e0fa4d1eddfb78098731af1f9f4548 (patch)
tree6cd5fac00a17f52ae05f8fc41c9a752899cb4e6f /dump.c
parente33435896f177fccb609ddddaf85afbfdc7a4e5f (diff)
downloadperl-86f5593612e0fa4d1eddfb78098731af1f9f4548.tar.gz
RMAGIC on symbol tables is bad, m'kay.
Allow hashes (and therefore all symbol tables) to store the backreference array in the hv_aux structure, and thereby undo the performance damage of 24966, which resulted in 60% of all hash lookups trying to mg_find tiehash magic. p4raw-id: //depot/perl@26530
Diffstat (limited to 'dump.c')
-rw-r--r--dump.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/dump.c b/dump.c
index 3acbc42465..2285cca429 100644
--- a/dump.c
+++ b/dump.c
@@ -1439,6 +1439,15 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
if (hvname)
Perl_dump_indent(aTHX_ level, file, " NAME = \"%s\"\n", hvname);
}
+ if (SvOOK(sv)) {
+ AV *backrefs = *Perl_hv_backreferences_p(aTHX_ (HV*)sv);
+ if (backrefs) {
+ Perl_dump_indent(aTHX_ level, file, " BACKREFS = 0x%"UVxf"\n",
+ PTR2UV(backrefs));
+ do_sv_dump(level+1, file, (SV*)backrefs, nest+1, maxnest,
+ dumpops, pvlim);
+ }
+ }
if (nest < maxnest && !HvEITER_get(sv)) { /* Try to preserve iterator */
HE *he;
HV * const hv = (HV*)sv;