This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta: Oust the XS-specific core enhancements
authorFather Chrysostomos <sprout@cpan.org>
Mon, 14 Mar 2011 20:14:27 +0000 (13:14 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 21 Mar 2011 16:16:34 +0000 (09:16 -0700)
They can go in their own section as Core Enhancements is far too big.

pod/perldelta.pod

index f35f8fc..2e0a548 100644 (file)
@@ -92,14 +92,6 @@ is precisely equivalent to C<{ package Foo; ... }>.  It also works with
 a version number in the declaration, as in C<package Foo 1.2 { ... }>.
 See L<perlfunc> (434da3..36f77d, 702646).
 
-=head2 CLONE_PARAMS structure added to ease correct thread creation
-
-Modules that create threads should now create C<CLONE_PARAMS> structures
-by calling the new function C<Perl_clone_params_new()>, and free them with
-C<Perl_clone_params_del()>. This will ensure compatibility with any future
-changes to the internals of the C<CLONE_PARAMS> structure layout, and that
-it is correctly allocated and initialised.
-
 =head2 perl -h no longer recommends -w
 
 perl -h used to mark the -w option as recommended; since this option is
@@ -175,22 +167,6 @@ each run.  It can test a random subset each time, and should there be a failure,
 log the seed used for that run so that it can later be used to reproduce the
 exact results.
 
-=head2 API function to parse statements
-
-The C<parse_fullstmt> function has been added to allow parsing of a single
-complete Perl statement.  See L<perlapi> for details.
-
-=head2 API functions for accessing the runtime hinthash
-
-A new C API for introspecting the hinthash C<%^H> at runtime has been added.
-See C<cop_hints_2hv>, C<cop_hints_fetchpvn>, C<cop_hints_fetchpvs>,
-C<cop_hints_fetchsv>, and C<hv_copy_hints_hv> in L<perlapi> for details.
-
-=head2 C interface to C<caller()>
-
-The C<caller_cx> function has been added as an XSUB-writer's equivalent of
-C<caller()>.  See L<perlapi> for details.
-
 =head2  C<(?^...)> regex construct added to signify default modifiers
 
 A caret (also called a "circumflex accent") C<"^"> immediately following
@@ -247,23 +223,6 @@ C<(??{...})> code blocks inside regular expressions.
 These block are still experimental, however, and still have problems with
 lexical (C<my>) variables, lexical pragmata and abnormal exiting.
 
-=head2 Custom per-subroutine check hooks
-
-XS code in an extension module can now annotate a subroutine (whether
-implemented in XS or in Perl) so that nominated XS code will be called
-at compile time (specifically as part of op checking) to change the op
-tree of that subroutine.  The compile-time check function (supplied by
-the extension module) can implement argument processing that can't be
-expressed as a prototype, generate customised compile-time warnings,
-perform constant folding for a pure function, inline a subroutine
-consisting of sufficiently simple ops, replace the whole call with a
-custom op, and so on.  This was previously all possible by hooking the
-C<entersub> op checker, but the new mechanism makes it easy to tie the
-hook to a specific subroutine.  See L<perlapi/cv_set_call_checker>.
-
-To help in writing custom check hooks, several subtasks within standard
-C<entersub> op checking have been separated out and exposed in the API.
-
 =head2 Return value of C<delete $+{...}>
 
 Custom regular expression engines can now determine the return value of
@@ -377,24 +336,6 @@ is that in Perl 5.16, C<\N{BELL}> will refer to U+1F514, and so all code
 that uses C<\N{BELL}> should convert by then to using C<\N{ALERT}>,
 C<\N{BEL}>, or C<"\a"> instead.
 
-=head2 Improved support for custom OPs
-
-Custom ops can now be registered with the new C<custom_op_register> C
-function and the C<XOP> structure. This will make it easier to add new
-properties of custom ops in the future. Two new properties have been added
-already, C<xop_class> and C<xop_peep>.
-
-C<xop_class> is one of the OA_*OP constants, and allows L<B> and other
-introspection mechanisms to work with custom ops that aren't BASEOPs.
-C<xop_peep> is a pointer to a function that will be called for ops of this
-type from C<Perl_rpeep>.
-
-See L<perlguts/Custom Operators> and L<perlapi/Custom Operators> for more
-detail.
-
-The old C<PL_custom_op_names>/C<PL_custom_op_descs> interface is still
-supported but discouraged.
-
 =head2 C<-d:-foo> calls C<Devel::foo::unimport>
 
 The syntax C<-dI<B<:>foo>> was extended in 5.6.1 to make C<-dI<:fooB<=bar>>>
@@ -3441,6 +3382,73 @@ like in the other BSD dialects.
 
 =head1 Internal Changes
 
+=head2 New APIs
+
+=head2 CLONE_PARAMS structure added to ease correct thread creation
+
+Modules that create threads should now create C<CLONE_PARAMS> structures
+by calling the new function C<Perl_clone_params_new()>, and free them with
+C<Perl_clone_params_del()>. This will ensure compatibility with any future
+changes to the internals of the C<CLONE_PARAMS> structure layout, and that
+it is correctly allocated and initialised.
+
+=head2 API function to parse statements
+
+The C<parse_fullstmt> function has been added to allow parsing of a single
+complete Perl statement.  See L<perlapi> for details.
+
+=head2 API functions for accessing the runtime hinthash
+
+A new C API for introspecting the hinthash C<%^H> at runtime has been added.
+See C<cop_hints_2hv>, C<cop_hints_fetchpvn>, C<cop_hints_fetchpvs>,
+C<cop_hints_fetchsv>, and C<hv_copy_hints_hv> in L<perlapi> for details.
+
+=head2 C interface to C<caller()>
+
+The C<caller_cx> function has been added as an XSUB-writer's equivalent of
+C<caller()>.  See L<perlapi> for details.
+
+=head2 Custom per-subroutine check hooks
+
+XS code in an extension module can now annotate a subroutine (whether
+implemented in XS or in Perl) so that nominated XS code will be called
+at compile time (specifically as part of op checking) to change the op
+tree of that subroutine.  The compile-time check function (supplied by
+the extension module) can implement argument processing that can't be
+expressed as a prototype, generate customised compile-time warnings,
+perform constant folding for a pure function, inline a subroutine
+consisting of sufficiently simple ops, replace the whole call with a
+custom op, and so on.  This was previously all possible by hooking the
+C<entersub> op checker, but the new mechanism makes it easy to tie the
+hook to a specific subroutine.  See L<perlapi/cv_set_call_checker>.
+
+To help in writing custom check hooks, several subtasks within standard
+C<entersub> op checking have been separated out and exposed in the API.
+
+=head2 Improved support for custom OPs
+
+Custom ops can now be registered with the new C<custom_op_register> C
+function and the C<XOP> structure. This will make it easier to add new
+properties of custom ops in the future. Two new properties have been added
+already, C<xop_class> and C<xop_peep>.
+
+C<xop_class> is one of the OA_*OP constants, and allows L<B> and other
+introspection mechanisms to work with custom ops that aren't BASEOPs.
+C<xop_peep> is a pointer to a function that will be called for ops of this
+type from C<Perl_rpeep>.
+
+See L<perlguts/Custom Operators> and L<perlapi/Custom Operators> for more
+detail.
+
+The old C<PL_custom_op_names>/C<PL_custom_op_descs> interface is still
+supported but discouraged.
+
+=head2 Changes to existing APIs
+
+XXX This probably contains also internal changes unrelated to APIs. It
+needs to be sorted out. Maybe we also need an ‘Other Changes’ or ‘Really
+Internal Changes’ section.
+
 =over 4
 
 =item *