| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The blamed commit, 04de022, exposed a bug in the module itself. I will
submit a PR to fix it.
But this ticket did tell me that there was a problem with that commit.
It returned a C language value, CHAR_MAX, which doesn't really have a
corresponding concept in Perl. Instead we use -1 to indicate that a
positive-valued variable is in some abnormal state. This commit changes
to do that, and documents the changes, which should have been done in
04de022.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes GH #20565.
Lack of tests allowed sync_locale() to get broken until CPAN testing
showed it so.
Basically, I blew it in 9f5a615be674d7663d3b4719849baa1ba3027f5b. Most
egregiously, I forgot to turn back on when a sync_locale() is executed,
the toggling for locales whose radix character isn't a dot. And this
needs a way to tell the other code that it needs to recompute things at
this time, since our records don't reflect what happened before the
sync.
|
|
|
|
|
|
| |
API switch_to_global_locale() and sync_locale() weren't tested because I
hadn't figured out a way to do so, but @dk showed me the way in his
reproducing case for GH #20565.
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to this commit there was code (whose results were ignored) looking
for a locale with a non-dot radix. This can result in a UTF-8 radix,
which may not display properly without the terminal and file handle
being in sync. Almost all non-dot locales use a comma, which is
represented the same in UTF-8 as not, so doesn't suffer from the display
problem. So look specifically for a comma.
The result is still unused, but the next commit will use it.
|
|
|
|
|
| |
This commit adds/improves some comments, changes a variable name, and
adds some parentheses, and moves a declaration (since we now use C99).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This op is constructed using an OP_HELEM as the op_first and any scalar
expression as the op_other.
It is roughly equivalent to the following perl code:
exists $hv{$key} ? $hv{$key} : OTHER
except that the HV and the KEY expression are evaluated only once, and
only one hv_* function is invoked to both test and obtain the value. It
is therefore smaller and more efficient.
Likewise, adding the OPpHELEMEXISTSOR_DELETE flag turns it into the
equivalent of
exists $hv{$key} ? delete $hv{$key} : OTHER
|
|
|
|
|
|
| |
If Perl is compiled to not pay attention at all to locales, everything
effectively becomes the C locale, which isn't a UTF-8 one. So we know
that at compile time.
|
| |
|
|
|
|
| |
Adapt to future deprecation of smartmatch
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to this commit, when run with PERL_TEST_HARNESS_ASAP, there were
three sets of tests run sequentially. The second set consisted of just
the comp/, run/, and cmd/ directories. This commit folds those
directories and the third set together, which ekes out a bit more
performance gain. It was 6% better on my box running ASAN. And, the
ASAP runs in about 75% of the time as non-ASAP.
There is no change in the non-ASAP operation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the normal mode of operation of t/harness, there are three sets of
tests, where the first set has to completely finish before the second
one starts, which has to completely finish before the third set starts.
The first set is the basic sanity, and quickly completes. That is
untouched by this commit.
The third set are the tests for mostly non-core modules, including
cpan/, dist/, ext/, and lib/. These are executed so that the
longest-running ones are started first when parallel testing is
available. That is also unchanged by this commit.
The second set is what's left over: generally core tests and ones
enabled only on some platforms or by specifying an option, such as
torture tests. Prior to this commit, these were executed in parallel,
if permitted, but there was no effort to start the longest-running ones
first. This results in a less than optimum use of the CPU.
The code that orders tests by running time was previously applied to
just the third set of tests. Prior commits have extracted out that code
into a function. This commit just uses that function for the tests
in the second set.
In principle, the basic sanity tests could also be run in parallel.
This would be easy to do, but I'm a little leery, and since they are
quick to execute there would not be much gain in doing so.
Comments in the code removed by this commit indicated that the intent
was to execute ext/ and lib/ tests last. But that hasn't been true for
quite some time, and no one seems to have noticed. Now that we have a
function to assemble the tests in a given directory, it would be trivial
to change back, but that does lead to a longer wall clock elapsed time.
The PERL_TEST_HARNESS_ASAP environment variable is used to change the
mode of operation so that most of the tests in the second set are
instead moved into the third set. Only the comp/, run/, and cmd tests
are left in the second set. That is also unchanged by this commit.
|
|
|
|
|
|
|
|
| |
This is in preparation for it being called from a second place in the
following commit.
The git diff listing shows other code being deleted and added instead of
this extraction, because that has a smaller amount of diffs generated
|
|
|
|
|
| |
This wasn't done in the previous commit in order to minimize the diff
listing
|
|
|
|
|
|
|
|
|
|
| |
Experience has shown that some directories must be serially executed
even though they have no rules indicating so. There are currently 2
such directories, hard-coded as such. This commit turns things into a
hash, removing a grep and moves the check to within an already existing
loop. If an exception is found, it is deleted from the hash, and at the
end, only the non-matched ones remain, so it is trivial to output that
these weren't found, which indicastes a likely error.
|
|
|
|
|
|
|
|
| |
This is in preparation for a future commit.
That is the purpose of this commit; however, the git difference listing
instead shows moving the _extract_tests() function later, because that
is the more minimal difference.
|
|
|
|
|
| |
By introducing the hash %map_file_to_dir, we can remove an ugly pattern and
s/// that were used to derive all the directories.
|
| |
|
|
|
|
| |
This will be useful in future commits
|
|
|
|
| |
These are clearer to read, espectially in largish loops.
|
|
|
|
| |
It's clearer, and a future commit will destroy $2 before its final use
|
|
|
|
|
| |
It was handled by using '*' for that directory, but future commits will
want to name individual files in a directory.
|
|
|
|
|
| |
This is in preparation for it being called in other places, in a future
commit.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code as written would have had no effect since the value in
$^O is 'VMS' not 'vms' so it's better to remove the confused and
confusing code.
_backtick_pwd is not normally called on VMS because it has its own
set of routines dispatched via the %METHOD_MAP hash.
In the unlikely event that _backtick_pwd got called on VMS, it
would either fail because there is no pwd command, or, if running
under some Unix emulation environment, work just like Unix, and
therefore need no special handling of $ENV{PATH} that is different
from Unix.
|
|
|
|
|
| |
We already typedef scan_data_t in perl.h, we should not do so also
in regcomp_internal.h, we just need to defined struct scan_data_t.
|
|
|
|
|
|
|
|
|
|
|
| |
The '"-T" $arg and some suspect arguments' test has been failing
because it assumed setting $ENV{PATH} to /usr/bin will pass the
absolute path check in mg.c's Perl_magic_setenv, but it doesn't.
Using a VMS absolute path gets it passing. Ideally we would be using
PL_perllib_sep to figure out whether the list of library paths is in
Unix syntax or VMS syntax, but that's not accessible from Perl, so
we'll have to assume the test is running with native paths in effect.
|
| |
|
|
|
|
|
|
|
| |
Using the new `forbid_outofblock_ops()`, many kinds of forbidden control
flow out of a `defer` or `finally` block can be detected statically with
this function by analysing the optree, rather than leaving it until
runtime when the attempt is actually made.
|
|
|
|
|
| |
Adds a new function to statically detect forbidden control flow out of a
block.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Assignment operators (`==`) were missing, as were both the logical and
the low-precedence shortcutting OR and AND operators (`&&`, `||`,
`and`, `or`)
Also renumbered them around somewhat to even out the spacing. This is
fine during a development cycle.
Also renamed the tokenizer/parser symbol names from "PLUG*OP" to
"PLUGIN_*_OP" for better readability.
|
|
|
|
| |
the numbers
|
|
|
|
|
|
|
| |
Returns the CV pointer to the overloaded method,
which will be needed by join to detect concat magic.
Co-authored-by: Philippe Bruhat (BooK) <book@cpan.org>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The `pval` field of the token type union is currently only used in one
place; storing the result of the infix operator plugin. Its use here
stores a structure pointer, not a string. The union should define this
field as a `void *` and not a `char *`.
In addition we should not attempt to debug print it as a string because
its value is not valid as one.
|
|
|
|
|
|
|
| |
Fix most compiler warnings caused by building Perl extensions with
-Wcast-qual. This is realized by changing the type of multiple T *
arguments into const T * and by changing a few (T *) casts
into (const T *).
|
|
|
|
|
|
|
| |
I had been so used to working lately with C preprocessor directives that
I used the same paradigm in Perl without noticing. If 'warnings' had
been on, it would have caught this (the previous commit now turns them
on).
|
|
|
|
| |
This would have saved me a bunch of time.
|
|
|
|
|
|
|
|
|
| |
A portion of makedef.pl must manually be kept in sync with changes to
portions of perl.h. Prior to this commit, you had to remember
that #ifdef WIN32 from perl.h had to be translated to a completely
different paradigm for use in this file. This commit fixes that, which
can help prepare the way for future programmatic syncing of the two
files.
|
|
|
|
|
| |
This script defines a constant 'PLATFORM', but often uses the rhs of
that constant. Change to always use the constant.
|
| |
|
| |
|
| |
|
|
|
|
| |
No sense doing something that has not effect.
|