| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[DELTA]
2.32 2020-01-16 11:40:52-06:00 America/Chicago
* Update automated tests to include soft dependencies.
* Remove Test::Perl::Critic as a testing requirement.
* Update README.md to show github actions status
not Travis.
|
| |
|
|
|
|
|
| |
Bugtracker and repo now point at perl/perl5. Hopefully this will
encourage people to report IO bugs there.
|
|
|
|
| |
Also update RT link in the changelog to point to its new location
|
|
|
|
|
| |
It is currently impossible to say that you don't want an overflow
message if those warnings are enabled.
|
|
|
|
|
| |
PERL_UNICODE can implement an implicit use open ":utf8", which defeats the
intent of what we're testing here.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Re-implement getline() and getlines() as XS code.
The underlying problem that we're trying to solve here is making
getline() and getlines() in IO::Handle respect the open pragma.
That bug was first addressed in Sept 2011 by commit 986a805c4b258067:
Make IO::Handle::getline(s) respect the open pragma
However, that fix introduced a more subtle bug, hence this reworking.
Including the entirety of the rest of that commit message because it
explains both the bug the previous approach:
See <https://rt.cpan.org/Ticket/Display.html?id=66474>. Also, this
came up in <https://rt.perl.org/rt3/Ticket/Display.html?id=92728>.
The <> operator, when reading from the magic ARGV handle, automatic-
ally opens the next file. Layers set by the lexical open pragma are
applied, if they are in scope at the point where <> is used.
This works almost all the time, because the common convention is:
use open ":utf8";
while(<>) {
...
}
IO::Handle’s getline and getlines methods are Perl subroutines
that call <> themselves. But that happens within the scope of
IO/Handle.pm, so the caller’s I/O layer settings are ignored. That
means that these two expressions are not equivalent within in a
‘use open’ scope:
<>
*ARGV->getline
The latter will open the next file with no layers applied.
This commit solves that by putting PL_check hooks in place in
IO::Handle before compiling the getline and getlines subroutines.
Those hooks cause every state op (nextstate, or dbstate under the
debugger) to have a custom pp function that saves the previous value
of PL_curcop, calls the default pp function, and then restores
PL_curcop.
That means that getline and getlines run with the caller’s compile-
time hints. Another way to see it is that getline and getlines’s own
lexical hints are never activated.
(A state op carries all the lexical pragmata. Every statement
has one. When any op executes, it’s ‘pp’ function is called.
pp_nextstate and pp_dbstate both set PL_curcop to the op itself. Any
code that checks hints looks at PL_curcop, which contains the current
run-time hints.)
The problem with this approach is that the (current) design and implementation
of PL_check hooks is actually not threadsafe. There's one array (as a global),
which is used by all interpreters in the process. But as the code added to
IO.xs demonstrates, realistically it needs to be possible to change the hook
just for this interpreter.
GH #14816 has a fix for that bug for blead. However, it will be tricky (to
impossible) to backport to earlier perl versions.
Hence it's also worthwhile to change IO.xs to use a different approach to
solve the original bug. As described above, the bug is fixed by having the
readline OP (that implements getline() and getlines()) see the caller's
lexical state, not their "own". Unlike Perl subroutines, XS subroutines don't
have any lexical hints of their own. getline() and getlines() are very
simple, mostly parameter checking, ending with a one line that maps to
a single core OP, whose values are directly returned.
Hence "all" we need to do re-implement the Perl code as XS. This might look
easy, but turns out to be trickier than expected. There isn't any API to be
called for the OP in question, pp_readline(). The body of the OP inspects
interpreter state, it directly calls pp_rv2gv() which also inspects state,
and then it tail calls Perl_do_readline(), which inspects state.
The easiest approach seems to be to set up enough state, and then call
pp_readline() directly. This leaves us very tightly coupled to the
internals, but so do all other approaches to try to tackle this bug.
The current implementation of PL_check (and possibly other arrays) still
needs to be addressed.
|
|
|
|
|
| |
Extend the tests for <> and the open pragma to verify that the behaviour
changes with/without the open pragma.
|
|
|
|
|
|
|
| |
Indent code that the previous commit added an enclosing block
surrounding it.
And vertically align some comments
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds two output flags returned from this function to the one
previously existing, so that the caller can be informed of the problems
found and take its own action.
This involves the behavior of two existing flags, whose being set
suppresses the warning if particular conditions exist in the input being
parsed. Both flags were currently always cleared upon return.
One of those flags is non-public. I changed it so that it isn't cleared
upon return if the condition it describes is found.
The other flag is public. I thought that some existing code, though
unlikely, might be relying on the flag being always cleared. So I
added a completely new flag from a previously unused bit that, if clear
on input there is no change in behavior; but if set on input, it will
remain set on output if the condition is met; otherwise cleared. The
only code that could possibly be affected is that which sets this unused
bit, but expects it to be cleared after the return. This is very
unlikely.
|
|
|
|
|
|
|
| |
This appears to be a difference in how shells run. On many of H. Merijn
Brand's boxes, this a test is failing. By avoiding the shell by using
fresh_perl instead of runperl, it succeeds there, without breaking
elsewhere.
|
|
|
|
|
| |
So, don't claim that it is. It is an internal function, common to
grok_bin, et. al.
|
| |
|
|
|
|
| |
So referring to the "third" is wrong.
|
| |
|
|
|
|
|
|
|
|
| |
Earlier I was confused when I thought that 7 hex digits were the max
before we needed to start worrying about overflow. That's true for
signed results where everything above 7FFF_FFFF won't fit in a 32-bit
signed integer. But these functions return unsigned, and so any 8
digits will fit in a 32-bit word.
|
|
|
|
| |
instead of doing it a second time
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This uses a variety of techniques to improve the performance.
The chief one is to switch on the input length for the unrolled part of
the loop, like is done in grok_bin_oct_hex(). This eliminates having to
check if we are at the end of the string each time we process and
advance a digit through it.
Explicit branch predictions were added. One assumes that the input
won't have a sign more frequently than it does have one.
Some setup conditionals were eliminated. One way is that this ignores
leading spaces. Previously, it just advanced through any and then
checked if we are at the end of the string after having done so. That
check can be eliminated if we didn't advance.
Also, I check for a sign with a single conditional, eliminating a check
for minus, then, if not found, one for plus. Instead, if it is a sign,
there is an extra check for which one. Thus it rewards unsigned input,
and penalizes signed, by a single conditional each way.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
__attribute__() detection fallback for non-Configure platforms
(such as Windows) in perl.h was moved above the PERL_UNUSED_DECL
definition. That fixed two problems:
- PERL_UNUSED_DECL was undefined on those platforms
- __attribute__* macros weren't working properly inside headers
included above their definitions (e.g. "win32.h")
Also, redundant checks for pre-3.4 g++ versions were removed.
|
| |
|
| |
|
|
|
|
|
|
| |
Environment variables were defined too early.
This is moving them inside the job, and add
the CONTINUOUS_INTEGRATION=1 variable.
|
| |
|
|
|
|
|
|
|
| |
Fixes #17429
Test is out of sequence.
Note: ENV were set too early.
|
|
|
|
|
|
| |
Devel::PPPort claims to support Perl back to 5.003_07, which means
that we can't use a more rational method here such as
Config::non_bincompat_options().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Get rid of the POD errors as well as the useless `NOTE NOTE NOTE`
lines that were littered throughout.
* Provide documentation and useful examples for each and every
single constructor argument.
* Provide documentation for all methods made available.
* Where it makes sense, provide links to other documents that
explain what the module is doing.
Previously, this relied heavily on the user knowing what they were
doing, rendering the documentation mostly pointless.
While this is not yet perfect, it's better than what we had before
and should be of help to developers of all skill levels.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we detect an EXACTFish node cannot be extended by joining with others,
and is short and simple enough, we want to replace it with ANYOFM.
Prefer to do that in the study_chunk() handling of EXACTFish nodes: this
isn't part of join_exact's responsibilities (and is not documented there),
and moving it will make subsequent refactoring easier.
Note that this means it will no longer happen earlier as part of the
experimental regtail_study() call to join_exact(), currently invoked
only if perl is built with PERL_ENABLE_EXPERIMENTAL_REGEX_OPTIMISATIONS.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[DELTA]
7.44 Tue 14 Jan 16:35:06 GMT 2020
No changes since v7.43_01
7.43_01 Sun 5 Jan 12:41:43 GMT 2020
Bug fixes:
- Match final dir component in init_MANPODS
Test Fixes:
- Use internal reference to Makefile in build_man.t
|
|
|
|
| |
This was made necessary by 40d2776f3505d22a2b1309ae2c3bf28bcb1d9016
|
|
|
|
|
|
| |
Configure goes to the trouble of finding the parameter types that the
gethostbyFOO functions use, but reentr.pl was ignoring this, causing
compilation failures on at least Solaris.
|
|\
| |
| |
| |
| |
| | |
This branch collapses 3 very similar functions into one, for easier
maintenance. The resulting function is then modified to improve
performance over blead, and documentation is clarified.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit uses a variety of techniques for speeding this up. It is
now faster than blead, and has less maintenance cost than before.
Most of the checks that the current character isn't NUL are unnecssary.
The logic works on that character, even if, for some reason, you can't
trust the input length. A special test is added to not output the
illegal character message if that character is a NUL. This is simply
for backcompat.
And a switch statement is used to unroll the loop for the leading digits
in the number. This should handle most common cases. Beyond these, and
one has to start worrying about overflow. So this version has removed
that worrying from the common cases.
Extra conditionals are avoided for large numbers by extracting the
portability warning message code into a separate static function called
from two different places. Simplifying this logic led me to see that if
it overflowed, it must be non-portable, so another conditional could be
removed.
Other conditionals were removed at the expense of adding parameters to
the function. This function isn't public, but is called from the
grok_hex, et. al. macros. grok_hex knows, for example, that it is
looking for an 'x' prefix and not a 'b'. Previously the code had a
conditional to determine that.
Similarly in pp.c, we look for the prefix. Having found it we can start
the parse after the prefix, and tell this function not to look for it.
Previously, this work was duplicated.
The previous changes had left this function slower than blead. That is
in part due to the fact that the loop doesn't go through that many
iterations per function call, and the gcc compiler managed to optimize
away the conditionals in XDIGIT_VALUE in the call of it from the loop.
(The other call in this function did have the conditionals.)
Thanks to Sergey Aleynikov for his help on this
|
| |
| |
| |
| |
| |
| |
| | |
This saves the input flags into a local variable and uses that in the
rest of the function, and initializes the output flags at the beginning
of the functions. This is in preparation for more output flags to be
set, as we go along.
|
| |
| |
| |
| |
| | |
Outdent code whose enclosing block was removed by the previous commit.
A few other white space fixups.
|
| |
| |
| |
| |
| | |
This removes a conditional in the loop, and improves the accuracy of the
overflow NV returned that approximates the desired input.
|
| |
| |
| |
| |
| |
| | |
This flag doesn't actually occur in the functions in which the
documentation for it is mentioned. Instead, move it to a function that
does mention it.
|
| |
| |
| |
| |
| | |
In examining these functions in detail, I found some things in the pod
that were unclear or misleading. This is an attempt to clarify things.
|
| |
| |
| |
| | |
This makes adjacent all similar functions and their docs
|
| | |
|