| 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.
|
| |
|
|
|
|
|
|
| |
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;
|
|
|
|
|
| |
public API and be used outside the core. However, leave Perl_mro_meta_init() as
a private implementation detail.
|
|
|
|
|
|
|
|
|
|
| |
Add a parameter to S_incpush to indicate if the new directory should be
appended or prepended to @INC, and use it set to TRUE when parsing the
shebang line.
There is also a better version of the test.
This replaces commit ccb8f6a64f3dd06b4360bc27c194b28e6766a6ad.
|
|
|
|
|
| |
|| defined(PERL_DECL_PROT), so add this where it is missing.
p4raw-id: //depot/perl@34972
|
|
|
|
|
|
|
| |
From: "Jerry D. Hedden" <jdhedden@cpan.org>
Message-ID: <1ff86f510812010947p7df19438kc19c279bcffe4b83@mail.gmail.com>
Date: Mon, 1 Dec 2008 12:47:35 -0500
p4raw-id: //depot/perl@34971
|
|
|
|
|
| |
and Perl_save_aelem().
p4raw-id: //depot/perl@34966
|
|
|
|
|
|
| |
scope.c. "Inlined" macro functions in scope.h are actually space
inefficient.
p4raw-id: //depot/perl@34965
|
|
|
| |
p4raw-id: //depot/perl@34963
|
|
|
| |
p4raw-id: //depot/perl@34960
|
|
|
|
|
|
|
|
|
| |
SSCHECK(3);
SSPUSHINT(i);
SSPUSHPTR(ptr);
SSPUSHINT(type);
into a static function S_save_pushi32ptr().
p4raw-id: //depot/perl@34959
|
|
|
|
|
|
|
|
|
|
|
| |
SSCHECK(3);
SSPUSHPTR(ptr1);
SSPUSHPTR(ptr2);
SSPUSHINT(type);
into a static function S_save_pushptrptr().
It might be possible to make some of its callers trivial macros, and
so eliminate them as functions. But start with the easy part.
p4raw-id: //depot/perl@34957
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
go.
p4raw-id: //depot/perl@34944
|
|
|
| |
p4raw-id: //depot/perl@34941
|
|
|
|
|
|
| |
biologist word for stable" Msql-Mysql-modules-1.2219) so make it
static.
p4raw-id: //depot/perl@34940
|
|
|
| |
p4raw-id: //depot/perl@34938
|
|
|
|
|
| |
go.
p4raw-id: //depot/perl@34937
|
|
|
|
|
| |
static. Macros PUSHSUBST() and POPSUBST() are only viable in PERL_CORE.
p4raw-id: //depot/perl@34935
|
|
|
| |
p4raw-id: //depot/perl@34933
|
|
|
| |
p4raw-id: //depot/perl@34932
|
|
|
| |
p4raw-id: //depot/perl@34931
|
|
|
|
|
| |
Protect the prototype of S_vdie() with #if defined (PERL_IN_UTIL_C)
p4raw-id: //depot/perl@34929
|
|
|
| |
p4raw-id: //depot/perl@34927
|
|
|
| |
p4raw-id: //depot/perl@34926
|
|
|
|
|
| |
Wrap gen_constant_list in #if defined(PERL_IN_OP_C)
p4raw-id: //depot/perl@34925
|
|
|
| |
p4raw-id: //depot/perl@34924
|
|
|
| |
p4raw-id: //depot/perl@34923
|
|
|
|
|
| |
in the core. So it can go.
p4raw-id: //depot/perl@34922
|
|
|
| |
p4raw-id: //depot/perl@34920
|
|
|
|
|
| |
be static in op.c, so make it so.
p4raw-id: //depot/perl@34919
|
|
|
|
|
|
| |
reliable way I can see to keep our (unsupported) privates private is
to make them static whenever we can.
p4raw-id: //depot/perl@34918
|
|
|
| |
p4raw-id: //depot/perl@34917
|
|
|
| |
p4raw-id: //depot/perl@34904
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Message-ID: <20081111000040.GB19329@tytlal.topaz.cx>
p4raw-id: //depot/perl@34819
|
|
|
| |
p4raw-id: //depot/perl@34586
|
|
|
| |
p4raw-id: //depot/perl@34569
|
|
|
|
|
| |
Message-ID: <48CAF79A.6000001@profvince.com>
p4raw-id: //depot/perl@34358
|
|
|
|
|
| |
don't need to pass in name_stash as a parameter.
p4raw-id: //depot/perl@34349
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
From: "Vincent Pit" <perl@profvince.com>
Message-ID: <63615.92.128.97.94.1209490401.squirrel@92.128.97.94>
p4raw-id: //depot/perl@33766
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
(global.sym had been inconsistent with embed.fnc, but it turns out that
global.sym was actually correct.)
p4raw-id: //depot/perl@33677
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Perl_sv_insert() to mathoms.c
p4raw-id: //depot/perl@33627
|