summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add new release to perlhistv5.31.8Matthew Horsfall2020-01-201-0/+1
|
* perldelta: Fill in New/Updated modules and finalize for releaseMatthew Horsfall2020-01-201-68/+28
|
* Update perldelta - add acknowledgements for v5.31.8Matthew Horsfall2020-01-201-3/+29
|
* Fix error in perldelta, forgot to close a C<> sequenceMatthew Horsfall2020-01-201-1/+1
|
* Update Module::CoreList for v5.31.8 releaseMatthew Horsfall2020-01-202-2/+119
|
* Fix up and cleanup perldelta for v5.31.8Matthew Horsfall2020-01-201-158/+7
|
* Update perldelta for all changes from v5.31.7 to v5.31.8Matthew Horsfall2020-01-201-43/+172
|
* Update autodie to CPAN version 2.32Chris 'BinGOs' Williams2020-01-2010-10/+11
| | | | | | | | | | | | | [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.
* Maintainers.pl should be in sync with CPAN versions nowChris 'BinGOs' Williams2020-01-201-4/+4
|
* Update dist/IO after release to CPANTodd Rinaldo2020-01-203-26/+42
| | | | | Bugtracker and repo now point at perl/perl5. Hopefully this will encourage people to report IO bugs there.
* Update Changelog for Locale::Maketext after 1.29 release to CPANTodd Rinaldo2020-01-201-1/+9
| | | | Also update RT link in the changelog to point to its new location
* perl.h: Fix false comment about grok_FOO flagsKarl Williamson2020-01-191-1/+1
| | | | | It is currently impossible to say that you don't want an overflow message if those warnings are enabled.
* Skip the new open pragma tests for no ":utf8" under PERL_UNICODE.Nicholas Clark2020-01-191-5/+10
| | | | | PERL_UNICODE can implement an implicit use open ":utf8", which defeats the intent of what we're testing here.
* IO: update ChangeLog for new trial releaseRicardo Signes2020-01-191-0/+5
|
* Loading IO is now threadsafe, avoiding the core bug reported as GH #14816.Nicholas Clark2020-01-195-51/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add tests for IO::Handle getline() and getlines().Nicholas Clark2020-01-194-4/+128
| | | | | Extend the tests for <> and the open pragma to verify that the behaviour changes with/without the open pragma.
* numeric.c: White-space onlyKarl Williamson2020-01-191-20/+20
| | | | | | | Indent code that the previous commit added an enclosing block surrounding it. And vertically align some comments
* grok_bin_oct_hex: Add two output flagsKarl Williamson2020-01-192-10/+33
| | | | | | | | | | | | | | | | | | | | | | 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.
* re/pat.t: Fix failure on some systemsKarl Williamson2020-01-181-1/+1
| | | | | | | 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.
* embed.fnc: grok_bin_oct_hex() isn't documentedKarl Williamson2020-01-181-1/+1
| | | | | So, don't claim that it is. It is an internal function, common to grok_bin, et. al.
* t/test.pl: Add comments about runperl vs fresh_perlKarl Williamson2020-01-181-0/+4
|
* t/test.pl: fresh_perl has only 2 argsKarl Williamson2020-01-181-1/+1
| | | | So referring to the "third" is wrong.
* perlapi sv_setpvn: Note UTF-8 flag not affectedKarl Williamson2020-01-181-0/+3
|
* grok_bin_oct_hex: Unroll loop one more iterationKarl Williamson2020-01-181-4/+8
| | | | | | | | 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.
* utf8.c: Use already-computed variableKarl Williamson2020-01-181-1/+1
| | | | instead of doing it a second time
* Refactor grok_number_flags to speed it upKarl Williamson2020-01-181-98/+148
| | | | | | | | | | | | | | | | | | | | | | 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.
* perldelta for commit 9c952fa3James E Keenan2020-01-181-1/+1
|
* Sync with CPAN version 5.01 of Term::ANSIColorRuss Allbery2020-01-189-20/+92
|
* Create crosslinks betwen perlrun sectionsDan Book2020-01-171-55/+61
|
* move and clean-up macros wrapping __attribute__()Tomasz Konojacki2020-01-172-125/+104
| | | | | | | | | | | | __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.
* perldelta for commit 1f6c2254f60d95f2a0aa0489519920e488f0a42James E Keenan2020-01-171-0/+4
|
* Sync Test-Simple with CPAN version 1.302171Chad Granum2020-01-1768-73/+80
|
* Define env correctly for GitHub workflow jobsNicolas R2020-01-177-14/+23
| | | | | | Environment variables were defined too early. This is moving them inside the job, and add the CONTINUOUS_INTEGRATION=1 variable.
* Skip t/porting/authors.t when failing guessing common ancestorNicolas R2020-01-171-0/+2
|
* Disable dist/IO/t/io_sock.t on windowsNicolas R2020-01-172-3/+4
| | | | | | | Fixes #17429 Test is out of sequence. Note: ENV were set too early.
* Fix DEBUGGING check in Devel-PPPort/t/utf8.tCraig A. Berry2020-01-171-1/+5
| | | | | | 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().
* Update documentation for IO::Socket.Chase Whitener2020-01-161-132/+414
| | | | | | | | | | | | | | | | * 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.
* study_chunk: generate ANYOFM here rather than in join_exact()Hugo van der Sanden2020-01-161-17/+19
| | | | | | | | | | | | | 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.
* Update ExtUtils-MakeMaker to CPAN version 7.44Chris 'BinGOs' Williams2020-01-1434-37/+38
| | | | | | | | | | | | | | | | [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
* utf8.c: Change variable types so compiles on SolarisKarl Williamson2020-01-141-2/+2
| | | | This was made necessary by 40d2776f3505d22a2b1309ae2c3bf28bcb1d9016
* regen/reentr.pl: Use Configure'd typesKarl Williamson2020-01-142-4/+4
| | | | | | 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.
* Merge branch 'grok_bin_oct_hex' into bleadKarl Williamson2020-01-1313-300/+352
|\ | | | | | | | | | | 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.
| * Improve performance of grok_bin_oct_hex()Karl Williamson2020-01-136-52/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * numeric.c: Slight restructure grok_bin_oct_hexKarl Williamson2020-01-131-5/+9
| | | | | | | | | | | | | | 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.
| * numeric.c: White-space onlyKarl Williamson2020-01-131-10/+14
| | | | | | | | | | Outdent code whose enclosing block was removed by the previous commit. A few other white space fixups.
| * grok_bin_oct_hex: better ovrflw accuracy; rmv loop cond.Karl Williamson2020-01-131-16/+34
| | | | | | | | | | This removes a conditional in the loop, and improves the accuracy of the overflow NV returned that approximates the desired input.
| * perlapi: Move documentationKarl Williamson2020-01-131-1/+2
| | | | | | | | | | | | 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.
| * perlapi: Update grok_bin, _oct, _hexKarl Williamson2020-01-131-34/+42
| | | | | | | | | | 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.
| * numeric.c: Move function in the fileKarl Williamson2020-01-131-37/+37
| | | | | | | | This makes adjacent all similar functions and their docs
| * numeric.c: Fix typos in commentsKarl Williamson2020-01-131-2/+2
| |