| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
Benchmarking with single inheritance suggests that this is 10% faster.
|
|
|
|
| |
(Fix to change 34354, which introduced a cached hash to make ->isa O(1))
|
|
|
|
| |
S_mro_get_linear_isa_dfs(), we can move get_isa_hash() to any other source file.
|
| |
|
|
|
|
| |
mro::method_changed_in(), which is used by constant.
|
|
|
|
| |
AV * to HV *.
|
|
|
|
| |
from AV * to SV *.
|
|
|
|
| |
which can be called from C code (such as the guts of extensions).
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
core, in ext/mro/mro.xs. Also move mro::_nextcan() to mro.xs. It needs direct
access to S_mro_get_linear_isa_c3(), and nothing on CPAN calls it, except via
methods defined in mro.pm. Hence all users already require mro;
|
|
|
|
|
|
| |
Perl_mro_get_from_name() to retrieve MROs by name, and PL_registered_mros to
store them in. Abolish the static array of mros, and instead register the dfs
and c3 MRO structures.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
[Unless it's a signed concept, use an usigned type.]
p4raw-id: //depot/perl@34948
|
|
|
|
|
|
| |
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@34650
|
|
|
| |
p4raw-id: //depot/perl@34629
|
|
|
| |
p4raw-id: //depot/perl@34585
|
|
|
|
|
|
|
| |
about "value computed is not used". Re-order the code to group
operations on the isa hash with each other. Add a SvREADONLY_on() on
the isa array if it is generated by Perl_get_isa_hash().
p4raw-id: //depot/perl@34357
|
|
|
|
|
|
| |
of dfs. This avoids calling dfs on a C3 class (and all its parents),
which won't break anything, but is more work than is needed.
p4raw-id: //depot/perl@34356
|
|
|
| |
p4raw-id: //depot/perl@34355
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
key scalar from the key of the hash entry we've just creating.
(Currently the hash is disposed of afterwards, but soon it won't, so
having both point to the same string buffer will also save memory.)
p4raw-id: //depot/perl@34215
|
|
|
|
|
| |
hv_store_ent() can be replaced with an lvalue fetch.
p4raw-id: //depot/perl@34214
|
|
|
|
|
|
|
| |
the form Perl_croak(aTHX_ "Usage %s::%s(%s)", "ouch" "awk", "eee_yow");
down to croak_xs_usage(cv, "eee_yow"); and refactor all the core XS
code to use it. This adds () to the error messages for attributes::*
p4raw-id: //depot/perl@33901
|
|
|
|
|
|
|
| |
Subject: [perl #51092] [PATCH] Segfault when calling ->next::method on non-existing package
From: ilmari@vesla.ilmari.org (via RT) <perlbug-followup@perl.org>
Message-ID: <rt-3.6.HEAD-15287-1203654581-377.51092-75-0@perl.org>
p4raw-id: //depot/perl@33367
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
and mortalizing them. Use these macros where possible. And also
mX?PUSH[inpu] where possible.
p4raw-id: //depot/perl@32821
|
|
|
|
|
|
| |
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
|
|
|
| |
p4raw-id: //depot/perl@32815
|
|
|
|
|
|
|
|
| |
gv_stashsv() is just a wrapper for gv_stashpvn(), so doesn't need an
SV internally. Hence avoid creating lots of mortal SVs by using
hv_iterkey() to get the keys and lengths.
Also tweak whitespace in change 32168.
p4raw-id: //depot/perl@32169
|
|
|
|
|
|
|
| |
hv_store() a new HV if fetch drew a blank, as we can detect the new SV
an LVALUE fetch gave us, and replace it with a new HV, which will be
more efficient.
p4raw-id: //depot/perl@32168
|
|
|
|
|
| |
hv_store(), as hv_fetch() can do it all for us.
p4raw-id: //depot/perl@32167
|
|
|
|
|
| |
and S_mro_get_linear_isa_dfs() we can create scalars more efficiently.
p4raw-id: //depot/perl@32133
|
|
|
|
|
| |
we already know the string length.
p4raw-id: //depot/perl@32105
|
|
|
| |
p4raw-id: //depot/perl@31991
|
|
|
|
|
|
| |
mro::get_linear_isa() when passed a second parameter). However, there
were no tests for this. Fix both.
p4raw-id: //depot/perl@31981
|
|
|
|
|
|
|
|
| |
defined in the header, to a pointer to a structure. This allows the
flexibility to easily add more MROs in the future, and to provide an
API to do so. Dispatch in mro.c is now via the structure pointed to,
rather than switch statements on the value of the enum.
p4raw-id: //depot/perl@31977
|
|
|
| |
p4raw-id: //depot/perl@31936
|
|
|
|
|
| |
As we have an SV, call hv_fetch_ent() rather than hv_fetch().
p4raw-id: //depot/perl@31921
|
|
|
|
|
| |
linkage.
p4raw-id: //depot/perl@31849
|
|
|
| |
p4raw-id: //depot/perl@31514
|
|
|
| |
p4raw-id: //depot/perl@31513
|
|
|
|
|
|
|
|
|
|
|
| |
That change was adding a hook to cope with the case when one was
undef'ining *ISA globs, in order to clean up correctly. However, this
broke the case where one was assiging an array ref to @ISA, which
is likely to be more common.
Conclusion: don't undef *ISA. (or more generally don't undef globs
that contain magical variables)
p4raw-link: @31489 on //depot/perl: 5be5c7a687aa37f2ea9dec7988eb57cad1f1ec24
p4raw-id: //depot/perl@31502
|
|
|
|
|
|
| |
From: "Brandon Black" <blblack@gmail.com>
Message-ID: <84621a60706281358o3b379b20k2c1e53566587d79b@mail.gmail.com>
p4raw-id: //depot/perl@31501
|
|
|
|
|
|
| |
From: "Brandon Black" <blblack@gmail.com>
Message-ID: <84621a60706270807r7af65546x8d959b131ffa28e6@mail.gmail.com>
p4raw-id: //depot/perl@31489
|
|
|
|
|
|
| |
From: "Brandon Black" <blblack@gmail.com>
Message-ID: <84621a60706130619g17c9d2fbi111cca567da3d500@mail.gmail.com>
p4raw-id: //depot/perl@31370
|