diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-12-30 01:08:46 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-12-30 01:08:46 +0000 |
commit | 86f5593612e0fa4d1eddfb78098731af1f9f4548 (patch) | |
tree | 6cd5fac00a17f52ae05f8fc41c9a752899cb4e6f /dump.c | |
parent | e33435896f177fccb609ddddaf85afbfdc7a4e5f (diff) | |
download | perl-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.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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; |