| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Commit aa33328e8 inadvertently removed the null checks from
stashpv_hvname_match when adding UTF8 support, resulting in crashes it
List::Gen’s test suite.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
097ee67dff1c60f2 didn't need to include <locale.h> in locale.c (then
util.c) because it had been included by perl.h since 5.002 beta 1
3f270f98f9305540 missed removing the include of <unistd.h> from perl.c
or perlio.c
de8ca8af19546d49 changed perl.h to also include <sys/wait.h>, but didn't
notice that it code therefore be removed from perl.c, pp_sys.c and util.c
|
| |
|
|
|
|
|
|
|
|
| |
global.sym was a file listing the exported symbols, generated by regen/embed.pl
from embed.fnc and regen/opcodes, which was only used by makedef.pl
Move the code that generates global.sym from regen/embed.pl to makedef.pl,
and thereby eliminate the need to ship a 907 line generated file.
|
|
|
|
|
|
|
| |
For the default (non-multiplicity) configuration, PERLVAR*() macros now
directly expand their arguments to tokens such as C<PL_defgv>, instead of
expanding to C<PL_Idefgv>. This removes over 350 lines from F<embedvar.h>,
which defined macros to map from C<PL_Idefgv> to C<PL_defgv> and so forth.
|
| |
|
|
|
|
|
|
|
| |
The assumption is that most studied strings are fairly short, hence the pain
of the extra code is worth it, given the memory savings.
80 character string, 336 bytes as U8, down from 1344 as U32
800 character string, 2112 bytes as U16, down from 4224 as U32
|
|
|
|
| |
The "no more" condition is now represented as ~0, instead of -1.
|
|
|
|
|
|
|
|
|
| |
In pp_study eliminate the variable pos, which duplicates len. ch should be U8,
not I32.
In Perl_screaminstr(), move the declarations of s and x to their point of use,
convert a for loop to a while loop, and avoid incrementing and decrementing s.
found is a boolean.
|
|
|
|
|
| |
This allows more than one C<study> to be active at the same time.
It eliminates PL_screamfirst, PL_lastscream, PL_maxscream.
|
|
|
|
|
| |
Effectively, PL_screamnext is now PL_screamfirst + 256. The actual interpreter
variable PL_screamnext is eliminated.
|
|
|
|
|
|
|
|
|
|
| |
PL_screamnext gives the position of the next occurrence of the current octet.
Previously it stored this as an offset from the current position, with -pos
stored for "no more", so that the calculated new offset would be zero,
allowing a zero/non-zero loop exit test in Perl_screaminstr().
Now it stores absolute position, with -1 for "no more". Also codify -1 as the
"not present" value for PL_screamfirst, instead of any negative value.
|
|
|
|
| |
'Invalid version format (non-numeric data)' as it currently does. Also update documentation that version should be a positive number.
|
|
|
|
|
|
|
|
|
|
|
| |
They were converted in perl.h from const char[] to #define in 31fb120917c4f65d,
then re-instated as const char[], but in perlvars.h, in 3fe35a814d0a98f4.
There's no need for compile-time constants to jump through the hoops of
perlvars.h, even for Symbian, as the various "EXTCONST" variables already in
perl.h demonstrate.
These were the only 3 users of the the PERLVARISC macro, so eliminate that, and
all related code.
|
|
|
|
| |
Provide magic_vtable_max, the number of elements in PL_magic_vtables[].
|
|
|
|
|
| |
Magic with a NULL vtable is equivalent to magic with a vtable of all 0s.
On CPAN, only Apache::Peek's code for 5.005 is referencing it.
|
|
|
|
| |
This turns out to be a simpler solution than 9ba75e3cf905a6e6.
|
|
|
|
|
|
|
|
| |
This should reduce the complexity of code dealing with GVs, as they no longer
try to play several different incompatible roles.
(As suggested by Ben Morrow. However, it didn't turn out to be as
straightforward as one might have hoped).
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the 256 byte Boyer-Moore table was stored in the buffer of SvPVX()
after the raw string by extending the buffer.
Given that the scalar is alway upgraded to add PERL_MAGIC_bm magic, to clear
the table and other flags, there's no extra memory cost in using mg_ptr in the
MAGIC struct to point directly to the table.
I believe that this removes the last place in the core that stores data beyond
SvCUR().
|
|
|
|
|
| |
I believe that this can only happen if a constant subroutine is used more than
once as the second argument to index.
|
|
|
|
|
| |
Previously the special-case code for lengths 0, 1 and 2 was in a nested set
of if() statements, which was slightly cryptic to read.
|
|
|
|
|
|
|
|
|
| |
This should fix a theoretical bug on strings longer than 2**32 bytes where the
byte referenced by BmRARE() is at an offset beyond 2**32. I'm not sure how to
test this, as I think to trigger it one would need to have one of
a: the second argument to index as a string literal, longer than 2**32 bytes
b: a fixed string in a regex, longer than 2**32 bytes
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't set BmFLAGS() in Perl_fbm_compile()
Originally fbm_compile() had an I32 flags argument, which seems to have been
part of case folding/locale improvements. bbce6d69784bf43b removed this.
SvTAIL() was only used in once place until c277df42229d99fe. 2779dcf1a3ceec16
added the U32 flags argument to fbm_compile(), not used until cf93c79d660ae36c.
That commit also added FBMcf_TAIL and FBMcf_TAIL{z,Z,DOLLAR} but didn't use the
last three. Additionally, it stored the BmFLAGS as part of the compiled table:
+ table[-1] = flags; /* Not used yet */
f722798beaa43749 added FBMcf_TAIL_DOLLARM, renumbered FBMcf_TAIL{z,Z,DOLLAR},
but still didn't use anything other than FBMcf_TAIL.
The core, nothing on CPAN, and nothing visible to Google codesearch, has ever
used the 4 specialist flags. The only use is 0 or FBMcf_TAIL, which is in
lockstep with SvTAIL() of 0 or non-0.
|
|
|
|
|
| |
No real-world code would ever end up using a studied scalar as a compile-time
second argument to index, so this isn't a real pessimisation.
|
|
|
|
|
|
|
|
| |
gcc reports an unused variable 'tmpgv', this was left
behind by commit 0e21945565eb4664d843bb819fb032cedee4d5a6.
Deleting the declaration has no consequences.
Signed-off-by: David Golden <dagolden@cpan.org>
|
|
|
|
|
|
|
|
|
|
|
| |
instead of caching it
The intent is that by not caching $$, we eliminate one opportunity for bugs:
If one embeds Perl or uses XS and calls fork(3) from C, Perls notion of $$
may go out of sync with what getpid() returns. By always fetching the
value of $$ via getpid(), this bug opportunity is eliminated. The overhead
of always fetching $$ should be small and is likely only used for tempfile
creation, which should be dwarfed by file system accesses.
|
|
|
|
|
|
| |
gcc 4.6.0 warns about variables that are set but never read, and for most
combinations of conditional compilation options, total_size is never read.
So avoid declaring or setting it if it's not actually going to be used later.
|
|
|
|
|
|
| |
It was inadvertently broken by 2e0cfa16dea85dd3. Many tests still fail, but
that is unrelated to that change. It's more likely that we will remove
-Uuseperlio than fix the tests.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
or on close() in either thread.
close() in one thread blocks until close() is called in the other
thread, because both closes are waiting for the child process to end.
Since we have a reference-counting mechanism for the underlying
fileno, we can use that to determine whether close() should wait.
This does not solve the problem of close $OUT block when it has been
duplicated via open $OUT2, ">&" and $OUT2 is still in scope.
|
| |
|
|
|
|
| |
No other changes were made
|
|
|
|
|
|
| |
This function is only used in the same places as dquote_static.c is
used, so move it there, and we won't have to worry about changing its
API will break something. No other changes made
|
|
|
|
|
|
|
| |
At two points in util.c, there is code that use vsnprintf
if available, otherwise vsprintf. The handling of the return
value does not reflect which function has been called.
The patch tries to improve this.
|
|
|
|
|
|
| |
Add a flag G_WRITING_TO_STDERR to signal that Perl_magic_methcall() needs to
localise PL_stderrgv to NULL, and save/free temps, inside its ENTER/LEAVE
pair.
|
|
|
|
|
|
|
|
|
| |
# New Ticket Created by (Peter J. Acklam)
# Please include the string: [perl #81904]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=81904 >
Signed-off-by: Abigail <abigail@abigail.be>
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Previously Perl_report_evil_fh()'s body was just an if/else at the top level -
a good sign that it is actually implementing two disjoint functions.
|
|
|
|
|
|
|
|
|
|
| |
This function compares two non-utf8 strings to see if they are
equivalent without regards to case differences. It does not work nor
check for three problematic code points that require special handling:
MICRO_SIGN, LATIN_SMALL_LETTER_SHARP_S, and
LATIN_SMALL_LETTER_Y_WITH_DIAERESIS.
make regen required
|
|
|
|
|
|
|
| |
Attached is a patch that bring the core Perl version code inline with
the latest CPAN release. The vast majority of changes are in code that
does not execute in core, but that makes it easier to keep the core and
CPAN changes in sync.
|
| |
|
|
|
|
|
| |
It now only exists as a compatibility macro for extensions that want to
introspect it.
|
|
|
|
|
| |
The address printed for malloc() didn't always match that for free().
Print the malloc() address *after* any modification by PERL_TRACK_MEMPOOL
|
|
|
|
| |
Use fewer mortals, and avoid leaking an SV if upg_version() croaks.
|
|
|
|
|
|
| |
The previous macro generated over .5K of object code. This is in every shared
object, and is only called once. Hence this change increases the perl binary
by about .5K (once), to save .5K for every XS module loaded.
|