| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
The two aliases of the new Perl version (in this case, "5.01901" and
"5.019010") were being selected as the two versions to compare.
Unsurprisingly, those two versions have the same modules, so the
generated summary of changes was empty.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
[DELTA]
* Add support for the following API
SvREFCNT_dec_NN
mg_findext
sv_unmagicext
* Update META
Move bug tracker to github
Provide link to repository
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously they would unconditionally add gdbm_compat to the list of wanted
libraries. This is unhelpful if the user has passed Configure arguments to
constrain the library search to avoid libgdbm.so, because Configure would
still end up finding libgdbm_compat.so, which at best is not useful without
libgdbm.so, and at worse could have the same problems that caused the
user to avoid libgdbm.so (eg not compatible with the current compiler flags)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[DELTA]
2014-03-18 Andreas Koenig <k@UX31A>
* release 2.04-TRIAL
* history of master branch was rewritten after Tour de France bughunting
(Lyon #QA2014); apologies to all repository followers: the real history,
as it actually went, is not worth being recorded in the master branch.
* address #91706 and #86915: the 'force install' bug and the endless
loop bugs reported in the two tickets are fixed (joined forces)
* new configure option 'use_prompt_default' (David Golden)
* add new dummy distros OptionalPrereq and CircularPrereq for testing
recommends/suggests support
* experimental recommends/suggests support (David Golden, Andreas Koenig)
* enable hiding of directories in the distroprefs tree (suggested by
Slaven Rezić)
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
This series of commits audits all the code in re_intuit_start()
that handles anchoring, e.g. /^.../, /^.../m, /\G.../.
It fixes a couple of potential performance issues, and makes the code a
lot safer with with \G. (Until recently, intuit was skipped altogether
under \G, so its \G handling isn't well developed and tested.)
|
| |
| |
| |
| |
| | |
After the previous reworking of the PREGf_IMPLICIT tests, move commentary
about PREGf_IMPLICIT closer to where its now relevant.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When BmUSEFUL() for a pattern goes negative, we unset ~RXf_USE_INTUIT.
A bug fix in 2010 (c941595168) made this part of the code also remove
the RXf_ANCH_MBOL at the same time, if PREGf_IMPLICIT was set.
However, this was really just working round a bug in regexec_flags().
Once intuit was disabled, regexec_flags() would then start taking the
buggy code path.
This buggy code path was separately fixed in 2012 by 21eede782, so there's
no longer any need to remove this flag. So don't.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The ml_anch variable is supposed to indicate that a multi-line match is
possible, i.e. that the regex is anchored to a \n.
Currently we just do
ml_anch = (prog->intflags & PREGf_ANCH_MBOL);
However, MBOL is also set on /.*..../; the two cases are distinguished by
adding the PREGf_IMPLICIT flag too.
So at the moment we have lots of tests along the lines of
if (ml_anch && !(prog->intflags & PREGf_IMPLICIT))
Simplify this by adding the IMPLICIT condition when initially calculating
ml_anch, so there's no need to keep testing for it later. This also means
that ml_anch actually means what it says now.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The block of code that deals with absolute anchors looks like:
if (...) {
if (.... && !PREGf_IMPLICIT) ...;
if (FOO) {
assert(!PREGf_IMPLICIT);
....
}
}
where the constraints of FOO imply PREGf_IMPLICIT, as shown by the
assertion. Simplify this to:
if (... && !PREGf_IMPLICIT) {
if (....) ...;
if (FOO) {
....
}
}
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In the stclass block of code, there are various checks for anchored-ness.
Add !(prog->intflags & PREGf_IMPLICIT) to these conditions, since
from the perspective of these tests, we can only quit early etc if these
are real rather than fake anchors.
As it happens, this currently makes no logical difference, since an
PREGf_IMPLICIT pattern starts with .*, and so more or less by definition
can't have an stclass.
So this commit is really only for logical completeness, and to allow us to
change the definition of ml_anch shortly.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The 'check' block of code has special handling for if the pattern is
anchored; in this case, it allows us to set an upper bound on where a
floating substring might match; e.g. in
/^..\d?abc/
the floating string can't be more than 3 chars from the absolute beginning
of the string. Similarly with /..\G\d?abc/, it can't be more than 3 chars
from the start position (assuming that position been calculated correctly
by the caller).
However, the current code used rx_origin as the base for the offset
calculation, rather than strbeg/strpos as appropriate. This meant that
a) the first time round the loop, if strpos > strbeg, then the upper bound
would be set higher than needed;
b) if we ever go back to restart: with an incremented rx_origin, then the
upper limit is recalculated with more wasted slack at the latter end.
This commit changes the limit calculation, which reduces the following
from second to milliseconds:
$s = "abcdefg" x 1_000_000;
$s =~ /^XX\d{1,10}cde/ for 1..100;
It also adds a quick test to skip hopping when the result is likely to
leave end_point unchanged, and adds an explicit test for !PREGf_IMPLICIT.
This latter test isn't strictly necessary, as if PREGf_IMPLICIT were set,
it implies that the pattern starts with '.*', which implies that
prog->check_offset_max == SSize_t_MAX, which is already tested for.
However, it makes the overall condition more comprehensible, and makes it
more robust in the face of future changes.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The quick reject test that says "if a pattern has an absolute anchor,
then immediately reject if strpos != strbeg", currently skips that test
if PREGf_ANCH_GPOS is present. Instead, skip unless BOL or SBOL is present.
This means that something like /^abc\G/ will still do the quick reject
test.
I can't think of any example that will actually give a measurable
performance boost, and this is a fairly unlikely scenario, but the code is
more logical this way, and makes it more robust against future changes
(it's less likely to suddenly skip the quick test where it used to do it).
I've also updated the commentary on why we don't do a quick /\G/ test
akin to the /^/ test, and added some more info about why we test for the
PREGf_IMPLICIT flag.
And I've added an assert about PREGf_IMPLICIT too.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Intuit has a quick reject test for a fixed pattern that is anchored at
both ends. For example, with the pattern /^abcd$/, only the exact strings
"abcd" or "abcd\n" will match; anything else, and the match immediately
fails.
A fix for [perl #115242] correctly made intuit skip the test in the
presence of //m, since in this case the $ doesn't necessarily correspond
to the end of the string.
However, the fix was too wide in scope; it caused //m patterns to skip
searching for a known string anchored just at the start, as well as one
anchored at both ends.
With this commit, the following code now runs in a few milliseconds rather
than a few seconds on my machine:
$s = "abcdefg" x 1_000_000;
$s =~ /(?-m:^)abcX?fg/m for 1..100;
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When MBOL (/^.../m) matching is skipped, the debugging output looks like:
Starting position does not contradict /^/m...
which sounds a bit like the \n test *was* done and passed, rather than
the test being skipped. Change the message to:
(multiline anchor test skipped)
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
re_intuit_start() decided that a pattern was capable of being anchored
after *any* \n in the string for a //m pattern that contains a BOL
(rather than an MBOL). This can happen by embedding one regex in another
for example.
This is an incorrect assumption, and means that intuit() might try
against every \n position in the string rather than just trying at the
beginning. With this commit, the following code on my machine reduces in
execution time from 7000ms to 5ms:
my $r = qr/^abcd/;
my $s = "abcd-xyz\n" x 500_000;
$s =~ /$r\d{1,2}xyz/m for 1..200;
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This makes Perl_do_openn() a wrapper around two functions Perl_do_open_raw()
and Perl_do_open6(), which provide sysopen and open functionality.
In turn, shared setup and cleanup code from these two is moved to two static
functions S_openn_setup() and S_openn_cleanup().
For now both functions are not part of the public API, as they may change,
and offer no functionality that isn't already accessible via Perl_do_openn().
These changes make it easi*er* to follow the twisted logic of open.
|
| |
| |
| |
| |
| | |
This makes it clearer that variables don't hold values between iterations of
the loop, and permits the variable sv to be made const.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Split the ternary that called Perl_do_open_raw() and Perl_do_open6() based
on PL_inplace into two different if blocks, and merge these with the following
code which is also conditional on PL_inplace.
Remove the warning code from an else block and re-indent it, to make it clear
that it is always called if control reaches the end of the while loop.
|
| |
| |
| |
| |
| |
| | |
Calls to Perl_do_openn() all have at least 2 unused arguments which clutter
the code and hinder easy understanding. Perl_do_open6() and
Perl_do_open_raw() each only do one job, so don't have the dead arguments.
|
| |
| |
| |
| |
| |
| |
| | |
Perl_do_open_raw() handles the as_raw part of Perl_do_openn().
Perl_do_open6() handles the !as_raw part of Perl_do_openn().
do_open6() isn't a great name, but I can't see an obvious concise name that
covers 2 arg open, 3 arg open, piped open, implicit fork, and layers.
|
| |
| |
| |
| |
| |
| | |
A 12 parameter function is extremely ugly (as demonstrated by the need to add
macros for it to perl.h), but it's private, and it will permit the two-headed
public interface of Perl_do_openn() to be simplified.
|
| | |
|
| |
| |
| |
| |
| | |
Rename the first uses of the variable fd to wanted_fd to show that the
variable is not used to pass a value to later in the function.
|
| |
| |
| |
| |
| |
| | |
This also removes a couple of places which would set result = 0 to simulate
"success" for an a later if block. Those paths now don't even reach that
if block.
|
| |
| |
| |
| |
| |
| | |
These variables are no longer used later in the function, so no need to set
them. This permits the declaration of the variable namesv to be moved from
the top of the function into the blocks that use it.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If narg is NULL, then PerlIO_openn() doesn't look at args.
(Technically except for PerlIOStdio_open() if f is non-NULL, which doesn't
check narg and assumes that args[0] is valid. That lack of check is probably
a bug. But it doesn't matter in this case, as f is NULL)
This makes it clear that arg isn't needed at this point in Perl_do_openn().
This is a more complete version of the change made by commit dd37d22f759197ae
(March 2002), which just changed the call to pass 0 for narg.
|
| |
| |
| |
| |
| |
| | |
These 4 variables are only needed there, so by moving them into the block we
save doing unneeded work for the as_raw case (ie sysopen), and as a side
effect make the function a bit clearer.
|
|/
|
|
|
|
| |
These have the same text as other warnings which are tested. However the
existing tests only covered the code path where a directory was able to be
opened (read only) and then caught by an explicit stat test for non-files.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[DELTA]
- added OUTPUT clause in SHA.xs to silence compiler warning
-- ref. shaclose()
- changed text file test (-T) to act on filehandles
-- ref. addfile portable mode
-- improves consistency when reading from STDIN
-- still acts on filenames for early Perls (< 5.6)
- added -M and -V options to shasum
-- undocumented: for development and testing use only
|
|
|
|
| |
A file path is supposed to be enclosed in F<>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
eb0925341cc65ce6ce57503ec0ab97cdad39dc98 caused the definitions for
about 45% of the Unicode tables to be placed in-line in Heavy.pl instead
of them having to be read-in from disk. This new commit extends that so
that about 55% are in-lined, by in-lining tables which consist of up to
3 ranges.
This is a no-brainer to do, as the memory usage does not increase by
doing it, and disk accesses go down. I used the delta in the disk size
of Heavy.pl as a proxy for the delta in the memory size that it uses,
as what this commit does is to change various scalar strings in it.
Doing this measurement indicates that this commit results in a slightly
smaller Heavy.pl than what was there before eb092534. The amounts will
vary between Unicode releases. I also checked for Unicode beta 7.0, and
the sizes are again comparable, with a slightly larger Heavy.pl for the
3-range version there.
For 4-, 5-, ... range tables, doing this results in slowly increasing
Heavy.pl size (and hence more and more memory use), and that is
something we may wish to look at in the future, trading memory for fewer
files and less disk start-up cost. But for the imminent v5.20, doing it
for 3-range tables doesn't cost us anything, and gains us fewer disk
files and accesses.
|
|
|
|
|
|
| |
Zero-length tables are no longer expressed in terms of the Perl 'All'
property, so the sort no longer has to make sure the latter is processed
before the former.
|
|
|
|
|
| |
This adds some clarifying comments, and reorders Heavy.pl so the array
referred to by two hashes occurs before both hashes in the output.
|
|
|
|
|
| |
This indents code to conform to the new block created in the previous
commit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit puts the in-lined definitions introduced by
eb0925341cc65ce6ce57503ec0ab97cdad39dc98 into a separate array,
where each element is a unique definition. This can result in slightly
smaller current memory usage in utf8_heavy.pl, as the strings giving the
file names now only appear once, and what replaces them in the hash
values are strings of digits indices, which are shorter.
But doing this allows us in a later commit to increase the number of
ranges in the tables that get in-lined, without increasing memory usage.
This commit also changes the code that generates the definitions to be
more general, so that it becomes trivial to change things to generate
in-line definitions for tables with more than one range.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit eb0925341cc65ce6ce57503ec0ab97cdad39dc98 introduced the idea of a
pseudo-directory as a way to store table definitions in-line in
Heavy.pl, but conform to the expectations of the code in regard to
objects being files within directories. This kept the needed changes to
a minimum. The code changed by the current commit was overlooked then
as something that also needed to change, because there are no current
instances of it needing to. But this could change with future Unicode
versions, or as in the next few commits, in extending the in-line
definitions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
# New Ticket Created by Matthew Horsfall
# Please include the string: [perl #121431]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=121431 >
This is a bug report for perl from wolfsage@gmail.com,
generated with the help of perlbug 1.39 running under perl 5.14.2.
-----------------------------------------------------------------
[Please describe your issue here]
The included patch allows test.valgrind to run tests in parallel.
Valgrind output for each test will be printed out after the test
completes, with the name of the test prefixing every line.
Example usage might be:
TEST_JOBS=8 make test.valgrind VALGRIND='valgrind -q' 2>&1 | tee out.txt
-q is needed to ensure only *errors* are captured, otherwise the output will
be much louder than it already is. (Perhaps this should be the default mode?)
[Please do not change anything below this line]
-----------------------------------------------------------------
|
|\ |
|
| | |
|