| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This is in preparation for making PADNAME a separate type.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Under ithreads, constants and GVs are stored in the pad.
When names are looked up up in a pad, the search begins at the end and
works its way toward the beginning, so that an $x declared later masks
one declared earlier.
If there are many constants at the end of the pad, which can happen
for generated code such as lib/unicore/TestProp.pl (which has about
100,000 lines and over 500,000 pad entries for constants at the
end of the file scope’s pad), it can take a long time to search
through them all.
Before commit 325e1816, constants used &PL_sv_undef ‘names’. Since
that is the default value for array elements (when viewed directly
through AvARRAY, rather than av_fetch), the pad allocation code did
not even bother storing the ‘name’ for these. So the name pad (aka
padnamelist) was not extended, leaving just 10 entries or so in the
case of lib/unicore/TestProp.pl.
Commit 325e1816 make pad constants have &PL_sv_no names, so the
name pad would be implicitly extended as a result of storing
&PL_sv_no, causing a huge slowdown in t/re/uniprops.t (which runs
lib/unicore/TestProp.pl) under threaded builds.
Now, normally the name pad *does* get extended to match the pad,
in pad_tidy, but that is skipped for string eval (and required
file scope, of course). Hence, wrapping the contents of
lib/unicore/TestProp.pl in a sub or adding ‘my $x’ to end of it will
cause the same slowdown before 325e1816.
lib/unicore/TestProp.pl just happened to be written (ok, generated) in
such a way that it ended up with a small name pad.
This commit fixes things to make them as fast as before by recording
the index of the last named variable in the pad. Anything following
that is disregarded in pad lookup and search begins with the last
named variable. (This actually does make things faster before for
subs with many trailing constants in the pad.)
This is not a complete fix. Adding ‘my $x’ to the end of a large file
like lib/unicore/TestProp.pl will make it just as slow again.
Ultimately we need another algorithm, such as a binary search.
|
|
|
|
|
| |
The latter is a somewhat less clumsy name. The old one is provided a a
very clear name; the new one as a somewhat slangy version
|
|
|
|
|
|
|
|
| |
In using the av_top() function created in a recent commit, I found
myself being confused, and thinking it meant the top element of the
array, whereas it really means the index of the top element of that
array. Since the new name has not appeared in a stable release, it can
be changed, without remorse, to include 'index' in it.
|
|
|
|
| |
av_len() is misleadingly named.
|
|
|
|
|
| |
This updates the editor hints in our files for Emacs and vim to request
that tabs be inserted as spaces.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit eff7e72c3 (Detect incomplete caller overrides in Carp) used
this little trick for detecting a @DB::args that an overridden
caller() failed to set:
+ @args = \$i; # A sentinal, which no-one else has the address of
But there is a bug in caller(). The first time caller tries to write
to @DB::args, it calls Perl_init_dbargs first. That function checks
whether @DB::args is AvREAL, in case someone has assigned to it, and
takes appropriate measures. But caller doesn’t bother calling
Perl_init_dbargs more than once. So manually-assigned items in
@DB::args would leak, starting with the *second* call to caller.
Commit eff7e72c3 triggered that bug, resulting in a regression in
Carp, in that it started leaking. eff7e72c3 was backported to 5.12.2
with commit 97705941a4, so in both 5.12 and 5.14 Carp is affected.
This bug (the caller bug, not Carp’s triggering thereof) also affects
any caller overrides that set @DB::args themselves, if there are
alternate calls to the overridden caller and CORE::caller.
This commit fixes that by changing the if (!PL_dbargs) condition
in pp_caller to if (!PL_dbargs || AvREAL(PL_dbargs)). I.e., if
@args is either uninitialised or AvREAL then call Perl_init_dbargs.
Perl_init_dbargs also has a bug in it, that this fixes: The array not
only needs AvREAL turned off, but also AvREIFY turned on, so that
assignments to it that occur after its initialisation turn AvREAL back
on again. (In fact, Larry Wall added a comment suggesting this back
in perl 5.000.)
|
|
|
|
|
| |
This is a patch to enhance perlapi.pod by providing Perl equivalents and
clarifying documentation where appropriate.
|
|
|
|
| |
This was the only user of xivu_p1 in union _xivu, so remove that too.
|
| |
|
| |
|
| |
|
|
|
| |
p4raw-id: //depot/perl@34608
|
|
|
|
|
|
|
|
|
|
| |
away const, returning a void *. Add MUTABLE_SV(sv) which uses this, and
replace all (SV *) casts either with MUTABLE_SV(sv), or (const SV *).
This probably still needs some work - assigning to SvPVX() and SvRV()
is now likely to generate a casting error. The core doesn't do this.
But as-is it's finding bugs that can be fixed.
p4raw-id: //depot/perl@34605
|
|
|
| |
p4raw-id: //depot/perl@34585
|
|
|
|
|
| |
Nullhek and Nullhv. Nullop is going to be a bit less simple.
p4raw-id: //depot/perl@33051
|
|
|
|
|
| |
Message-ID: <20071229181742.1933db40@r2d2>
p4raw-id: //depot/perl@32783
|
|
|
|
|
| |
newSV_type() and tweaking Perl_sv_upgrade().
p4raw-id: //depot/perl@32675
|
|
|
|
|
| |
earlier we missed in av.h and hv.h)
p4raw-id: //depot/perl@29670
|
|
|
|
|
| |
*allocated structs, as these are not going to be needed again.
p4raw-id: //depot/perl@29664
|
|
|
|
|
| |
is part of the xnv union.
p4raw-id: //depot/perl@29634
|
|
|
|
|
|
| |
in the xnv union. This frees up IVX for the PL_generation code, which
in turn will allow SvCUR to return to its real purpose.
p4raw-id: //depot/perl@29630
|
|
|
|
|
| |
smaller.
p4raw-id: //depot/perl@27380
|
|
|
|
|
| |
PVGVs by another pointer.
p4raw-id: //depot/perl@27326
|
|
|
|
|
|
| |
PVMGs in pad names where previously PVGVs were used. In turn, this
gives much greater flexibility for the layout of PVGVs.
p4raw-id: //depot/perl@27312
|
|
|
| |
p4raw-id: //depot/perl@25417
|
|
|
| |
p4raw-id: //depot/perl@24649
|
|
|
|
|
| |
So now there's a buy 5 get one free offer on PVAV bodies.
p4raw-id: //depot/perl@24619
|
|
|
|
|
|
|
|
| |
Revert the NV union back to a plain NV
Transpose the positions of IV and NV (NV is now first)
Don't allocate the NV for PV,PVIV,PVAV and PVHV (last 2 non-allocations
currently disabled by default)
p4raw-id: //depot/perl@24617
|
|
|
|
|
| |
arguments with embed.h
p4raw-id: //depot/perl@24590
|
|
|
| |
p4raw-id: //depot/perl@24572
|
|
|
|
|
| |
it.
p4raw-id: //depot/perl@24569
|
|
|
| |
p4raw-id: //depot/perl@24557
|
|
|
| |
p4raw-id: //depot/perl@24544
|
|
|
| |
p4raw-id: //depot/perl@24542
|
|
|
|
|
|
|
| |
the memory to store pointers and integers.
(Part 1 - will be reworked to be more efficient when IV or void*
is 64 bit soon)
p4raw-id: //depot/perl@24538
|
|
|
|
|
| |
IV and UV. Avoid allocating a body for IVs and RVs.
p4raw-id: //depot/perl@24531
|
|
|
| |
p4raw-id: //depot/perl@24518
|
|
|
|
|
|
|
| |
(Lots of Perl 5 source code archaeology was involved.)
Larry didn't make strangled noises when I showed him
the patch, either :-)
p4raw-id: //depot/perl@19242
|
|
|
| |
p4raw-id: //depot/perl@18807
|
|
|
| |
p4raw-id: //depot/perl@18801
|
|
|
|
|
| |
Message-id: <20020415033855.6343.qmail@plover.com>
p4raw-id: //depot/perl@17727
|
|
|
| |
p4raw-id: //depot/perl@14391
|
|
|
| |
p4raw-id: //depot/perl@14041
|
|
|
|
|
| |
Message-ID: <20010330181228.A9319@netthink.co.uk>
p4raw-id: //depot/perl@9476
|
|
|
| |
p4raw-id: //depot/perl@8289
|
|
|
| |
p4raw-id: //depot/perl@6215
|
|
|
|
|
| |
years (from Gisle Aas)
p4raw-id: //depot/perl@5009
|
|
|
|
|
|
|
| |
Stuhl <sho_pi@hotmail.com>); fix the markup format to be more
flexible for better readability; add missing docs in sv.c; regenerate
perltoc
p4raw-id: //depot/perl@4915
|
|
|
|
|
|
|
|
| |
the following areas: SVOPs must indirect via pad; context
stack, scope stack, and runlevels must be cloned; must
hook up the virtualized pseudo-process support provided by
"host"; ...)
p4raw-id: //depot/perl@4538
|