From 0c22a733be05b5c1393fc9a2e337dbeed2881596 Mon Sep 17 00:00:00 2001 From: David Mitchell Date: Sat, 15 Feb 2014 16:15:11 +0000 Subject: add aux_flags field to HVs with aux struct Add an extra U32 general flags field to the xpvhv_aux struct (which is used on HVs such as stashes, that need extra fields). On 64-bit systems, this doesn't consume any extra space since there's already an odd number of I32/U32 fields. On 32-bit systems it will consume an extra 4 bytes. But of course only on those hashes that have the aux struct. As well as providing extra flags in the AUX case, it will also allow us to free up at least one general flag bit for HVs - see next commit. --- dump.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'dump.c') diff --git a/dump.c b/dump.c index 8c14b3bdfc..b5998f9b82 100644 --- a/dump.c +++ b/dump.c @@ -1883,6 +1883,11 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo } break; case SVt_PVHV: + if (SvOOK(sv)) { + struct xpvhv_aux *const aux = HvAUX(sv); + Perl_dump_indent(aTHX_ level, file, " AUX_FLAGS = %"UVuf"\n", + (UV)aux->xhv_aux_flags); + } Perl_dump_indent(aTHX_ level, file, " ARRAY = 0x%"UVxf, PTR2UV(HvARRAY(sv))); if (HvARRAY(sv) && HvUSEDKEYS(sv)) { /* Show distribution of HEs in the ARRAY */ -- cgit v1.2.1