On Fri, Jul 13, 2012 at 08:06:50AM -0500, Reini Urban wrote: > I forgot the simple stash logic that every HV with a NAME is a STASH. > No need for a flag to check. > > On Fri, Jul 13, 2012 at 7:48 AM, Dave Mitchell <davem@iabyn.com> wrote: > > On Fri, Jul 13, 2012 at 07:28:14AM -0500, Reini Urban wrote: > >> SVf_OOK is not needed anymore for HVs as HVs now require always the > >> hv_aux struct. > > > > Huh? > > > > $ p -MDevel::Peek -e'my %h; Dump \%h; each %h; Dump \%h' 2>&1 | grep FLAGS > > FLAGS = (TEMP,ROK) > > FLAGS = (PADMY,SHAREKEYS) > > FLAGS = (TEMP,ROK) > > FLAGS = (PADMY,OOK,SHAREKEYS) > > Yes, each requires that. > In my experiments all my simple hashes (created in the compiler) without hv_aux > fail to work since 5.15, even when not using each. hv_store also > accesses now RITER. There's a lot you can do with hashes that don't need hv_aux. At the end of the following code, OOK is still not set: my %h; $h{a} = 1; @h{qw(b c)} = (2,3); delete $h{a}; @a = $h{b}; @a = @h{qw(b c)}; $x = exists $h{b}; The main perl-level thing that requires hv_aux is iteration (keys, each etc); and I rather wonder whether we could avoid creating it for the list context versions them? > We should create all our hashes with hv_aux already and forget about > the OOK checks. Lets not. -- I've often wanted to drown my troubles, but I can't get my wife to go swimming.Thread Previous | Thread Next