| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
(and run "make regen")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Consider what currently happens when the tokenizer is scanning a string.
It looks through it byte-by-byte until it finds a character that forces
it to decide to go to utf8. It then calls sv_utf8_upgrade() with the
portion of the string scanned so far.
sv_utf8_upgrade() starts over from the beginning, and scans the string
byte-by-byte until it finds a character that varies between non-utf8 and
utf8. It then calls bytes_to_utf8().
bytes_to_utf8() allocates a new string that can handle the worst case
expansion, 2n+1, of the entire string, and starts over from the
beginning, and scans the input string byte-by-byte copying and
converting each character to the output string as it goes.
It doesn't return the size of the new string, so sv_utf8_upgrade()
assumes it is only as big as what actually got converted, throwing away
knowledge of any spare.
It then returns to the tokenizer, which immediately does a grow to get
space for the unparsed input. This is likely to cause a new string to
be allocated and copied from the one we had just created, even if that
string in actuality had enough space in it.
Thus, the invariant head portion of the string is scanned 3 times, and
probably 2 strings will be allocated and copied.
My solution to cutting this down is to do several things.
First, I added an extra flag for sv_utf8_upgrade that says don't bother
to check if the string needs to be converted to utf8, just assume it
does. This eliminates one of the passes.
I also added a new parameter to sv_utf8_upgrade that says when you
return, I want this much unused space in the string. That eliminates
the extra grow.
This was all done by renaming the current work-horse function from
sv_utf8_upgrade_flags to be sv_utf8_upgrade_flags_grow() and making the
current function name be a macro which calls the revised one with a 0
grow parameter.
I also improved the internal efficiency of sv_utf8_upgrade so that when
it does scan the string, it doesn't call bytes_to_utf8, but does the
conversion itself, using a fast memory copy instead of the byte-oriented
one for the invariant header, and it uses that header to get a better
estimate of the needed size of the new string, and it doesn't throw away
the knowledge of the allocated size.
And, if it is clear without scanning the whole string that the
conversion will fit in the already allocated string, it just uses that
instead of allocating and copying a new one, using the algorithm I
copied from the tokenizer. (In this case it does have to finish
scanning the whole string to get the correct size.) The comments have
details.
It still is byte-oriented. Vectorization et. al. could yield
performance improvements. One idea for that is in the comments.
The patch also includes a new synonym I created which is a more accurate
name than NATIVE_TO_ASCII.
|
| |
|
|
|
|
| |
which can be called from C code (such as the guts of extensions).
|
|
|
|
|
| |
public API and be used outside the core. However, leave Perl_mro_meta_init() as
a private implementation detail.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This is only a macro, without a Perl_ implementation.
Hopefully this fixes the Win32 build.
|
|
|
|
| |
Necessary after change fe749c9aa803ce74d997ff797103481a55741837
|
|
|
|
|
| |
but is failing on Windows. Anyways sv_utf8_upgrade_nomg() is
a macro anyways, so moving the documentation to sv.h.
|
|
|
|
|
|
| |
From: karl williamson <public@khwilliamson.com>
Date: Tue, 16 Dec 2008 16:00:34 -0700
Message-ID: <49483312.80804@khwilliamson.com>
|
|
|
|
|
|
|
|
|
| |
SSCHECK(2);
SSPUSHPTR(o);
SSPUSHINT(SAVEt_FREEOP);
into a single function Perl_save_pushptr(ptr, type), which the others
call. Implement the others as macros. This reduces the object code size.
p4raw-id: //depot/perl@34956
|
|
|
|
|
| |
in the core. So it can go.
p4raw-id: //depot/perl@34922
|
|
|
|
|
|
|
|
|
|
|
|
| |
handler to SIG_DFL
Message-ID: <20081112234504.GI2062@tytlal.topaz.cx>
Updated patch to retain source compatibility.
Plus using the correct PERL_ARGS_ASSERT_SAVE_HELEM_FLAGS
macro and running make regen.
p4raw-id: //depot/perl@34829
|
|
|
| |
p4raw-id: //depot/perl@34586
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
gv_fetchmethod. It therefore needs to duplicate a lot of
the internals of that function.
"Duplicate". <snigger>. You said a naughty word. Now sanitised.
[All tests pass, but I'm not 100% confident that this code is
equivalent in all reachable corner cases, and it may be possible
to simplify the error reporting logic now in gv_fetchmethod_flags]
p4raw-id: //depot/perl@33702
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Message-ID: <47F119E8.5010106@profvince.com>
p4raw-id: //depot/perl@33618
|
|
|
|
|
| |
Message-ID: <20080125001052.GA29980@refcnt.homeunix.org>
p4raw-id: //depot/perl@33083
|
|
|
|
|
|
|
|
| |
Message-ID: <86zlveaewk.fsf@cpan.org>
with two corrections.
Plus remove reg_stringify from embed.fnc and regen.
p4raw-id: //depot/perl@32934
|
|
|
|
|
|
|
|
| |
offset as either a byte (if <256), or a 0 byte with a STRLEN before.
"better" in that the reading can be inlined, and even then the object
code is smaller (function calls have space overhead). So goodbye
Perl_sv_read_offset() and hello SvOOK_offset().
p4raw-id: //depot/perl@32838
|
|
|
|
|
|
|
|
|
|
|
| |
number in the part of the PVX that is being released. (It will always
fit, as chopping off 1 byte gives just enough space for recording a
delta of up to 127). This allows SvOOK() to co-exist with SvIOK_on(),
which means all the calls to SvOOK_off() [with the possibility of a
call to sv_backoff()] in SvIOK_on() can be removed. This ought to make
a lot of straight line code a little bit simpler.
OOK()d scalars can now be SVt_PV, as the IVX isn't needed.
p4raw-id: //depot/perl@32836
|
|
|
| |
p4raw-id: //depot/perl@32823
|
|
|
| |
p4raw-id: //depot/perl@32806
|
|
|
| |
p4raw-id: //depot/perl@32682
|
|
|
|
|
|
|
|
| |
From: "Jerry D. Hedden" <jdhedden@cpan.org>
Message-ID: <1ff86f510711061136t52a1fe62waf384c4551612181@mail.gmail.com>
(core patch only)
p4raw-id: //depot/perl@32241
|
|
|
| |
p4raw-id: //depot/perl@31970
|
|
|
|
|
|
|
|
| |
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
|
|
|
| |
p4raw-id: //depot/perl@31925
|
|
|
| |
p4raw-id: //depot/perl@31891
|
|
|
|
|
| |
linkage.
p4raw-id: //depot/perl@31849
|
|
|
|
|
| |
(so Sub::Current works on Windows)
p4raw-id: //depot/perl@31548
|
|
|
|
|
|
| |
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Message-ID: <51dd1af80706031324y5618d519p460da27a2e7fe712@mail.gmail.com>
p4raw-id: //depot/perl@31341
|
|
|
| |
p4raw-id: //depot/perl@31245
|
|
|
|
|
|
| |
report_uninit was not exported on Win32 and
my_reg_numbered_buff_length had wrong prototype
p4raw-id: //depot/perl@31132
|
|
|
|
|
|
| |
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Message-ID: <51dd1af80705011658g1156e14cw4d2b21a8d772ed41@mail.gmail.com>
p4raw-id: //depot/perl@31130
|
|
|
| |
p4raw-id: //depot/perl@31112
|
|
|
|
|
|
| |
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Message-ID: <51dd1af80704261922j3db0615wa86ccc4cb65b2713@mail.gmail.com>
p4raw-id: //depot/perl@31106
|
|
|
|
|
|
|
| |
Subject: Re: mro callbacks patch
From: "Brandon Black" <blblack@gmail.com>
Message-ID: <84621a60704231658o4c85783ere3c3e90dd614c30b@mail.gmail.com>
p4raw-id: //depot/perl@31086
|
|
|
|
|
|
| |
From: "Brandon Black" <blblack@gmail.com>
Message-ID: <84621a60704171114k29b0460el5b08ce5185d55ed5@mail.gmail.com>
p4raw-id: //depot/perl@30980
|
|
|
|
|
|
| |
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Message-ID: <51dd1af80703291552y1073bcb6r954b043eb68a4459@mail.gmail.com>
p4raw-id: //depot/perl@30849
|
|
|
|
|
| |
Message-ID: <20070320135915.GA25192@cds.nl>
p4raw-id: //depot/perl@30716
|
|
|
|
|
|
|
|
|
| |
pattern is a qr.
Message-ID: <9b18b3110703210239x540f5ad9mdb41c2ea6229ac31@mail.gmail.com>
plus two follow-up patches (minor tweaks)
p4raw-id: //depot/perl@30678
|
|
|
|
|
|
| |
backwaters of 'p'. Not being visible to 'EX'tensions means that there's
less exposure to maintenance compatibility concerns.
p4raw-id: //depot/perl@30552
|
|
|
|
|
| |
Message-ID: <9b18b3110703071144t787e028s8a79fa1986624b54@mail.gmail.com>
p4raw-id: //depot/perl@30517
|
|
|
|
|
|
| |
sv = newSV(0);
sv_upgrade(sv, type);
p4raw-id: //depot/perl@30347
|
|
|
|
|
| |
Missed that global.sym was modified.
p4raw-id: //depot/perl@30335
|
|
|
|
|
|
|
| |
comparison)
Message-ID: <Pine.LNX.4.62.0702091121400.10202@fractal.phys.lafayette.edu>
p4raw-id: //depot/perl@30192
|
|
|
|
|
|
| |
buffer. (Requires adding gv_fetchfile_flags(), savesharedpvn() and
CopFILE_setn() to provide pointer/length versions of APIs)
p4raw-id: //depot/perl@30015
|