|
| 1 | +=encoding utf8 |
| 2 | + |
| 3 | +=head1 NAME |
| 4 | + |
| 5 | +perl5250cdelta - what is new for cperl v5.25.0 |
| 6 | + |
| 7 | +=head1 DESCRIPTION |
| 8 | + |
| 9 | +This document describes perl-only differences between the cperl 5.24.0 |
| 10 | +release and the cperl 5.25.0 release. |
| 11 | + |
| 12 | +If you are upgrading from an earlier release such as 5.22.3, first read |
| 13 | +L<perl5240cdelta>, which describes differences between 5.22.3 and 5.24.0. |
| 14 | + |
| 15 | +=head1 Notice |
| 16 | + |
| 17 | +perl5.24.1 was security update to a non-existing problem. cperl added |
| 18 | +PERLIO_DEBUG as optional handle to redirect DEBUGGING outout via -Dx |
| 19 | +switches to. This is only usable with DEBUGGING perls, which are not |
| 20 | +used in production, only during development. |
| 21 | +perl5.24.1 changed PERLIO_DEBUG to only be active for PerlIO debugging |
| 22 | +together with -Di. |
| 23 | + |
| 24 | +=head1 Performance Enhancements |
| 25 | + |
| 26 | +=over 4 |
| 27 | + |
| 28 | +=item * |
| 29 | + |
| 30 | +for loops got several enhancements: |
| 31 | + |
| 32 | +new special B<iter_ary> C<for (@ary)> and B<iter_lazyiv> C<for (0..9)> |
| 33 | +ops to avoid a run-time switch in the generic iter op. |
| 34 | + |
| 35 | +more aelem_u optimizations, less run-time out of bounds checks for |
| 36 | +shaped arrays in loops. E.g. in C<my @a[5]; $a[$_] for (0..4);> the |
| 37 | +compilers knows that the max index for C<@a> will be C<4>, which is |
| 38 | +within the allowed shape of C<@a>. |
| 39 | + |
| 40 | +=item * |
| 41 | + |
| 42 | +The C<multideref> OP has a new C<MDEREF_INDEX_uoob> flag. This is |
| 43 | +used for unchecked out-of-bounds checks for arrays, to use the |
| 44 | +previous AvSHAPED array optimizations (aelem_u, aelemfast_lex_u) or |
| 45 | +loop out-of-bounds elimination with multideref OPs also. Such |
| 46 | +multideref ops appear pretty often even with single indices. E.g. in |
| 47 | +C<my @b=(0..4); for (0..$#b) { $b[$_] = 0; }> C<$b[$_]> is converted |
| 48 | +to a multideref, which previously was not optimized. |
| 49 | + |
| 50 | +Those optimized indices are marked with a new " _u" suffix in the dumped |
| 51 | +multideref stringification. |
| 52 | + |
| 53 | +C<MDEREF_MASK> changed to 0x10F, the C<MDEREF_SHIFT> size from 7 to 8. |
| 54 | +The shift can also use faster intrinsics now. |
| 55 | + |
| 56 | +The loop out-of-bounds elimination was fixed for simple lexical |
| 57 | +indices (e.g. C<for my $i (0..$#a){ $a[$i] }>, which leads now to |
| 58 | +more aelem_u ops and subsequent mderef_u optimizations also. |
| 59 | + |
| 60 | +=item * |
| 61 | + |
| 62 | +The new C<strQEc>/C<strNEc> macros are used instead of |
| 63 | +C<strEQ(s,"constant")>. This enables word-wise comparison via memcpy, |
| 64 | +in opposite of byte-wise comparisons via strcmp with already known |
| 65 | +sizes. This is a 10% performance improvement under most optimization |
| 66 | +levels. |
| 67 | + |
| 68 | +=back |
| 69 | + |
| 70 | +=head1 Modules and Pragmata |
| 71 | + |
| 72 | +=head2 Updated Modules and Pragmata |
| 73 | + |
| 74 | +=over 4 |
| 75 | + |
| 76 | +=item * |
| 77 | + |
| 78 | +L<Opcode> has been upgraded from version 1.34c to 1.35c, with the new |
| 79 | +iter_ary and iter_lazyiv ops. |
| 80 | + |
| 81 | +=back |
| 82 | + |
| 83 | +=head1 Diagnostics |
| 84 | + |
| 85 | +The following additions or changes have been made to diagnostic output, |
| 86 | +including warnings and fatal error messages. For the complete list of |
| 87 | +diagnostic messages, see L<perldiag>. |
| 88 | + |
| 89 | +=head2 New Diagnostics |
| 90 | + |
| 91 | +=head3 New Errors |
| 92 | + |
| 93 | +=over 4 |
| 94 | + |
| 95 | +=item Invalid for range iterator (%d .. %d) |
| 96 | + |
| 97 | +(F) A range with constant integers as a for loop cannot be reversed. |
| 98 | + |
| 99 | +We check now at compile-time that a range with C<for> loops with |
| 100 | +constant integers is incremental, the 2nd number must be higher. We |
| 101 | +don't support reverse loops with ranges, i.e. C<for (9..0)> is |
| 102 | +invalid, but C<for (0..$#ary)> with C<$#ary> being C<-1> is valid. |
| 103 | + |
| 104 | +Reverse constant strings ranges are still valid and lead to an empty |
| 105 | +loop. i.e. C<for ('z'..'a')> is currently valid. |
| 106 | + |
| 107 | +=back |
| 108 | + |
| 109 | +=head1 Platform Support |
| 110 | + |
| 111 | +=head2 Platform-Specific Notes |
| 112 | + |
| 113 | +=over 4 |
| 114 | + |
| 115 | +=item mingw |
| 116 | + |
| 117 | +Compilation under mingw (32 and/or 64bit) was fixed by removing a |
| 118 | +duplicate F<pp_sys.c> entry in F<win32/GNUMakefile>. |
| 119 | + |
| 120 | +=item linux |
| 121 | + |
| 122 | +Check for null in pp_ghostent et al. |
| 123 | + |
| 124 | +On some platforms (such as Gentoo Linux with torsocks), |
| 125 | +hent->h_aliases (where hent is a struct hostent *) may be null after a |
| 126 | +gethostent call. |
| 127 | + |
| 128 | +L<RT#128740|https://rt.perl.org/Public/Bug/Display.html?id=128740> |
| 129 | + |
| 130 | +=back |
| 131 | + |
| 132 | +=head1 Internal Changes |
| 133 | + |
| 134 | +=over 4 |
| 135 | + |
| 136 | +=item * |
| 137 | + |
| 138 | +The B<negate> op has now it's own B<ck_negate> callback. |
| 139 | + |
| 140 | +=back |
| 141 | + |
| 142 | +=head1 Selected Bug Fixes |
| 143 | + |
| 144 | +=over 4 |
| 145 | + |
| 146 | +=item SvREADONLY_off: allow calls as argument |
| 147 | + |
| 148 | +No multiple evaluation of its argument anymore. |
| 149 | + |
| 150 | +=back |
| 151 | + |
| 152 | +=head1 Acknowledgements |
| 153 | + |
| 154 | +Perl 5.25.0 represents approximately 2 weeks of development since Perl 5.24.0c |
| 155 | +and contains approximately 6,300 lines of changes across 120 files from 4 |
| 156 | +authors. |
| 157 | + |
| 158 | +Excluding auto-generated files, documentation and release tools, there were |
| 159 | +approximately 3,900 lines of changes to 53 .pm, .t, .c and .h files. |
| 160 | + |
| 161 | +Perl continues to flourish into its third decade thanks to a vibrant community |
| 162 | +of users and developers. The following people are known to have contributed the |
| 163 | +improvements that became Perl 5.25.0: |
| 164 | + |
| 165 | +Reini Urban, Father Chrysostomos, Daniel Dragan, Tony Cook. |
| 166 | + |
| 167 | +The list above is almost certainly incomplete as it is automatically generated |
| 168 | +from version control history. In particular, it does not include the names of |
| 169 | +the (very much appreciated) contributors who reported issues to the Perl bug |
| 170 | +tracker. |
| 171 | + |
| 172 | +For a more complete list of all of Perl's historical contributors, please see |
| 173 | +the F<AUTHORS> file in the Perl source distribution. |
| 174 | + |
| 175 | +=head1 Reporting Bugs |
| 176 | + |
| 177 | +If you find what you think is a bug, you might check the articles recently |
| 178 | +posted to the comp.lang.perl.misc newsgroup and the perl bug database at |
| 179 | +https://rt.perl.org/ . There may also be information at |
| 180 | +http://www.perl.org/ , the Perl Home Page. |
| 181 | + |
| 182 | +If you believe you have an unreported bug, please run the L<cperlbug> program |
| 183 | +included with your release. Be sure to trim your bug down to a tiny but |
| 184 | +sufficient test case. Your bug report, along with the output of C<perl -V>, |
| 185 | +will be sent off to perlbug@perl.org to be analysed by the Perl porting team. |
| 186 | + |
| 187 | +If the bug you are reporting has security implications which make it |
| 188 | +inappropriate to send to a publicly archived mailing list, then see |
| 189 | +L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION> |
| 190 | +for details of how to report the issue. |
| 191 | + |
| 192 | +=head1 SEE ALSO |
| 193 | + |
| 194 | +The F<Changes> file for an explanation of how to view exhaustive details on |
| 195 | +what changed. |
| 196 | + |
| 197 | +The F<INSTALL> file for how to build Perl. |
| 198 | + |
| 199 | +The F<README> file for general stuff. |
| 200 | + |
| 201 | +The F<Artistic> and F<Copying> files for copyright information. |
| 202 | + |
| 203 | +=cut |
0 commit comments