This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
James E Keenan [Sat, 17 Dec 2016 22:22:59 +0000 (17:22 -0500)]
perldelta entry for Pod::Simple 3.32 to 3.35 upgrade.
James E Keenan [Sat, 17 Dec 2016 22:14:13 +0000 (17:14 -0500)]
Update Pod-Simple to CPAN version 3.35.
From ChangeLog: Stabilize t/search50.t (per rurban). Turn off utf8 warnings
when trying to see if a file is UTF-8 or not.
David Mitchell [Fri, 16 Dec 2016 13:07:58 +0000 (13:07 +0000)]
regexes: make scanning for ANYOF faster
Given a character class of random chars (like [acgt] say, rather than
predefined ones like [\d], say), speed up the code in:
1) S_find_byclass(), which scans for the first char in the string that's
in that class (e.g. /[acgt]...../),
2) S_regrepeat() which scans past all chars that are in that class
(e.g. /....[acgt]+..../)
by hoisting an unchanging test outside the main while loop. So this:
while (s < end) {
if (ANYOF_FLAGS(node))
match = reginclass(*s, ...);
else
match = ANYOF_BITMAP_TEST(*s, ...);
...
}
becomes this:
if (ANYOF_FLAGS(node)) {
while (s < end) {
match = reginclass(*s, ...);
...
}
else
while (s < end) {
match = ANYOF_BITMAP_TEST(*s, ...);
...
}
}
The average of the 3 tests added to t/perf/benchmarks by this commit show
this change (raw numbers, lower better):
before after
-------- --------
Ir 3294.0 2763.0
Dr 900.7 802.3
Dw 356.0 390.0
COND 569.0 436.7
IND 11.0 11.0
COND_m 1.2 2.0
IND_m 7.3 7.3
Chris 'BinGOs' Williams [Fri, 16 Dec 2016 10:50:53 +0000 (10:50 +0000)]
Update Archive-Tar to CPAN version 2.22
[DELTA]
2.22 16/12/2016 (MANWAR)
- Add missing strict/warnings pragma to Constants.pm
Chris 'BinGOs' Williams [Thu, 15 Dec 2016 14:39:45 +0000 (14:39 +0000)]
Update bignum to CPAN version 0.47
Chris 'BinGOs' Williams [Thu, 15 Dec 2016 14:38:20 +0000 (14:38 +0000)]
Update Math-BigRat to CPAN version 0.2611
[DELTA]
2016-12-13 v0.2611 pjacklam
* Add more logic to Makefile.PL regarding INSTALLDIRS (CPAN RT #119199
and #119225).
2016-12-11 v0.2610 pjacklam
* Fix Makefile.PL so that this module installs over the core version.
Chris 'BinGOs' Williams [Thu, 15 Dec 2016 14:37:15 +0000 (14:37 +0000)]
Update Math-BigInt-FastCalc to CPAN version 0.5005
Chris 'BinGOs' Williams [Thu, 15 Dec 2016 14:35:53 +0000 (14:35 +0000)]
Update Math-BigInt to CPAN version 1.999806
[DELTA]
2016-12-13 v1.999806 pjacklam
* Add more logic to Makefile.PL regarding INSTALLDIRS (CPAN RT #119199
and #119225).
* In the TODO file, remove stuff that has been implemented.
2016-12-11 v1.999805 pjacklam
* Fix Makefile.PL so that this module installs over the core version.
* Add more tests for _nok() (binomial coefficient "n over k"). These new tests
revealed some problems with some of the backend libraries when _nok() was
given very large arguments.
* Remove t/Math/BigFloat/#Subclass.pm#, which is an Emacs temporary file
included by accident.
2016-12-07 v1.999804 pjacklam
* Implement as_bytes(), as requested (CPAN RT 119096). Also implement the
inverse conversion from_bytes(). This applies to Math::BigInt only. (Alas,
these methods will be inherited from Math::BigInt into Math::BigFloat,
Math::BigRat etc. where the methods won't work. Fixing this class
relationship is an issue of its own.)
* Implement _as_bytes() and _from_bytes() in Math::BigInt::Lib. Preferably,
the various backend libraries will implement faster versions of their
own. Add author test files for testing these methods thorougly.
* Fix from_hex(), from_oct(), and from_bin().
- When called as instance methods, the new value should be assigned to the
invocand unless the invocand is read-only (a constant).
- When called as instance methods, the assigned value was incorrect, if the
invocand was inf or NaN.
- Add tests to t/from_hex-mbf.t, t/from_oct-mbf.t, and t/from_bin-mbf.t
to confirm the fix.
- Add new test files t/from_hex-mbi.t, t/from_oct-mbi.t, and
t/from_bin-mbi.t for better testing of these methods with Math::BigInt.
* Correct typo in Math/BigInt/Lib.pm (otherise -> otherwise) (CPAN RT 118829).
* Add POD coverage testing of Math::BigInt::Lib to t/03podcov.t.
Chris 'BinGOs' Williams [Thu, 15 Dec 2016 14:32:39 +0000 (14:32 +0000)]
Update B-Debug to CPAN version 1.24
[DELTA]
1.24 2016-12-11 rurban
* add 5.25.6 support: split optimization
Chris 'BinGOs' Williams [Thu, 15 Dec 2016 14:31:00 +0000 (14:31 +0000)]
Update Archive-Tar to CPAN version 2.20
[DELTA]
2.20 15/12/2016 (AGRUNDMA)
- Check for gzip/bzip2 before round tripping gz/bz2 files in tests
Karl Williamson [Wed, 14 Dec 2016 18:38:12 +0000 (11:38 -0700)]
perlapi: Clarify entry for utf8n_to_uvchr()
Karl Williamson [Mon, 12 Dec 2016 03:30:33 +0000 (20:30 -0700)]
perlapi: Clarify the isFOO_A() macros meanings
Karl Williamson [Mon, 12 Dec 2016 00:31:59 +0000 (17:31 -0700)]
APItest/t/utf8.t: Fix test name
This test name gave the wrong function being tested.
Karl Williamson [Sat, 10 Dec 2016 19:18:50 +0000 (12:18 -0700)]
APItest/t/utf8.t: White-space, comment only
Wraps lines to fit in 79 columns, removes a comment for development that
shouldn't have been committed in the first place.
Karl Williamson [Sat, 10 Dec 2016 18:03:58 +0000 (11:03 -0700)]
APItest/t/utf8.t: Use more idiomatic Perl
This replaces
unless(x) { y }
by
x or y
Spotted by ilmari
Karl Williamson [Mon, 12 Dec 2016 16:38:24 +0000 (09:38 -0700)]
embed.fnc: Mark some functions as pure
Some of these were identified by me, and some by Andy Lester
Karl Williamson [Mon, 12 Dec 2016 21:50:34 +0000 (14:50 -0700)]
embed.fnc: Remove pure declaration for fcns that deal with SVs
These aren't actually pure, as dealing with SVs can trigger side
effects, including processing of magic.
Karl Williamson [Mon, 12 Dec 2016 21:52:24 +0000 (14:52 -0700)]
regen/embed.pl: Enforce static fcn can't be declared pure.
Karl Williamson [Mon, 12 Dec 2016 21:47:33 +0000 (14:47 -0700)]
embed.fnc: Remove pure function flag for static functions
As mentioned in the comments added in the commit immediately before this
one, declaring a static function pure doesn't tell the compiler anything
more than it can already figure out, and may be destructive if the
compiler decides to skip checking for pureness because we mistakenly
declared something pure that isn't
I added the R flag to the ones that didn't have it, as all these are run
to get their return values.
Karl Williamson [Mon, 12 Dec 2016 21:43:19 +0000 (14:43 -0700)]
embed.fnc: Add comments about pure attribute flag
This notes some cautions about using it.
Karl Williamson [Mon, 12 Dec 2016 21:37:37 +0000 (14:37 -0700)]
regen/embed.pl: Keep parsing for some fatal issues
It's best to list all errors in a single run. This creates a mechanism
to do so and uses it in a few places.
Karl Williamson [Mon, 12 Dec 2016 16:22:13 +0000 (09:22 -0700)]
perlapi: Document ckWARN-type macros
Karl Williamson [Wed, 14 Dec 2016 16:38:29 +0000 (09:38 -0700)]
locale.c: Silence compiler warning
The FREEBSD compiler isn't smart enough to realize this isn't used
before setting.
Karl Williamson [Tue, 13 Dec 2016 22:27:37 +0000 (15:27 -0700)]
APItest/t/utf16_to_utf8.t: Avoid use of Encode
It's probably not a good idea to rely on a CPAN module's correctly
working to test something in core, but this does. But it turns out that
there is a core equivalent to encoding UTF-8, utf8::encode(), which this
changes to use. There are other uses of Encode here, but I don't have
the tuits to fix those.
The reason I'm fixing this at all, is that Encode 2.88 appears to have
broken encode("UTF-8") on EBCDIC platforms. This change allows this to
be determined for sure, while removing one outside dependency from core.
Karl Williamson [Tue, 13 Dec 2016 17:35:39 +0000 (10:35 -0700)]
Fix above-Unicode UTF-8 detection for EBCDIC
The root cause of this was missing parentheses causing (s[0] + 1) to be
evaluated instead of the desired s[1]. It was causing an error in
lib/warnings.t, but only on EBCDIC platforms.
Karl Williamson [Mon, 12 Dec 2016 14:27:13 +0000 (07:27 -0700)]
Fix missing X in 2 embed.fnc entries
Commit
680b55f7dc3b143fa8c4cc5bbd905f9242504f3b should have had 'X' for
two entries that were missing it.
Hugo van der Sanden [Mon, 12 Dec 2016 15:15:06 +0000 (15:15 +0000)]
[perl #130307] Correctly unwind on cache hit
We've already incremented curlyx.count in the WHILEM branch before
we check for a hit in the super-linear cache, so must reverse that
on the sayNO.
David Mitchell [Mon, 12 Dec 2016 13:20:40 +0000 (13:20 +0000)]
perldelta - DAPM's recent significant changes
Karl Williamson [Fri, 25 Nov 2016 15:35:30 +0000 (08:35 -0700)]
utf8.c: Silence compiler warning
This was generating a "comparison between signed and unsigned integer
expression" warning
Karl Williamson [Sun, 11 Dec 2016 03:24:15 +0000 (20:24 -0700)]
embed.fnc: Make some functions not flagged as 'A'
As explained in the previous commit, I misunderstood the available scope
of functions not otherwise qualified by a flag. This changes some of
them to correspond with my new understanding.
Karl Williamson [Sun, 11 Dec 2016 03:19:39 +0000 (20:19 -0700)]
embed.fnc: Add comments; wordsmith others
After some years of working on the Perl core, I did not realize that the
default for functions in this file is to make them invisible outside the
core. I've jumped through hoops to try to do that, not realizing it was
automatic. This adds comments so newbies don't make the same mistake.
And it rewords slightly various other comments.
Karl Williamson [Sun, 11 Dec 2016 02:16:56 +0000 (19:16 -0700)]
utfebcdic.h: Follow up to adding const qualifiers
This is a follow-up to commit
9f2eed981068e7abbcc52267863529bc59e9c8c0,
which manually added const qualifiers to some generated code in order to
avoid some compiler warnings. The code changed by the other commit had
been hand-edited after being generated to add branch prediction, which
would be too hard to program in at this time, so the const additions
also had to be hand-edited in.
The commit just before this current one changed the generator to add the
const, and I then did comparisons by hand to make sure the only
differences were the branch predictions. In doing so, I found one
missing const, plus a bunch of differences in the generated code for
EBCDIC 037. We do not currently have a smoker for that system, so the
differences could be as a result of a previous error, or they could be
the result of the added 'const' causing the macro generator to split
things differently. It splits in order to avoid size limits in some
preprocessors, and the extra 'const' tokens could have caused it to make
its splits differently.
Since we don't have any smokers for this, and no known actual systems
running it, I decided not to bother to hand-edit the output to add
branch prediction.
Karl Williamson [Sun, 11 Dec 2016 02:09:19 +0000 (19:09 -0700)]
regen/regcharclass.pl: Add const cast
This is a follow-up to commit
9f2eed981068e7abbcc52267863529bc59e9c8c0,
which manually added const qualifiers to some generated code in order to
avoid some compiler warnings. This changes the code generator to use
the same 'const' qualifier generally. The code changed by the other
commit had been hand-edited after being generated to add branch
prediction, which would be too hard to program in at this time, so the
const additions also had to be hand-edited in.
Karl Williamson [Fri, 9 Dec 2016 05:01:16 +0000 (22:01 -0700)]
PATCH: [perl #37836] Simple Regex causes SEGV
As mentioned in the notes in the ticket, the test for this was wrong,
relying on an optimization in the regex compiler that avoided the
problematic code altogether.
When corrected, the test would not segfault, but does croak. This is
because the regex engine croaks on malformed UTF-8, which this is.
croaking is probably the best option here, and has been in place for a
number of releases. To fix the test, the pattern is modified by adding
a character to circumvent the optimization, and the croak is guarded by
a fresh_perl
Karl Williamson [Tue, 6 Dec 2016 17:16:10 +0000 (10:16 -0700)]
toke.c: Use strpbrk instead of sequential strchr()
strpbrk("ABC")
does the same thing (faster) as
strchr('A') || strchr('B') || strchr('C')
Karl Williamson [Fri, 9 Dec 2016 20:47:27 +0000 (13:47 -0700)]
regexec.c: Remove obsolete expression
The flags here are obsolete, as UTF8_ALLOW_DEFAULT is what we want.
It allows no more than the and'ed UTF8_ALLOW_ANYUV.
Karl Williamson [Fri, 9 Dec 2016 20:25:05 +0000 (13:25 -0700)]
regexec.c: Remove use of obsolete flag
This flag is now defined as 0, so it does nothing. This is the final
use of it in core.
Karl Williamson [Sun, 11 Dec 2016 14:39:33 +0000 (07:39 -0700)]
io/perlio.t: Un-TODO now passing test
This was fixed by
c47992b404786dcb8752239045e21cbcd7e3d103.
Christian Hansen [Sun, 25 Mar 2012 23:23:39 +0000 (17:23 -0600)]
PerlIO-scalar: Fix fail to detect incomplete seqs at EOF
James E Keenan [Sun, 11 Dec 2016 13:37:06 +0000 (08:37 -0500)]
Readability improvements.
Break one long paragraph into four. Break some long sentences in two.
Correct one spelling error. Use POD formatting more consistently on
'package'.
More for RT #129345
David Mitchell [Sat, 10 Dec 2016 20:07:32 +0000 (20:07 +0000)]
yyparse(): extend parser stack before every shift.
This reverts v5.25.7-60-gb2c9b6e and adds a test.
In that previous commit of mine, for efficiency I changed it so that it
checked and extended the parser stack only after every reduce rather than
every shift, but when it did check, it extended it by at least 15 slots to
allow for all the elements of the longest possible rule to be shifted.
Turns out this was bad reasoning. The following type of code can shift
indefinitely without ever reducing:
[{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
David Mitchell [Sat, 10 Dec 2016 15:06:30 +0000 (15:06 +0000)]
misaligned buffer with heredoc and /(?{...})/
RT #129199
When an re_eval like /(?{...})/ is tokenised, as well as tokenising the
individual elements of the code, the whole src string is returned as a
constant too, to enable the stringification of the regex to be calculated.
For example,
/abc(?{$x})def/
is tokenised like
MATCH '('
CONST('abc')
DO '{' '$' CONST('x') '}'
','
CONST('(?{$x})')
','
CONST('def'),
')'
If the code within the (?{...}) contains a heredoc (<<) and the PL_linestr
buffer happens to get reallocated, the pointer which points to the start
of the code string will get adjusted using the wrong buffer pointer.
Later when the end of the code is reached and the whole code string '(?{$x})'
is copied to a new SV, garbage may get copied (or it may panic with -ve
length, out of memory etc). Note that this garbage will only used for the
string representation of the regex, e.g.
my $r = qr/abc(?{$x})def/;
print "$r"; # garbage used here
/xyz$r/; # garbage not used here
Craig A. Berry [Fri, 9 Dec 2016 22:58:25 +0000 (16:58 -0600)]
Remove directory depth check from configure.com.
The limit of 8 levels deep was lifted well over a decade ago and
thus does not apply to any currently-supported VMS systems.
Craig A. Berry [Fri, 9 Dec 2016 22:54:20 +0000 (16:54 -0600)]
Fix i64size and u64size on VMS.
These are always 8 bytes and, since VAX is no longer supported,
always defined, so don't make them conditional on -Duse64bitint.
Yves Orton [Fri, 9 Dec 2016 07:42:21 +0000 (08:42 +0100)]
use IVSIZE to see if we should use 64bit hashing
Craig A. Berry [Thu, 8 Dec 2016 19:14:19 +0000 (13:14 -0600)]
Escape extended characters in configure.com's manifest check.
Math::BigInt now has a file with '#' in the name. This broke the
build on VMS because the manifest checker couldn't find that file.
While the current file system can have files with a hash character
or other top-row-of-the-keyboard characters, most of them need
escaping with a caret when used in a filename in native syntax.
So add a more-or-less general purpose escaping routine and run it
on each filename in the manifest before converting from Unix to
VMS syntax.
Karl Williamson [Thu, 8 Dec 2016 02:04:52 +0000 (19:04 -0700)]
Revert "APItest/t/handy.t: Slightly simplify"
This reverts commit
96970a3c8cbe5ad489ce831380f0e208315ea651.
I misread the code and this commit should never have been done. The
statements I thought were identical did have some differences.
Steve Hay [Wed, 7 Dec 2016 08:32:05 +0000 (08:32 +0000)]
Upgrade bignum from version 0.44 to 0.45
Steve Hay [Wed, 7 Dec 2016 08:30:29 +0000 (08:30 +0000)]
Upgrade Math::BigRat from version 0.260805 to 0.2609
Steve Hay [Wed, 7 Dec 2016 08:28:53 +0000 (08:28 +0000)]
Upgrade Math::BigInt::FastCalc from version 0.5002 to 0.5003
Steve Hay [Wed, 7 Dec 2016 08:25:50 +0000 (08:25 +0000)]
Upgrade Math::BigInt from version 1.999802 to 1.999803
Sullivan Beck [Tue, 29 Nov 2016 20:56:59 +0000 (15:56 -0500)]
Bump Locale-Codes from 3.40 to 3.42
Yves Orton [Wed, 7 Dec 2016 22:40:13 +0000 (23:40 +0100)]
fixup new hash benchmarks to be lighter
Incorperate some changes suggested by Dave.
Yves Orton [Wed, 7 Dec 2016 22:36:38 +0000 (23:36 +0100)]
bench - fixup some interface issues from allowing two step benchmarks
This restores the old behavior of not showing a report if
the --write option is used, but now the --show option overrides
that behavior. It is an error to use --show with only one perl.
This also fixes the error if there are no perls provided, and
some other diagnostics.
David Mitchell [Wed, 7 Dec 2016 15:15:26 +0000 (15:15 +0000)]
perly.c: silence a -Wempty-body warning
perly.c:350:21: warning: suggest braces around empty body in an ‘if’ statement [
-Wempty-body]
David Mitchell [Wed, 7 Dec 2016 14:48:50 +0000 (14:48 +0000)]
t/perf/benchmarks: tweak cachegrind explanation
I pushed the previous commit before remembering to proofread what I
wrote.
David Mitchell [Wed, 7 Dec 2016 14:40:47 +0000 (14:40 +0000)]
t/perf/benchmarks: explain how benchmarks are run
I'd forgotten, and it confused other people, so explain how the
'setup' and 'code' fields are used to create a benchmark script.
Karl Williamson [Wed, 7 Dec 2016 05:28:59 +0000 (22:28 -0700)]
lib/locale.t: Up the permissible failure % for os390
Recent changes to the os390 locales have caused the number of failing
ones to exceed the cutoff of acceptable bad locales before the .t shows
failure.
os390 has more problematic locales than typical, because it has locales
for various IBM code pages, and some of these locales are incompatible
with perl. For example there is a CP 037 locale available which is
supposed to allow os390 (running CP 1047) to emulate machines where CP
037 is native. But these two code pages have different positions for
various critical characters that perl assumes have a particular ordinal
value, e.g. '['. That being placed differently in a locale means that
patterns with bracketed character classes won't work in perl on that
locale, and the locales fail locale.t
This commit changes the acceptable failing rate to 10% (up from 5% most
everywhere else) on os390, reflecting the higher percentage of base
incompatibilities.
Karl Williamson [Wed, 7 Dec 2016 04:34:32 +0000 (21:34 -0700)]
t/test.pl: Clarify syntax for tests in t/lib/*
Karl Williamson [Tue, 6 Dec 2016 19:12:22 +0000 (12:12 -0700)]
utf8.c: Remove unused variable
The called function can cope with a NULL parameter here, so no need to
use a dummy one.
Karl Williamson [Tue, 6 Dec 2016 19:10:34 +0000 (12:10 -0700)]
APItest/t/utf8.t: Fix EBCDIC test
One can tell if this code point is above Unicode from just the first
byte, unlike what it was specifying.
Karl Williamson [Sat, 3 Dec 2016 19:01:15 +0000 (12:01 -0700)]
toke.c: Swap 'if' and 'else' clauses
It is easier to read if the trivial case comes before the much longer
case, so complement the sense of this 'if', and swap the current 'else'
and 'if' clauses
Karl Williamson [Tue, 29 Nov 2016 01:01:42 +0000 (18:01 -0700)]
APItest/t/handy.t: Slightly simplify
This combines two adjacent 'if' blocks into a single one, as the 'if'
clause is identical in both.
Tony Cook [Tue, 25 Oct 2016 05:17:18 +0000 (16:17 +1100)]
(perl #129788) IO::Poll: fix memory leak
Whenever a magical/tied scalar which dies upon read was passed to _poll()
temporary buffer for events was not freed.
Adapted from a patch by Sergey Aleynikov <sergey.aleynikov@gmail.com>
Yves Orton [Tue, 6 Dec 2016 23:56:33 +0000 (00:56 +0100)]
update perldelta with hash function changes
Yves Orton [Tue, 6 Dec 2016 23:44:49 +0000 (00:44 +0100)]
cleanup hv_func.h - remove non-recommended hash variants
We dont need to offer so many options in terms of hash
function. Many, if not all, of the removed functions are
deficient in one way or another.
Yves Orton [Tue, 6 Dec 2016 23:20:05 +0000 (00:20 +0100)]
fixup pod in Porting/bench.pl
vim and podcheck.t didnt agree on how long the line was, so I just gave in and submitted
to its tyranny.
Yves Orton [Tue, 6 Dec 2016 22:48:52 +0000 (23:48 +0100)]
use a hybrid hash function, OAATH for short keys, Siphash 1-3 for longer ones
Switch to an optimized/unrolled variant of OAATH for keys
16 bytes and less, and use Siphash 1-3 for longer keys. (On
64 bit builds, 32 bit is untouched.)
I've done a bunch of benchmarking with Porting/bench.pl to
see at what point the 8 byte reads of Siphash 1-3 start to
win over the low overhead costs of OAATH. It seems to be around
16 bytes. At the same time, we unroll OAATH so that we can save
some instructions per character. The net result is all key lengths
get faster as measured by Porting/bench.pl, and hashing longer keys
becomes *much* faster.
Interestingly the actual crossover point of OAATH being slower
than Siphash 1-3 is much higher than might be guessed from bulk
testing either in a raw benchmark. For instance, basic benchmarks
of the hash function alone predicts that Siphash 1-3 should "win"
at around 4 bytes. However, in practice it is four times longer.
I believe this is because setting up Siphash blows away a fair
amount of CPU state compared to OAATH, which is more important
when the hash is going to be used to manage a data structure.
So it requires a correspondingly longer string before the larger
sized read starts to win.
Summarized stats (higher is better):
AVERAGE
blead yves
------ ------
Ir 100.00 104.47
Dr 100.00 103.97
Dw 100.00 107.63
COND 100.00 112.16
IND 100.00 75.07
COND_m 100.00 125.75
IND_m 100.00 97.42
Ir_m1 100.00 137.11
Dr_m1 100.00 100.10
Dw_m1 100.00 99.62
Ir_mm 100.00 100.00
Dr_mm 100.00 100.00
Dw_mm 100.00 100.00
Yves Orton [Tue, 6 Dec 2016 22:27:38 +0000 (23:27 +0100)]
Add some tests for hash keys of different sizes.
We test every key length from 1..24, and then various
larger sizes. We expect most of our keys to be short
so we check each length to see how performance is affected
as key length increases.
Yves Orton [Tue, 6 Dec 2016 22:16:44 +0000 (23:16 +0100)]
allow two-step benchmarks with Porting/bench.pl
with this patch you can time blead, and save the results:
bench.pl --tests=/whatever/ --write=blead.time -- ./perl=blead
then iterate over hacking the code and running
bench.pl --read=blead.time --write=last.time -- ./perl=hacked
and seeing the results of the --tests defined in the first run,
and the results from the save file 'blead.time' compared against
the modified version of perl in the most recent run. At the same
time the merged data is written as last.time, allowing the usual
post-test analysis of the results.
Yves Orton [Tue, 6 Dec 2016 21:29:03 +0000 (22:29 +0100)]
tweak perlmod.pod
James E Keenan [Tue, 6 Dec 2016 14:15:09 +0000 (09:15 -0500)]
Improve discussion of packages and their scopes.
For: RT #129345
Steve Hay [Tue, 6 Dec 2016 08:41:46 +0000 (08:41 +0000)]
Upgrade Encode from version 2.86 to 2.88
(Unicode.pm is customized for a version-bump only, to silence
t/porting/cmp_version.t since Unicode.xs has changed.)
David Mitchell [Mon, 5 Dec 2016 14:54:44 +0000 (14:54 +0000)]
assertion failure in ... or ((0) x 0))
[perl #130247] Perl_rpeep(OP *): Assertion `oldop' failed
the 'x 0' optimising code in rpeep didn't expect the repeat expression
to occur on the op_other side of an op_next chain.
David Mitchell [Mon, 5 Dec 2016 12:47:42 +0000 (12:47 +0000)]
add some /* NOTREACHED */
The previous commit added some
NOT_REACHED;
but these days the correct voodoo is, apparently,
NOT_REACHED; /* NOTREACHED */
to please as many compilers and static analysers as possible
Andy Lester [Sat, 3 Dec 2016 03:07:26 +0000 (22:07 -0500)]
Clean up warnings uncovered by 'clang -Weverything'.
For: RT #130195
David Mitchell [Mon, 5 Dec 2016 09:37:36 +0000 (09:37 +0000)]
optimise Perl_sv_gets(): use memchr() for loop
The inner loop which searches for the next separator character and copies
buffer bytes: replace with memchr() and Copy(). These functions are
likely to be optimised to use whatever hardware facilities are available.
(But first check that the first char in the buffer isn't the separator:
blank lines are quite common, and we can skip the overhead of calling
memchr() in that case).
David Mitchell [Sun, 4 Dec 2016 08:10:27 +0000 (08:10 +0000)]
yyparse: only calculate yytoken on yychar change
yytoken is a translated (via lookup table) version of parser->yychar.
So we only need to recalculate it when yychar changes (usually by
assigning the result of yylex() to it). This means when multiple
reductions are done without shifting another token, we skip the extra
overhead each time.
David Mitchell [Sat, 3 Dec 2016 20:58:37 +0000 (20:58 +0000)]
yyparse(): only check stack size in outer loop
Rather than checking before each individual shift whether the parse stack
needs extending, only check once per rule, making sure there's enough
space to shift all the items for the longest possible rule
David Mitchell [Sat, 3 Dec 2016 16:27:24 +0000 (16:27 +0000)]
yyparse: reindent
whitespace-only.
The previous commit wrapped the main body of code in a
while (1) { ...}
David Mitchell [Sat, 3 Dec 2016 16:23:55 +0000 (16:23 +0000)]
yyparse: replace yynewstate label with while(1) {}
makes the code easier to understand
David Mitchell [Sat, 3 Dec 2016 16:00:58 +0000 (16:00 +0000)]
yyparse: eliminate yyreduce label
Makes things slightly simpler.
David Mitchell [Sat, 3 Dec 2016 15:12:49 +0000 (15:12 +0000)]
yyparse: reindent
whitespace-only; previous commit wrapped a block of code in while (1){}
David Mitchell [Sat, 3 Dec 2016 15:11:11 +0000 (15:11 +0000)]
yyparse: replace some gotos with a while(1) loop
Just as efficient, and more readable.
Welcome to 1970's structured programming!
David Mitchell [Sat, 3 Dec 2016 14:08:56 +0000 (14:08 +0000)]
optimising yyparse: avoid a < 0 check
casting to unsigned allows (0 <= yyn <= YYLAST) to be done in a single
conditional.
David Mitchell [Sat, 3 Dec 2016 14:01:19 +0000 (14:01 +0000)]
optimising yyparse: replace stack_size with a ptr
Makes testing whether the parser stack needs extending cheaper
Yves Orton [Sat, 26 Nov 2016 19:12:41 +0000 (20:12 +0100)]
make sure that new heredoc parsing doesn't COW during prefix strip
Yves Orton [Fri, 18 Nov 2016 10:18:00 +0000 (11:18 +0100)]
fix sort order to be by key alone, not key and value
Sorting with the value part of the statement means that
"perl5=foo" sorts before "perl=foo", where sorting by the
keys alone would put "perl" before "perl5".
This makes the order in the data correspond to what you
would see with sort keys %Config.
Chris 'BinGOs' Williams [Sat, 3 Dec 2016 07:34:55 +0000 (07:34 +0000)]
Update bignum to CPAN version 0.44
[DELTA]
2016-11-15 pjacklam 0.44
* Update bundled Module::Install from version 1.16 to version 1.17.
* Replace function calls with method calls.
* Include patch for CPAN RT #116506.
Chris 'BinGOs' Williams [Sat, 3 Dec 2016 07:25:54 +0000 (07:25 +0000)]
Update Math-BigRat to CPAN version 0.260805
[DELTA]
2016-11-15 v0.260805 pjacklam
* Standardize on using $LIB for the variable holding the class of the backend
library.
* Improve bmul() by doing _gcd() twice on smaller numbers rather than once on
larger numbers.
Chris 'BinGOs' Williams [Sat, 3 Dec 2016 07:23:23 +0000 (07:23 +0000)]
Update Math-BigInt-FastCalc to CPAN version 0.5002
[DELTA]
2016-11-23 v0.5002 pjacklam
* Sync test files with Math-BigInt-1.999801. Add t/biglog.t and t/bigroot.t
since these are included in the test suite for the other backend libraries
(GMP and Pari).
2016-11-17 v0.5001 pjacklam
* Avoid 'use parent' to retain compatibility with old Perls.
* Fix incorrect version numbers in the CHANGES file.
* Trim whitespace.
2016-11-15 v0.5000 pjacklam
* Sync test files with Math-BigInt-1.999800.
* Math::BigInt::FastCalc is now a subclass of Math::BigInt::Calc, so remove
aliases like *Math::BigInt::FastCalc::_xxx = \&Math::BigInt::Calc::_xxx.
* Use OO-calls rather than function calls.
* Fix documentation error in Math::BigInt::FastCalc
Chris 'BinGOs' Williams [Sat, 3 Dec 2016 07:14:13 +0000 (07:14 +0000)]
Update Math-BigInt to CPAN version 1.999802
[DELTA]
2016-11-15 v1.999800 pjacklam
* Upgrade bundled Module::Install from version 1.16 to version 1.17.
* Add Math::BigInt::Lib (lib/Math/BigInt/Lib.pm), a parent class for
Math::BigInt backend libraries.
* Use objects in Math::BigInt::Calc, not just array refs. Also use OO-style,
i.e., use $class->_add($x, $y) rather than _add($class, $x, $y).
* Not all library methods modify the invocand, so call library methods as,
e.g, $x = $LIB->method($x, $y) rather than just $LIB->method($x, $y).
* Math::BigInt::Calc is now a subclass of Math::BigInt::Lib.
* Add Math::BigInt::Lib::Minimal (t/Math/BigInt/Lib/Minimal.pm) for testing
inheritance from Math::BigInt::Lib.
* Minor simplification in Math::BigInt::Calc->_str().
* Speed up Math::BigInt::Calc->_root().
* Remove test files that were included in the previous release by accident.
* Add more tests and use more verbose output in some tests.
* Fix typo in lib/Math/BigFloat.pm
* Fix documentation error in lib/Math/Calc.pm
* Use Config::Tiny and an .ini file to handle the library specific
configuration for the author-lib*.t test files.
2016-11-23 v1.999801 pjacklam
* Fix, hopefully once and for all, the longstanding problem of handling undef
as an operand to mathematical methods. The only method that accepts undef as
an operand is blog(), where the second operand might be undef, as in
$x->blog() or $x->blog($b), where $b is undef. The undef signifies that
Euler's number should be used as the base. With this fix, we should be able
to get Math::BigInt::Lite working again.
* Add least common multiple method _lcm() to Math::BigInt::Lib, and add
corresponding test file t/author-lib-arithmetic-binary-_lcm.t and test data
file t/author-lib-arithmetic-binary-_lcm.dat.
* Remove internal function __lcm() which has become redundant now that _lcm()
is in the library.
* Make it possible to use bgcd() and blcm() as class methods, since other
methods can be used as class methods. This applies to both Math::BigInt and
Math::BigFloat.
* Fix blcm() with negative input. The LCM should always be non-negative. This
applies to both Math::BigInt and Math::BigFloat.
* Add tests for bgcd() and blcm() in t/bigintpm.t and t/bigfltpm.t.
* Fix tests for blcm() assuming that LCM(0,0) should be a NaN. LCM(0,0) is 0
by convention.
* Prefer Class->config('option') over Class->config()->{option}. However, this
does not seem to be working for all options. It seems that this won't work
properly until we move the global variables into the OO interface.
* Explicitly specify the library in all test files that are shared between
Math-BigInt and the library distributions (FaatCalc, GMP, Pari, ...) with,
e.g., "use Math::BigInt only => 'Calc';". This way, it will fail immediately
if the specified library can't be loaded rather than using the fallback
library.
2016-11-28 v1.999802 pjacklam
* When bzero(), bone(), binf(), and bnan() are used as constructors, don't
check whether the class allows the object to be modified. This applies to
both Math::BigInt and Math::BigFloat.
* Improve bgcd() and blcm(). This applies to both Math::BigInt and
Math::BigFloat.
Chris 'BinGOs' Williams [Sat, 3 Dec 2016 06:47:12 +0000 (06:47 +0000)]
Update Test-Simple to CPAN version 1.302067
[DELTA]
1.302067 2016-11-23 07:37:56-08:00 America/Los_Angeles
- Fix context test for recent blead.
1.302066 2016-11-08 07:58:39-08:00 America/Los_Angeles (TRIAL RELEASE)
- Handle cases where SysV IPC can be available but not enabled
- Import 'context' into Test2::IPC, it is used by 'cull'
- Propogate warnings settings to use_ok (#736)
1.302065 2016-10-30 11:54:37-07:00 America/Los_Angeles (TRIAL RELEASE)
- Set the TEST_ACTIVE env var to true
- Set the TEST2_ACTIVE env var to true
- Fix the oldest bug still in the bug list (#6)
This fixes cmp_ok output is some confusing cases
- Update travis config
- Add missing author deps
- Fix handling of negative pid's on windows
- Add can() to Test::Tester::Delegate (despite deprecation)
- Fix some minor test issues
1.302064 2016-10-24 21:03:24-07:00 America/Los_Angeles (TRIAL RELEASE)
- Repo management improvements
- Better handling of info vs diag in ->send_event
- Fix test that used 'parent'
- Better handling of non-bumping failures (#728)
1.302063 2016-10-23 21:31:20-07:00 America/Los_Angeles (TRIAL RELEASE)
- Fix double release when 'throw' is used in context_do()
Chris 'BinGOs' Williams [Sat, 3 Dec 2016 06:45:17 +0000 (06:45 +0000)]
Reconcile Time-HiRes with CPAN release
Chris 'BinGOs' Williams [Sat, 3 Dec 2016 06:42:34 +0000 (06:42 +0000)]
Update Time-Local to CPAN version 1.25
[DELTA]
1.25 2016-11-17
- Reduce memory usage by only loading Config if needed and not importing from
Carp. Based on PR #2 from J. Nick Coston.
Chris 'BinGOs' Williams [Sat, 3 Dec 2016 06:38:51 +0000 (06:38 +0000)]
Update Unicode-Collate to CPAN version 1.19
[DELTA]
1.19 Sat Dec 3 09:32:31 2016
- U::C::Locale newly supports locales: he, vo.
- locales updated to CLDR 24: az, haw.
- locale updated to CLDR 26: et.
Andy Lester [Sat, 3 Dec 2016 02:51:14 +0000 (21:51 -0500)]
Move miscategorized files.
The pod/.gitignore file has sections of files that should be ignored.
Three of the files are in the wrong section, in the
architecture-specific section instead of the generated-files section.
This changes no functionality, but may help future maintainers from
confusion.
For: RT #130194
Petr Písař [Mon, 28 Nov 2016 12:06:24 +0000 (13:06 +0100)]
Silent const correctnes warnings in utf8_hop functions
GCC -Wcast-qual option reports a const violation in utf8_hop
functions. They take a pointer to constant data but returns pointer to
non-constant data.
It's impossible to fix this without changing their prototype.
Therefore this patch asks a compiler to ignore the violations.
Signed-off-by: Petr Písař <ppisar@redhat.com>
Petr Písař [Thu, 24 Nov 2016 16:12:41 +0000 (17:12 +0100)]
Fix const correctness in utf8.h
The original code was generated and then hand-tunes. Therefore
I edited the code in place instead of fixing the regen/regcharclass.pl
generator.
Signed-off-by: Petr Písař <ppisar@redhat.com>
Petr Písař [Thu, 24 Nov 2016 15:34:09 +0000 (16:34 +0100)]
Fix const correctness in hv_func.h
Building an XS code with -Wcast-qual yielded warnings about discarding
const qualifiers from pointer targets like:
$ printf '#include "EXTERN.h"\n#include "perl.h"\n' | gcc -Wcast-qual -I/usr/lib64/perl5/CORE -c -x c -
In file included from /usr/lib64/perl5/CORE/hv.h:629:0,
from /usr/lib64/perl5/CORE/perl.h:3740,
from <stdin>:2:
/usr/lib64/perl5/CORE/hv_func.h: In function ‘S_perl_hash_siphash_2_4’:
/usr/lib64/perl5/CORE/hv_func.h:213:17: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
U64TYPE k0 = ((U64TYPE*)seed)[0];
^
Signed-off-by: Petr Písař <ppisar@redhat.com>