| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Currently it calls newSVsv() always, which copies the value, but the immortal
SVs are used as much for their addresses as their values. You can't get the
immortals into HVs from Perl-space, except for PL_sv_placeholder, and any hash
with those will take the else block, where the call to Perl_hv_iternext_flags()
won't be returning placeholders anyway. Hence If XS code has gone to the
trouble to get the "impossible" in there, they had a reason for it.
I am assuming that Perl_hv_copy_hints_hv() should stay as-is, as it is
documented that only strings and integers are supported values for %^H.
|
|
|
|
|
| |
This will cope properly with Unicode package names. It also allows use of more
efficient perl API calls, avoiding any strlen()s.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
(instead of marking the SV as mortal.)
|
| |
|
| |
|
|
|
|
| |
Change its callers to take advantage of this.
|
|
|
|
|
|
| |
key is in canonical form - any key passed encoded in UTF-8 cannot be represented
as bytes, hence the downgrade check can be skipped. Use this internally for
shared hash key scalars, as they are always canonical.
|
|
|
|
|
| |
in UTF-8, would result in storing the wrong hash value in the hash, and hence
failing lookups. I guess not that much XS code precomputes hash values.
|
|
|
|
| |
AV * to HV *.
|
|
|
|
| |
from AV * to SV *.
|
|
|
|
|
| |
are dealing with is data for the current MRO. Instead the direct pointer "owns"
the (reference to the) data, with the hash pointer left as NULL to signal this.
|
|
|
|
|
|
|
| |
method resolution orders.
mro_linear_dfs becomes a hash holding the different MROs' private data.
mro_linear_c3 becomes a shortcut pointer to the current MRO's private data.
|
|
|
|
|
|
| |
Message-ID: <25940.1225611819@chthon>
Date: Sun, 02 Nov 2008 01:43:39 -0600
p4raw-id: //depot/perl@34698
|
|
|
|
|
| |
erroneous const in dump.c.
p4raw-id: //depot/perl@34675
|
|
|
| |
p4raw-id: //depot/perl@34629
|
|
|
| |
p4raw-id: //depot/perl@34618
|
|
|
| |
p4raw-id: //depot/perl@34585
|
|
|
| |
p4raw-id: //depot/perl@34383
|
|
|
|
|
|
|
|
|
|
|
| |
de-duping hash used by S_mro_get_linear_isa_dfs(). Provide a new
function Perl_get_isa_hash() to lazily retrieve this. (Which could
actually be static if S_isa_lookup() and Perl_sv_derived_from()
moved into mro.c.) Make S_isa_lookup() use this lookup hash in place
of a linear walk of the linear isa. This should turn isa lookups from
O(n) to O(1), which should make heavy users of ->isa() faster.
(eg PPI, and hence Perl Critic).
p4raw-id: //depot/perl@34354
|
|
|
|
|
| |
Message-ID: <48C83522.9010804@profvince.com>
p4raw-id: //depot/perl@34338
|
|
|
|
|
|
|
|
|
|
|
| |
A weakref to a HV would leak, because the xhv_backreferences
array is created with a refcount of 2 (to avoid premature freeing
during global destruction), but the RC was only decremented once
when the parent HV was freed.
Also, when thread cloned, the new array was being created with a
RC of 1, rather than 2, which coincidentally worked due to the
first bug.
p4raw-id: //depot/perl@34209
|
|
|
|
|
| |
if there isn't anything to find.
p4raw-id: //depot/perl@34190
|
|
|
|
|
| |
coincidentally were both from changes I made)
p4raw-id: //depot/perl@33814
|
|
|
|
|
| |
Hedden.
p4raw-id: //depot/perl@33659
|
|
|
|
|
|
|
|
|
| |
Perl_refcounted_he_new_common(), so that Perl_store_cop_label() can
call it without needing to create two temporary SVs. Use it in
newSTATEOP() and eliminate the two temporary SVs. Make
Perl_fetch_cop_label() more defensive by not assuming that the value
for ":" is always a PV. Remove its "compatibility" macro.
p4raw-id: //depot/perl@33657
|
|
|
|
|
|
| |
entry in the hints hash. Most statements don't have labels, so this
will save memory. Not sure how much.
p4raw-id: //depot/perl@33656
|
|
|
|
|
|
| |
size that will actually be allocated, to squeeze last few bytes into
use.
p4raw-id: //depot/perl@33390
|
|
|
|
|
|
|
|
|
|
|
|
| |
ability to create landmines that will explode under someone in the
future when they upgrade their compiler to one with better
optimisation. We've already done this at least twice.
(Yes, some of the assertions are after code that would already have
SEGVd because it already deferences a pointer, but they are put in
to make it easier to automate checking that each and every case is
covered.)
Add a tool, checkARGS_ASSERT.pl, to check that every case is covered.
p4raw-id: //depot/perl@33291
|
|
|
|
|
|
| |
the flags. Move its implementation just ahead of sv_2mortal()'s for
CPU cache locality. Refactor all code that can be to use this.
p4raw-id: //depot/perl@32818
|
|
|
|
|
|
|
|
|
|
| |
flag bits. Right now the only flag bit is SVf_UTF8, which will call
SvUTF8_on() on the new SV for you. Provide a wrapper newSVpvn_utf8(),
which takes a boolean, and passes in SVf_UTF8 if that is true.
Refactor the core to use it where possible. It makes the source code
clearer and smaller, but seems to be swings and roundabouts on object
code size.
p4raw-id: //depot/perl@32807
|
|
|
|
|
| |
wrapper around newSV_type() and tweaking Perl_sv_upgrade().
p4raw-id: //depot/perl@32676
|
|
|
|
|
| |
Message-ID: <20071015215616.GA43800@osiris.mauzo.dyndns.org>
p4raw-id: //depot/perl@32119
|
|
|
| |
p4raw-id: //depot/perl@31937
|
|
|
| |
p4raw-id: //depot/perl@31936
|
|
|
| |
p4raw-id: //depot/perl@31932
|
|
|
|
|
|
|
|
| |
manipulations to convert negative lengths to positive length + UTF-8
flag. hv_delete(), hv_exists(), hv_fetch(), hv_store() and
hv_store_flags() all become mathoms. The macros hv_fetchs() and
hv_stores() call hv_common() directly.
p4raw-id: //depot/perl@31931
|
|
|
|
|
|
| |
Perl_hv_store_flags() into Perl_hv_common(). All already pass in
HV_FETCH_JUST_SV, which only these three pass in.
p4raw-id: //depot/perl@31930
|
|
|
| |
p4raw-id: //depot/perl@31926
|
|
|
|
|
|
| |
hv_store_ent() to macros, and consign the function bodies to history.
Er, mathoms.c
p4raw-id: //depot/perl@31924
|
|
|
|
|
|
| |
(MRO code is calling hash functions during global destruction, hence
the check on SVTYPEMASK.)
p4raw-id: //depot/perl@31922
|
|
|
|
|
| |
as it now also performs hv_delete()/hv_delete_ent()
p4raw-id: //depot/perl@31919
|
|
|
| |
p4raw-id: //depot/perl@31917
|
|
|
|
|
| |
This puts all the key normalisation code in one place.
p4raw-id: //depot/perl@31916
|
|
|
|
|
| |
reset the pre-computed hash value.
p4raw-id: //depot/perl@31913
|
|
|
|
|
| |
hv_store(). (And test this)
p4raw-id: //depot/perl@31912
|
|
|
|
|
|
|
| |
Honour the HV_DISABLE_UVAR_XKEY for hv_delete().
Test this.
[Pass in 3 more parameters to S_hv_magic_uvar_xkey()]
p4raw-id: //depot/perl@31905
|