From 470722b48ea05e8267d95479f715193214359722 Mon Sep 17 00:00:00 2001 From: Ricardo Signes Date: Tue, 24 Apr 2012 20:51:22 -0400 Subject: [PATCH] perldelta: reimport the 5.15.x internals sections --- Porting/perl5160delta.pod | 204 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 191 insertions(+), 13 deletions(-) diff --git a/Porting/perl5160delta.pod b/Porting/perl5160delta.pod index 5bd56ae..f8ff298 100644 --- a/Porting/perl5160delta.pod +++ b/Porting/perl5160delta.pod @@ -1713,26 +1713,85 @@ without cc. =item * -There are now feature bundle hints in C (C<$^H>) that version -declarations use, to avoid having to load F. One setting of -the hint bits indicates a "custom" feature bundle, which means that the -entries in C<%^H> still apply. F uses that. +The compiled representation of formats is now stored via the C of +their C. Previously it was stored in the string buffer, +beyond C, the regular end of the string. C and +C now exist solely for compatibility for XS code. +The first is always 0, the other two now no-ops. (5.14.1) -The C macro is defined in F along with other -hints. Other macros for setting and testing features and bundles are in -the new F. C (which has moved to -F) is no longer used throughout the codebase, but more specific -macros, e.g., C, that are defined in F. +=item * + +Some global variables have been marked C, members in the interpreter +structure have been re-ordered, and the opcodes have been re-ordered. The op +C has been split into C and C. =item * -F is now a generated file, created by the new -F script, which also generates F. +When empting a hash of its elements (e.g. via undef(%h), or %h=()), HvARRAY +field is no longer temporarily zeroed. Any destructors called on the freed +elements see the remaining elements. Thus, %h=() becomes more like C. =item * -Tied arrays are now always C. If C<@_> or C is tied, it -is reified first, to make sure this is always the case. +Boyer-Moore compiled scalars are now PVMGs, and the Boyer-Moore tables are now +stored via the mg_ptr of their C. Previously they were PVGVs, +with the tables stored in the string buffer, beyond C. This eliminates +the last place where the core stores data beyond C. + +=item * + +Simplified logic in C introduces a small change of +behaviour for error cases involving unknown magic types. Previously, if +C was passed a magic type unknown to it, it would + +=over + +=item 1. + +Croak "Modification of a read-only value attempted" if read only + +=item 2. + +Return without error if the SV happened to already have this magic + +=item 3. + +otherwise croak "Don't know how to handle magic of type \\%o" + +=back + +Now it will always croak "Don't know how to handle magic of type \\%o", even +on read only values, or SVs which already have the unknown magic type. + +=item * + +The experimental C function has been renamed to +C. + +=item * + +The C function has been added to the API, but is +experimental. + +=item * + +F has been simplified, and one level of macro indirection for +PL_* variables has been removed for the default (non-multiplicity) +configuration. PERLVAR*() macros now directly expand their arguments to +tokens such as C, instead of expanding to C, with +F defining a macro to map C to C. XS code +which has unwarranted chumminess with the implementation may need updating. + +=item * + +A C opcode has been added, to be used by C<&CORE::foo> subs to sort +out C<@_>. + +=item * + +An API has been added to explicitly choose whether or not to export XSUB +symbols. More detail can be found in the comments for commit e64345f8. =item * @@ -1754,6 +1813,125 @@ F has done its custom freeing of the pads). All the C files that make up the Perl core have been converted to UTF-8. +=item * + +These new functions have been added as part of the work on Unicode symbols: + + HvNAMELEN + HvNAMEUTF8 + HvENAMELEN + HvENAMEUTF8 + gv_init_pv + gv_init_pvn + gv_init_pvsv + gv_fetchmeth_pv + gv_fetchmeth_pvn + gv_fetchmeth_sv + gv_fetchmeth_pv_autoload + gv_fetchmeth_pvn_autoload + gv_fetchmeth_sv_autoload + gv_fetchmethod_pv_flags + gv_fetchmethod_pvn_flags + gv_fetchmethod_sv_flags + gv_autoload_pv + gv_autoload_pvn + gv_autoload_sv + newGVgen_flags + sv_derived_from_pv + sv_derived_from_pvn + sv_derived_from_sv + sv_does_pv + sv_does_pvn + sv_does_sv + whichsig_pv + whichsig_pvn + whichsig_sv + newCONSTSUB_flags + +The gv_fetchmethod_*_flags functions, like gv_fetchmethod_flags, are +experimental and may change in a future release. + +=item * + +The following functions were added. These are I part of the API: + + GvNAMEUTF8 + GvENAMELEN + GvENAME_HEK + CopSTASH_flags + CopSTASH_flags_set + PmopSTASH_flags + PmopSTASH_flags_set + sv_sethek + HEKfARG + +There is also a C macro corresponding to C, for +interpolating HEKs in formatted strings. + +=item * + +C takes a couple of new internal-only flags, +C and C, which tell it whether the char array to +be concatenated is UTF8. This allows for more efficient concatenation than +creating temporary SVs to pass to C. + +=item * + +For XS AUTOLOAD subs, $AUTOLOAD is set once more, as it was in 5.6.0. This +is in addition to setting C, for compatibility with 5.8 to 5.14. +See L. + +=item * + +Perl now checks whether the array (the linearised isa) returned by a MRO +plugin begins with the name of the class itself, for which the array was +created, instead of assuming that it does. This prevents the first element +from being skipped during method lookup. It also means that +C may return an array with one more element than the +MRO plugin provided [perl #94306]. + +=item * + +C is now reference-counted. + +=item * + +There are now feature bundle hints in C (C<$^H>) that version +declarations use, to avoid having to load F. One setting of +the hint bits indicates a "custom" feature bundle, which means that the +entries in C<%^H> still apply. F uses that. + +The C macro is defined in F along with other +hints. Other macros for setting and testing features and bundles are in +the new F. C (which has moved to +F) is no longer used throughout the codebase, but more specific +macros, e.g., C, that are defined in F. + +=item * + +F is now a generated file, created by the new +F script, which also generates F. + +=item * + +Tied arrays are now always C. If C<@_> or C is tied, it +is reified first, to make sure this is always the case. + +=item * + +Two new functions C and C have +been added. These are the same as C and +C (which are now deprecated), but take an extra parameter +that is used to guard against reading beyond the end of the input +string. +See L and L. + +=item * + +The regular expression engine now does TRIE case insensitive matches +under Unicode. This may change the output of C<< use re 'debug'; >>, +and will speed up various things. + =back =head1 Selected Bug Fixes -- 2.7.4