perlcdelta - what is new for cperl v5.25.0
This document describes perl-only differences between the cperl 5.24.0 release and the cperl 5.25.0 release.
If you are upgrading from an earlier release such as 5.22.3, first read perl5240cdelta, which describes differences between 5.22.3 and 5.24.0.
perl5.24.1 was security update to a non-existing problem. cperl added PERLIO_DEBUG as optional handle to redirect DEBUGGING outout via -Dx switches to. This is only usable with DEBUGGING perls, which are not used in production, only during development. perl5.24.1 changed PERLIO_DEBUG to only be active for PerlIO debugging together with -Di.
for loops got several enhancements:
new special iter_ary
for (@ary)
and iter_lazyivfor (0..9)
ops to avoid a run-time switch in the generic iter op.more aelem_u optimizations, less run-time out of bounds checks for shaped arrays in loops. E.g. in
my @a[5]; $a[$_] for (0..4);
the compilers knows that the max index for@a
will be4
, which is within the allowed shape of@a
.The
multideref
OP has a newMDEREF_INDEX_uoob
flag. This is used for unchecked out-of-bounds checks for arrays, to use the previous AvSHAPED array optimizations (aelem_u, aelemfast_lex_u) or loop out-of-bounds elimination with multideref OPs also. Such multideref ops appear pretty often even with single indices. E.g. inmy @b=(0..4); for (0..$#b) { $b[$_] = 0; }
$b[$_]
is converted to a multideref, which previously was not optimized.Those optimized indices are marked with a new " _u" suffix in the dumped multideref stringification.
MDEREF_MASK
changed to 0x10F, theMDEREF_SHIFT
size from 7 to 8. The shift can also use faster intrinsics now.The loop out-of-bounds elimination was fixed for simple lexical indices (e.g.
for my $i (0..$#a){ $a[$i] }
, which leads now to more aelem_u ops and subsequent mderef_u optimizations also.The new
strQEc
/strNEc
macros are used instead ofstrEQ(s,"constant")
. This enables word-wise comparison via memcpy, in opposite of byte-wise comparisons via strcmp with already known sizes. This is a 10% performance improvement under most optimization levels.
Opcode has been upgraded from version 1.34c to 1.35c, with the new iter_ary and iter_lazyiv ops.
The following additions or changes have been made to diagnostic output, including warnings and fatal error messages. For the complete list of diagnostic messages, see perldiag.
- Invalid for range iterator (%d .. %d)
-
(F) A range with constant integers as a for loop cannot be reversed.
We check now at compile-time that a range with
for
loops with constant integers is incremental, the 2nd number must be higher. We don't support reverse loops with ranges, i.e.for (9..0)
is invalid, butfor (0..$#ary)
with$#ary
being-1
is valid.Reverse constant strings ranges are still valid and lead to an empty loop. i.e.
for ('z'..'a')
is currently valid.
- mingw
-
Compilation under mingw (32 and/or 64bit) was fixed by removing a duplicate pp_sys.c entry in win32/GNUMakefile.
- linux
-
Check for null in pp_ghostent et al.
On some platforms (such as Gentoo Linux with torsocks), hent->h_aliases (where hent is a struct hostent *) may be null after a gethostent call.
The negate op has now it's own ck_negate callback.
- SvREADONLY_off: allow calls as argument
-
No multiple evaluation of its argument anymore.
Perl 5.25.0 represents approximately 2 weeks of development since Perl 5.24.0c and contains approximately 6,300 lines of changes across 120 files from 4 authors.
Excluding auto-generated files, documentation and release tools, there were approximately 3,900 lines of changes to 53 .pm, .t, .c and .h files.
Perl continues to flourish into its third decade thanks to a vibrant community of users and developers. The following people are known to have contributed the improvements that became Perl 5.25.0:
Reini Urban, Father Chrysostomos, Daniel Dragan, Tony Cook.
The list above is almost certainly incomplete as it is automatically generated from version control history. In particular, it does not include the names of the (very much appreciated) contributors who reported issues to the Perl bug tracker.
For a more complete list of all of Perl's historical contributors, please see the AUTHORS file in the Perl source distribution.
If you find what you think is a bug, you might check the articles recently posted to the comp.lang.perl.misc newsgroup and the perl bug database at https://rt.perl.org/ . There may also be information at http://www.perl.org/ , the Perl Home Page.
If you believe you have an unreported bug, please run the cperlbug program included with your release. Be sure to trim your bug down to a tiny but sufficient test case. Your bug report, along with the output of perl -V
, will be sent off to [email protected] to be analysed by the Perl porting team.
If the bug you are reporting has security implications which make it inappropriate to send to a publicly archived mailing list, then see "SECURITY VULNERABILITY CONTACT INFORMATION" in perlsec for details of how to report the issue.
The Changes file for an explanation of how to view exhaustive details on what changed.
The INSTALL file for how to build Perl.
The README file for general stuff.
The Artistic and Copying files for copyright information.