develooper Front page | perl.perl5.changes | Postings from September 2019

[perl.git] branch blead updated. v5.31.3-184-g8234439d1b

From:
Karl Williamson
Date:
September 15, 2019 16:44
Subject:
[perl.git] branch blead updated. v5.31.3-184-g8234439d1b
Message ID:
E1i9Xdj-0000EB-8x@git.dc.perl.space
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/8234439d1b57e10c5bbb0b024eeb325ea1a4b50a?hp=af50ae69325d1ddb2687210da1112fe07f6f2ab9>

- Log -----------------------------------------------------------------
commit 8234439d1b57e10c5bbb0b024eeb325ea1a4b50a
Merge: af50ae6932 c490e11f0b
Author: Karl Williamson <khw@cpan.org>
Date:   Sun Sep 15 10:40:29 2019 -0600

    Merge branch 'embed.fnc' into blead
    
    This series of commits slightly improves XS code name space pollution
    from the core, and better documents what is happening.
    
    It adds a new C flag to embed.fnc which doesn't change the pollution
    problem, but makes it easier for downstream tools, like Devel::PPPort.
    
    Some of the inline.h functions didn't even have prefixes, contrary to
    our policy of having functions visible outside the core have a 'Perl_'
    prefix.
    
    The branch also documents a couple of API functions and macros.
    
    And better error checking of embed.fnc entries is now done.

commit c490e11f0b40be46264c6bf41a7a6482953a8b0b
Author: Karl Williamson <khw@cpan.org>
Date:   Sat Sep 14 14:34:23 2019 -0600

    regen/embed.pl: Enforce some flag restrictions
    
    embed.fnc now has been updated to not have these flaws, so can now
    enforce them for the future.

commit fe4f8666d6b1432d30f0b3090a30becb8d2e13c3
Author: Karl Williamson <khw@cpan.org>
Date:   Sat Sep 14 14:33:16 2019 -0600

    regen/embed.pl: Update a branch test
    
    The two flags are now mutually exclusive, so no need to test for both.

commit 917b9b5460600d15e64f9feb530fda5d54f11cf4
Author: Karl Williamson <khw@cpan.org>
Date:   Sat Sep 14 14:30:18 2019 -0600

    embed.fnc: M and o flags don't make sense together
    
    The M flag does what the o flag except add an incorrect warning.  So
    remove the 'o' which gets rid of the warning.

commit 5178f485275d46a234a36077d213f9aee11b81ba
Author: Karl Williamson <khw@cpan.org>
Date:   Sat Sep 14 14:26:05 2019 -0600

    embed.fnc: 'm' and 'p' flags don't make sense together
    
    This is a macro, so doesn't have a Perl_ long form function call.
    Also forbid 'm' and 'S', but there weren't any current uses of that.

commit 9c10ff02ede505e07dd601a89271a2e3e5e79b52
Author: Karl Williamson <khw@cpan.org>
Date:   Sat Sep 14 14:16:19 2019 -0600

    perlapi: Properly document Perl_custom_op_xop()
    
    It requires the prefix and a thread context parameter.

commit 2f4e63396c17fcbf39095377d005faf7efd2b341
Author: Karl Williamson <khw@cpan.org>
Date:   Sat Sep 14 14:11:47 2019 -0600

    autodoc.pl: Special case macros whose name begins with Perl_
    
    The usage example for these will have the thread context parameter
    unless there is no thread context.

commit f0656a59b1612929968277af95a71b7149c24dfc
Author: Karl Williamson <khw@cpan.org>
Date:   Sat Sep 14 14:06:51 2019 -0600

    embed.fnc: Add some comment about name space pollution

commit 4060a4c6ff8a5525e73c47188120e780cff8958e
Author: Karl Williamson <khw@cpan.org>
Date:   Thu Sep 12 14:31:47 2019 -0600

    embed.fnc: E, X flags don't make sense with m
    
    Macros can't currently be restricted in scope.

commit 6bed70292d99c321fa0ebb66e36f22a3c20b9ba3
Author: Karl Williamson <khw@cpan.org>
Date:   Thu Sep 12 14:24:48 2019 -0600

    Document IS_SAFE_SYSCALL

commit 1a0efc9a50cf12f7908e5fc15dbe125c7e7cab94
Author: Karl Williamson <khw@cpan.org>
Date:   Thu Sep 12 14:23:18 2019 -0600

    perlapi: Improve description of is_safe_syscall()
    
    Two parameters weren't described, nor the warnings category used.

commit 86a87e17c5d1d82c2d23289eee5a7afc7bf11876
Author: Karl Williamson <khw@cpan.org>
Date:   Wed Sep 11 22:08:24 2019 -0600

    embed.fnc: Add p flag for is_utf8_non_invariant_string()
    
    This is because it has the X flag, which means the function is visible
    on ELF systems.

commit bdef45de9c7826f7f2eefe93a033a3f42f25608a
Author: Karl Williamson <khw@cpan.org>
Date:   Wed Sep 11 20:33:05 2019 -0600

    Add embed.fnc entry for ReANY
    
    This inline function should have an entry.

commit 2ac0ce0e1ab8109922cbf1cc0824d2a17da26951
Author: Karl Williamson <khw@cpan.org>
Date:   Wed Sep 11 18:18:33 2019 -0600

    Add embed.fnc entries for TOPMARK, POPMARK

commit 1bd041dce8bb8fa2727af6630fb35f00c0c05a65
Author: Karl Williamson <khw@cpan.org>
Date:   Wed Sep 11 17:37:23 2019 -0600

    Add Perl_ to SvAMAGIC _off,_on names
    
    These function names need a Perl_ prefix to avoid namespace pollution.

commit 74804ad189340f2812955e3c4308a6a82c0cc0eb
Author: Karl Williamson <khw@cpan.org>
Date:   Wed Sep 11 17:24:38 2019 -0600

    Add embed.fnc entries for Cv inline fcns
    
    and change the name of one.  CvDEPTH shouldn't have a trailing 'p' to
    indicate private memeber access.  It may do so internally, but the name
    shouldn't indicate that.

commit 94b0cb42d04bb202dba31ef85db6c93b0c93ae6d
Author: Karl Williamson <khw@cpan.org>
Date:   Wed Sep 11 17:08:25 2019 -0600

    Fix up get_regex_charset_name()
    
    This inline function should not be visible outside certain core (and
    ext/re) functions.  Make that happen.

commit ffd62fc2fb74955cac5af41e7b3820e09877c3b4
Author: Karl Williamson <khw@cpan.org>
Date:   Wed Sep 11 17:03:29 2019 -0600

    inline.h: Move some fcn '{' to column 1
    
    Traditionally, functions in perl have been written so their initial '{'
    is in column 1 after the prototype.  This makes grepping easier.  This
    commit brings 3 functions in this file into conformance.

commit b9d5702c94e722aa7b69045bcffee45cc7d7d517
Author: Karl Williamson <khw@cpan.org>
Date:   Wed Sep 11 15:56:11 2019 -0600

    Make PadnameIN_SCOPE() name begin with S_
    
    All functions should have a prefix.

commit 3f2f854a8971dad2da7193c73a1a3d2bdc3085d4
Author: Karl Williamson <khw@cpan.org>
Date:   Tue Sep 10 12:37:28 2019 -0600

    Some SvREFCNT_foo are no longer macros
    
    but are inline functions.  They should be listed in embed.fnc.

commit 73f0a2ebf04911b86968dd3aef90572662bc36ca
Author: Karl Williamson <khw@cpan.org>
Date:   Tue Sep 10 11:51:40 2019 -0600

    Strip leading underscore _variant_byte_number()
    
    Names with leading underscores are reserved for the C implementers.

commit 9a9a6c9859e31a91d4dd61190df208c24f5cbdc4
Author: Karl Williamson <khw@cpan.org>
Date:   Tue Sep 10 11:12:59 2019 -0600

    Change name of _utf8_to_uvchr_buf()
    
    A function name with a leading underscore is not legal in C.  Instead
    add a suffix to differentiate this name from an otherwise identical one.

commit 1376b35c0aca7ec6b61283ddea3aa1c58bcb88de
Author: Karl Williamson <khw@cpan.org>
Date:   Tue Sep 10 10:59:04 2019 -0600

    Strip leading underscore from is_utf8_char_helper()
    
    Leading underscored name are reserved for the C implementers

commit c9182d9cfe39bfb5131aaf232745d5856cbf79eb
Author: Karl Williamson <khw@cpan.org>
Date:   Wed Sep 11 15:20:45 2019 -0600

    inline.h: Change fcn name prefix from S_ to Perl_
    
    This is being done only for those functions that don't have a guard
    preventing them from being seen outside of the Perl core.
    
    Talking to Tony Cook, we agreed that this was a good idea for two
    reasons:
    
    1) The 'Perl_' prefix does not pollute XS caller's name space.  The 'S_'
       one could be argued that it doesn't much either, but it does more so
       than 'Perl_', and the next reason is the clincher:
    2) It allows us to change our minds about whether a function should be
       static inline or not, without affecting callers who use the Perl_
       form, which they would be accustomed to anyway if they're using the
       full name form.

commit 2015d234640f7832c28ec6051e8a8f3fc751c7b5
Author: Karl Williamson <khw@cpan.org>
Date:   Mon Sep 9 11:53:55 2019 -0600

    regen/embed.pl: Generally generate an ARGS_ASSERT
    
    Prior to this commit, if you changed a pointer argument to allow it
    being a NULL, you had to go in and also remove the function's
    PERL_ARGS_ASSERT macro call.  Now, such macros are generally defined
    even if they are empty, so you can add such a call to any function, and
    it will always compile.  If there is no assertion needed, the macro
    expands to nothing.
    
    Thus now, the use of these macros is optional when no assert is needed;
    but still required by the porting test args_assert.t when an assert is
    needed.
    
    The generation of such a macro (when its use is optional) can be
    suppressed for individual entries by the new G flag in embed.fnc, also
    added by this commit.

commit edfae0c7aede11b7c295c6a40882406849675792
Author: Karl Williamson <khw@cpan.org>
Date:   Mon Sep 9 11:43:18 2019 -0600

    regen/embed.pl: Wrap #if..#endif differently
    
    By surrounding the interior stuff with these in one statement, it makes
    it easier to change that interior stuff without having dangling
    statements.
    
    This makes no difference in the current generated output

commit 2378c9f3cbe3ce31382afe16c8b9a150ac6da7ce
Author: Karl Williamson <khw@cpan.org>
Date:   Sat Aug 31 20:58:57 2019 -0600

    embed.fnc: Mark atof2, atof3 for internal use only
    
    Now that we have Strtod, my_strtod, those should be used instead.

commit f85ae7874530f217898001f620c7cd4d33291f8d
Author: Karl Williamson <khw@cpan.org>
Date:   Sun Jul 21 14:02:31 2019 -0600

    sv.h: SVt_INVLIST is core-only

commit 0923255565af07415b71456cecf303fc48043a95
Author: Karl Williamson <khw@cpan.org>
Date:   Fri Aug 9 11:41:07 2019 -0600

    embed.fnc: Change some 'x' marked fcns to 'C'
    
    The previous commit added the C flag, which is better to use in many
    instances than x.  This commit changes the x entries in embed.fnc that
    I'm pretty sure would be better off being C, and removes some 'x'
    entries for internal only functions

commit ff5af78dc3432f87303a4d443373cd4230a19c94
Author: Karl Williamson <khw@cpan.org>
Date:   Sun Jul 21 13:20:55 2019 -0600

    Add 'C' flag to embed.fnc, for "core-only" fcns
    
    Previously the x flag was (mis-)used for this purpose.  Some functions
    that are accessible by XS writers shouldn't be used by them, such as
    helper functions that an inline public function calls.  This new flag
    alows that to be specified, without having to mark the function as
    experimental, which could be misleading to later core maintainers

commit dcd299b49cf3c7bd7b362706a5696b4eac4fadb7
Author: Karl Williamson <khw@cpan.org>
Date:   Sat Aug 31 14:30:29 2019 -0600

    embed.fnc: Clarify comments, and note 'u' flag exceptions
    
    The next release of Devel::PPPort will know how to handle all these
    unorthodox functions, so no need to declare them as such, and in fact
    they shouldn't be declared so.

-----------------------------------------------------------------------

Summary of changes:
 autodoc.pl              |   6 +-
 cv.h                    |   6 +-
 embed.fnc               | 621 ++++++++++++++++++++++++++----------------
 embed.h                 |  84 +++---
 inline.h                | 159 ++++++-----
 mathoms.c               |   4 +-
 op.c                    |   2 +-
 perl.h                  |  16 +-
 pp.h                    |   4 +-
 proto.h                 | 708 ++++++++++++++++++++++++++++++++++++++++++++----
 regen/embed.pl          |  40 ++-
 regen/embed_lib.pl      |   3 +-
 regexec.c               |   6 +-
 regexp.h                |   2 +-
 sv.h                    |  30 +-
 t/porting/args_assert.t |   4 +-
 utf8.c                  |  40 +--
 utf8.h                  |   8 +-
 18 files changed, 1278 insertions(+), 465 deletions(-)

diff --git a/autodoc.pl b/autodoc.pl
index 6c54b2faca..b8d46b312e 100644
--- a/autodoc.pl
+++ b/autodoc.pl
@@ -251,7 +251,7 @@ removed without notice.\n\n$docs" if $flags =~ /x/;
                 }
             }
             my $args = '';
-            if ($p && $flags !~ /T/) {
+            if ($flags !~ /T/ && ($p || ($flags =~ /m/ && $name =~ /^Perl_/))) {
                 $args = @args ? "pTHX_ " : "pTHX";
                 if ($long_args) { print $fh $args; $args = '' }
             }
@@ -397,8 +397,8 @@ foreach (sort keys %missing) {
 # walk table providing an array of components in each line to
 # subroutine, printing the result
 
-# List of funcs in the public API that aren't also marked as experimental nor
-# deprecated.
+# List of funcs in the public API that aren't also marked as core-only,
+# experimental nor deprecated.
 my @missing_api = grep $funcflags{$_}{flags} =~ /A/
                     && $funcflags{$_}{flags} !~ /[xD]/
                     && !$docs{api}{$_}, keys %funcflags;
diff --git a/cv.h b/cv.h
index 35751eb4dd..9a169e865c 100644
--- a/cv.h
+++ b/cv.h
@@ -49,7 +49,7 @@ See L<perlguts/Autoloading with XSUBs>.
 #define CvROOT(sv)	((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_root_u.xcv_root
 #define CvXSUB(sv)	((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_root_u.xcv_xsub
 #define CvXSUBANY(sv)	((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_start_u.xcv_xsubany
-#define CvGV(sv)	S_CvGV(aTHX_ (CV *)(sv))
+#define CvGV(sv)	Perl_CvGV(aTHX_ (CV *)(sv))
 #define CvGV_set(cv,gv)	Perl_cvgv_set(aTHX_ cv, gv)
 #define CvHASGV(cv)	cBOOL(SvANY(cv)->xcv_gv_u.xcv_gv)
 #define CvFILE(sv)	((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_file
@@ -61,9 +61,9 @@ See L<perlguts/Autoloading with XSUBs>.
     (CvFILE(sv) = CopFILE(cop), CvDYNFILE_off(sv))
 #endif
 #define CvFILEGV(sv)	(gv_fetchfile(CvFILE(sv)))
-#define CvDEPTH(sv)	(*S_CvDEPTHp((const CV *)sv))
+#define CvDEPTH(sv)	(*Perl_CvDEPTH((const CV *)sv))
 /* For use when you only have a XPVCV*, not a real CV*.
-   Must be assert protected as in S_CvDEPTHp before use. */
+   Must be assert protected as in Perl_CvDEPTH before use. */
 #define CvDEPTHunsafe(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_depth
 
 /* these CvPADLIST/CvRESERVED asserts can be reverted one day, once stabilized */
diff --git a/embed.fnc b/embed.fnc
index 2bf9ed4ea8..a3e5fb2596 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -5,36 +5,106 @@
 : This file is known to be processed by regen/embed.pl, autodoc.pl,
 : makedef.pl, Devel::PPPort, and porting/diag.t.
 :
+: This file contains entries for various functions and macros defined by perl.
+: Each entry includes the name, parameters, and various attributes about it.
+: In most functions listed here, the name is a short name, and the function's
+: real name is the short one, prefixed by either 'Perl_' (for publicly visible
+: functions) or 'S_' (for internal-to-a-file static ones).  In many instances a
+: macro is defined that is the name in this file, and which expands to call the
+: real (full) name, with any appropriate thread context paramaters, thus hiding
+: that detail from the typical code.
+:
+: Most macros listed here are the complete full name.
+:
 : All non-static functions defined by perl need to be listed in this file.
-: embed.pl uses the entries here to construct proto.h to declare to the
-: compiler the function interfaces, and embed.h to create macros that present a
-: uniform interface to C code for the functions, regardless of, say, whether
-: the perl is threaded or not.
+: embed.pl uses the entries here to construct:
+:   1) proto.h to declare to the compiler the function interfaces; and
+:   2) embed.h to create short name macros
 :
-: Static functions need not appear here, but there is benefit to declaring them
-: here, as it generally handles the thread context parameter invisibly, as well
-: as making sure a PERL_ARGS_ASSERT_foo macro is defined, which can save you
-: debugging time.
+: Static functions internal to a file need not appear here, but there is
+: benefit to declaring them here, as it generally handles the thread context
+: parameter invisibly, as well as making sure a PERL_ARGS_ASSERT_foo macro is
+: defined, which can save you debugging time.
 :
 : Lines in this file are of the form:
-:    flags|return_type|function_name|arg1|arg2|...|argN
+:    flags|return_type|name|arg1|arg2|...|argN
 :
 : 'flags' is a string of single letters.  Most of the flags are meaningful only
 : to embed.pl; some only to autodoc.pl, and others only to makedef.pl.  The
-: comments here don't include how Devel::PPPort or diag.t use them:
+: comments here mostly don't include how Devel::PPPort or diag.t use them:
 :
 : A function taking no parameters will have no 'arg' elements.
 : A line may be continued onto the next by ending it with a backslash.
 : Leading and trailing whitespace will be ignored in each component.
 :
+: Most entries here have a macro created with the entry name.  This presents
+: name space collision potentials which haven't been well thought out, but are
+: now documented here.  In practice this has rarely been an issue.  At least,
+: with a macro, the XS author can #undef it, unlike a function.
+:
 : The default without flags is to declare a function for internal perl-core use
-: only.  On some platforms, such as Linux and Darwin, all non-static functions
+: only.  The short name is visible only when the PERL_CORE symbol is defined.
+: On some platforms, such as Linux and Darwin, all non-static functions
 : are currently externally visible.  Because of this, and also for programs
 : that embed perl, most non-static functions should have the 'p' flag to avoid
 : namespace clashes.
 :
-: Most entries here have a macro created to wrap them, and whose name doesn't
-: include the 'Perl_', or other prefix.
+: There are several advantages to using a macro instead of the full Perl_foo or
+: S_foo form: it hides the need to know if the called function requires a
+: thread context parameter or not, and the code using it is more readable
+: because of fewer parameters being visible.  And if there is some bug in it
+: that gets fixed in a later release, ppport.h can be changed to automatically
+: backport the fixed version to modules.  The only disadvantage khw can think
+: of is the namespace pollution one.
+:
+: Since we don't require a C compiler to support variadic macros (C99), the
+: macros can't be generated in such situations.
+:
+: WARNING: Any macro created in a header file is visible to XS code, unless
+: care is taken to wrap it within something like #ifdef PERL_CORE..#endif.
+: This has had to be done with things like MAX and MIN, but nearly everything
+: else has been created without regard to the namespace pollution problem.
+:
+: Here's what else you need to know about using this file with regards to name
+: space pollution:
+:
+: The A flag is used to make a function and its short name visible everywhere
+:	     on all platforms.  This should be used to make it part of Perl's
+:	     API contract with XS developers.  The documentation for these is
+:	     usually placed in perlapi.  If no documentation exists, that fact
+:	     is also noted in perlapi.
+:
+: The C flag is used instead for functions and their short names that need to
+:            be accessible everywhere, typically because they are called from a
+:            publicly available macro or inline function, but they are not for
+:            public use by themselves.  The documentation for these is placed
+:            in perlintern.  If no documentation exists, that fact is also
+:            noted in perlintern.
+:
+:            These really need the 'p' flag to avoid name space collisions.
+:
+:	     Some of these have been constructed so that the wrapper macro
+:	     names begin with an underscore to lessen the chances of a name
+:	     collision.  However, this is contrary to the C standard, and those
+:	     should be changed.
+:
+: The E flag is used instead for a function and its short name that is supposed
+:            to be used only in the core, and in extensions compiled with the
+:            PERL_EXT symbol defined.  Again, on some platforms, the function
+:            will be visible everywhere, so the 'p' flag is gnerally needed.
+:            Also note that an XS writer can always cheat and pretend to be an
+:            extension by #defining PERL_EXT.
+:
+: The X flag is similar to the C flag in that the function (whose entry better
+:	     have the 'p' flag) is accessible everywhere on all platforms.
+:	     However the short name macro that normally gets generated is
+:	     suppressed outside the core.  (Except it is also visible in
+:	     PERL_EXT extensions if the E flag is also specified.)  This flag
+:	     is used for functions that are called from a public macro, the
+:	     name of which isn't derived from the function name.  You'll have
+:	     to write the macro yourself, and from within it, refer to the
+:	     function in its full 'Perl_' form with any necessary thread
+:	     context parameter.
 :
 : Scattered around the perl source are lines of the form:
 :
@@ -44,19 +114,20 @@
 : autodoc.pl where the documentation is for a function listed in this file.  It
 : uses the prototype from here and the pod from there in generating the
 : documentation in perlapi or perlintern.  The entries in this file that have
-: corresponding '=for apidoc' entries should have the flag 'd' set in this
+: corresponding '=for apidoc' entries should have the 'd' flag set in this
 : file.
 :
 : There are also lines of this form scattered around:
 :
 :   =for apidoc flags|return_type|name|arg1|arg2|...|argN
 :
-: and with the same meanings as the lines in this file.  The 'name' in any such
-: line must not be the same as any in this file (i.e., no redundant
-: definitions), and one of the flags must be 'm', indicating this is a macro.
-: The lines following these are pod for the respective macro.  Since these are
-: macros, the arguments need not be legal C parameters.  To indicate this to
-: downstream software that inspects these lines, there are a few conventions:
+: and with the same meanings as the lines in this file.  These are for
+: documenting macros.  The 'name' in any such line must not be the same as any
+: in this file (i.e., no redundant definitions), and one of the flags must be
+: 'm', indicating it is a macro.  The lines following these are pod for the
+: respective macro.  Since these are macros, the arguments need not be legal C
+: parameters.  To indicate this to downstream software that inspects these
+: lines, there are a few conventions:
 :  type    should be the entire argument name if it names a type
 :  cast    should be the entire argument name if it is a cast
 :  SP      should be the entire argument name if it is the stack pointer SP
@@ -70,32 +141,39 @@
 : indicate that it has to be a string, instead of a const char * const, like this
 :   =for apidoc Ama|SV*|newSVpvs|"string"
 :
+: If any argument or return value is not one of the above, and isn't a legal C
+: language one, the 'u' flag should be specified.
+:
 : Again, autodoc uses these lines to construct perlapi. 'return_type' in these
 : lines can be empty, unlike in this file.
 :
 : Devel::PPPort also looks at both this file and the '=for apidoc' lines.  In
 : part it is to construct lists of functions that are or are not backported.
 :
-: makedef.pl uses this file for constructing the export list
+: makedef.pl uses this file for constructing the export list which lists the
+: symbols that should be available on all platforms.
 :
 : porting/diag.t checks some things for consistency based on this file.
 :
-:   A  Accessible fully everywhere (usually part of the public API):
+: The remainder of these introductory comments detail all the possible flags:
 :
-:         add entry to the list of exported symbols (unless e or m);
-:         any doc entry goes in perlapi.pod rather than perlintern.pod.  If
-:            no documentation is furnished, x controls what happens: If x
-:            isn't specified, autodoc.pl lists this in perlapi as existing and
-:	     being undocumented; otherwise it simply isn't listed.
-:         makes '#define foo Perl_foo' scope not just for PERL_CORE/PERL_EXT
+:   A  Both long and short names are accessible fully everywhere (usually part
+:      of the public API).  If the function is not part of the public API,
+:      instead use C, E, or X.
 :
-:      If the function is only exported for use in a public macro, see X.
+:         add entry to the list of symbols available on all platforms
+:	    unless e or m are also specified;
+:         any doc entry goes in perlapi.pod rather than perlintern.pod.  If
+:	    there isn't a doc entry, autodoc.pl lists this in perlapi as
+:	    existing and being undocumented; unless x is also specified, in
+:	    which case it simply isn't listed.
+:         makes the short name defined for everywhere, not just for
+:	    PERL_CORE/PERL_EXT
 :
-:   a  Allocates memory a la malloc/calloc.  Also implies "R".
-:      This flag should only be on a function which returns 'empty' memory
-:      which has no other pointers to it, and which does not contain
-:      any pointers to other things. So for example realloc() can't be
-:      'a'.
+:   a  Allocates memory a la malloc/calloc.  Also implies "R".  This flag
+:      should only be on a function which returns 'empty' memory which has no
+:      other pointers to it, and which does not contain any pointers to other
+:      things. So for example realloc() can't be 'a'.
 :
 :         proto.h: add __attribute__malloc__
 :
@@ -106,10 +184,15 @@
 :      -Accflags='-DNO_MATHOMS' parameter to not even compile them.
 :
 :      Sometimes the function has been subsumed by a more general one (say, by
-:      adding a flags parameter), and a macro exists with the original API, and
-:      it calls the new function, bypassing this one, and the original 'Perl_'
-:      form is being deprecated.  In this case also specify the 'M' flag.  The
-:      'b' functions are normally moved to mathoms.c, but if circumstances
+:      adding a flags parameter), and a macro exists with the original short
+:      name API, and it calls the new function, bypassing this one, and the
+:      original 'Perl_' form is being deprecated.  In this case also specify
+:      the 'M' flag.
+:
+:      Without the M flag, these functions should be deprecated, and it is an
+:      error to not also specify the 'D' flag.
+:
+:      The 'b' functions are normally moved to mathoms.c, but if circumstances
 :      dictate otherwise, they can be anywhere, provided the whole function is
 :      wrapped with
 :	    #ifndef NO_MATHOMS
@@ -119,15 +202,26 @@
 :      Note that this flag no longer automatically adds a 'Perl_' prefix to the
 :      name.  Additionally specify 'p' to do that.
 :
-:      For functions, like wrappers, whose macro shortcut doesn't call the
-:      function, but which, for whatever reason, aren't considered legacy-only,
-:      use the 'o' flag, and maybe the 'M'
-:
 :      This flag effectively causes nothing to happen if the perl interpreter
-:      is compiled with -DNO_MATHOMS; otherwise these happen:
-:         add entry to the list of exported symbols;
+:      is compiled with -DNO_MATHOMS (which causes any functions with this flag
+:      to not be compiled); otherwise these happen:
+:         add entry to the list of symbols available on all platforms;
 :         create PERL_ARGS_ASSERT_foo;
-:	  add embed.h entry (unless overridden by the 'o' flag)
+:	  add embed.h entry (unless overridden by the 'M' or 'o' flags)
+:
+:   C  Intended for core use only.  This indicates to XS writers that they
+:      shouldn't be using this function.  Devel::PPPort informs them of this,
+:      for example.  Some functions have to be accessible everywhere even if
+:      they are not intended for public use.  An example is helper functions
+:      that are called from inline ones that are publicly available.
+:
+:         add entry to the list of symbols available on all platforms
+:	    unless e or m are also specified;
+:         any doc entry goes in perlintern.pod rather than perlapi.pod.  If
+:	    there isn't a doc entry, autodoc.pl lists this in perlintern as
+:	    existing and being undocumented
+:         makes the short name defined for everywhere, not just for
+:	    PERL_CORE/PERL_EXT
 :
 :   D  Function is deprecated:
 :
@@ -150,45 +244,73 @@
 :
 :   e  Not exported
 :
-:         suppress entry in the list of exported symbols
+:         suppress entry in the list of symbols available on all platforms
 :
 :   f  Function takes a format string. If the function name =~ qr/strftime/
-:      then its assumed to take a strftime-style format string as 1st arg;
-:      otherwise it's assumed to be a printf style format string, varargs
+:      then it is assumed to take a strftime-style format string as the 1st
+:      arg; otherwise it's assumed to be a printf style format string, varargs
 :      (hence any entry that would otherwise go in embed.h is suppressed):
 :
 :         proto.h: add __attribute__format__ (or ...null_ok__)
 :
-:   h  Hide any documentation.  This is used typically when the documentation
-:      is atypical of the rest of perlapi and perlintern.  In other words the
-:      item is documented, but just not the standard way.  One reason would be
-:      if there are a bunch of macros which follow a common paradigm in their
-:      naming, so rather than having an entry for each slight variation, there
-:      is an overarchinge one.  It is also used when the documentation is in
-:      another pod, such as perlguts or warnings.h.  This flag is useful for
-:      downstream programs, such as Devel::PPPort.
-:
-:   i  Static inline: function in source code has a S_ prefix:
-:
-:         proto.h: function is declared as S_foo rather than foo unless the 'p'
-:		   flag is also given in which case 'Perl_foo' is used,
-:                PERL_STATIC_INLINE is added to the declaration
-:         embed.h: "#define foo S_foo" or Perl_foo entries added
-:
-:   M  There is an extra macro that bypasses this function
-:
-:      (requires 'p', and implies 'o')  The function exists so that callers who
-:      used the 'Perl_' form can continue to do so, but there is a macro
-:      available without the 'Perl_' prefix that bypasses the function call,
-:      such as when the function has been reduced to a wrapper around another
-:      one.
-:
-:   m  Implemented as a macro:
-:
-:         suppress proto.h entry unless 'b' also specified (actually, not
-:		suppressed, but commented out)
-:         suppress entry in the list of exported symbols
-:         suppress embed.h entry
+:   G  Suppress empty PERL_ARGS_ASSERT_foo macro.  Normally such a macro is
+:      generated for all entries for functions 'foo' in this file.  If there is
+:      a pointer argument to 'foo', it needs to be declared in this file as
+:      either NN or NULLOK, and the function definition must call its
+:      corresponding PERL_ARGS_ASSERT_foo macro (a porting test ensures this)
+:      which asserts at runtime (under DEBUGGING builds) that NN arguments are
+:      not NULL.  If there aren't NN arguments, use of this macro is optional.
+:      Rarely, a function will define its own PERL_ARGS_ASSERT_foo macro, and
+:      in those cases, adding this flag to its entry in this file will suppress
+:      the normal one.  It is not possible to suppress the generated macro if
+:      it isn't optional, that is, if there is at least one NN argument.
+:
+:         proto.h: PERL_ARGS_ASSERT macro is not defined unless the function
+:		   has NN arguments
+:
+:   h  Hide any documentation.  This is used when the documentation is atypical
+:      of the rest of perlapi and perlintern.  In other words the item is
+:      documented, but just not the standard way.  One reason would be if there
+:      are a bunch of macros which follow a common paradigm in their naming, so
+:      rather than having an entry for each slight variation, there is an
+:      overarchinge one.  It is also used when the documentation is in another
+:      pod, such as perlguts or warnings.h.  This flag is useful for downstream
+:      programs, such as Devel::PPPort.
+:
+:   i  inline static.  This is used for functions that the compiler is being
+:      requested to inline.  If the function is in a header file its
+:      definition will be visible (unless guarded by #if..#endif) to all
+:      XS code.  (A typical guard will be that it is being included in a
+:      particular C file(s) or in the perl core.)  Therefore, all
+:      non-guarded function should also have the 'p' flag specified to avoid
+:      polluting the XS code name space.  Otherwise an error is generated if
+:      the 'S' flag is not also specified.
+:
+:         proto.h: function is declared as PERL_STATIC_INLINE
+:
+:   m  Implemented as a macro; there is no function associated with this name,
+:      and hence no long Perl_ or S_ name.  However, if the macro name itself
+:      begins with 'Perl_', autodoc.pl will show a thread context parameter
+:      unless the 'T' flag is specified.
+:
+:         suppress proto.h entry (actually, not suppressed, but commented out)
+:         suppress entry in the list of exported symbols available on all platforms
+:         suppress embed.h entry, as the implementation should furnish the macro
+:
+:   M  The implementation is furnishing its own macro instead of relying on the
+:      default short name macro that simply expands to call the real name
+:      function.  This is used if the parameters need to be cast from what the
+:      caller has, or if there is a macro that bypasses this function (whose
+:      long name is being retained for backward compatibility for those who
+:      call it with that name).  An example is when a new function is created
+:      with an extra parameter and a wrapper macro is added that has the old
+:      API, but calls the new one with the exta parameter set to a default.
+:
+:      This flag requires the 'p' flag to be specified, as there would be no
+:      need to do this if the function weren't publicly accessible before.
+:
+:      The entry is processed based on the other flags, but the:
+:         embed.h entry is suppressed
 :
 :   N  The name in the entry isn't strictly a name
 :
@@ -208,19 +330,17 @@
 :      autodoc.pl adds a note that the perl_ form of this function is
 :      deprecated.
 :
-:
 :   o  Has no Perl_foo or S_foo compatibility macro:
 :
-:	This can be used when you define a macro with this entry's name that
-:	doesn't call the function specified by this entry.  This is typically
-:	done for a function that effectively just wraps another one, and where
-:	the macro form calls the underlying function directly.  For these, also
-:	specify the 'M' flag.  Legacy-only functions should instead use 'b'.
+:	This is used for whatever reason to force the function to be called
+:	with the long name.  Perhaps there is a varargs issue.  Use the 'M'
+:	flag instead for wrapper macros, and legacy-only functions should
+:	also use 'b'.
 :
 :         embed.h: suppress "#define foo Perl_foo"
 :
 :      autodoc.pl adds a note that this function must be explicitly called as
-:      Perl_$name with an aTHX_ parameter, unless the 'M' flag is specified.
+:      Perl_$name with an aTHX_ parameter.
 :
 :   P  Pure function:
 :
@@ -296,7 +416,8 @@
 :
 :   X  Explicitly exported:
 :
-:         add entry to the list of exported symbols, unless e or m
+:         add entry to the list of symbols available on all platforms, unless e
+:	    or m
 :
 :      This is often used for private functions that are used by public
 :      macros.  In those cases the macros must use the long form of the
@@ -305,7 +426,7 @@
 :   x  Experimental, may change:
 :
 :         any doc entry is marked that it may change.  Also used to suppress
-:	  making a doc entry if it would just be a placeholder.
+:	  making a perlapi doc entry if it would just be a placeholder.
 :
 : In this file, pointer parameters that must not be passed NULLs should be
 : prefixed with NN.
@@ -403,7 +524,7 @@ Apd	|void	|av_push	|NN AV *av|NN SV *val
 EXp	|void	|av_reify	|NN AV *av
 ApdR	|SV*	|av_shift	|NN AV *av
 Apd	|SV**	|av_store	|NN AV *av|SSize_t key|NULLOK SV *val
-AidR	|SSize_t|av_top_index	|NN AV *av
+AidRp	|SSize_t|av_top_index	|NN AV *av
 AmdR	|SSize_t|av_tindex	|NN AV *av
 Apd	|void	|av_undef	|NN AV *av
 Apdoex	|SV**	|av_create_and_unshift_one|NN AV **const avp|NN SV *const val
@@ -493,6 +614,8 @@ Apd	|void	|cv_undef	|NN CV* cv
 p	|void	|cv_undef_flags	|NN CV* cv|U32 flags
 pd	|void	|cv_forget_slab	|NULLOK CV *cv
 Ap	|void	|cx_dump	|NN PERL_CONTEXT* cx
+AiMp	|GV *	|CvGV		|NN CV *sv
+AiMTp	|I32 *	|CvDEPTH	|NN const CV * const sv
 Aphd	|SV*	|filter_add	|NULLOK filter_t funcp|NULLOK SV* datasv
 Ap	|void	|filter_del	|NN filter_t funcp
 ApRhd	|I32	|filter_read	|int idx|NN SV *buf_sv|int maxlen
@@ -538,7 +661,7 @@ Ap	|bool	|do_close	|NULLOK GV* gv|bool not_implicit
 p	|bool	|do_eof		|NN GV* gv
 
 #ifdef PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION
-pm	|bool|do_exec	|NN const char* cmd
+pM	|bool|do_exec	|NN const char* cmd
 #else
 p	|bool|do_exec	|NN const char* cmd
 #endif
@@ -759,7 +882,7 @@ Apd	|HV*	|gv_stashpv	|NN const char* name|I32 flags
 Apd	|HV*	|gv_stashpvn	|NN const char* name|U32 namelen|I32 flags
 #if defined(PERL_IN_GV_C)
 i	|HV*	|gv_stashpvn_internal	|NN const char* name|U32 namelen|I32 flags
-i	|HV*	|gv_stashsvpvn_cached	|NULLOK SV *namesv|NULLOK const char* name|U32 namelen|I32 flags
+iG	|HV*	|gv_stashsvpvn_cached	|NULLOK SV *namesv|NULLOK const char* name|U32 namelen|I32 flags
 i	|GV*	|gv_fetchmeth_internal	|NULLOK HV* stash|NULLOK SV* meth|NULLOK const char* name \
 					|STRLEN len|I32 level|U32 flags
 #endif
@@ -835,7 +958,7 @@ Am	|I32	|ibcmp_utf8	|NN const char *s1|NULLOK char **pe1|UV l1 \
 Amd	|I32	|foldEQ_utf8	|NN const char *s1|NULLOK char **pe1|UV l1 \
 				|bool u1|NN const char *s2|NULLOK char **pe2 \
 				|UV l2|bool u2
-Axp	|I32	|foldEQ_utf8_flags |NN const char *s1|NULLOK char **pe1|UV l1 \
+Cp	|I32	|foldEQ_utf8_flags |NN const char *s1|NULLOK char **pe1|UV l1 \
 				|bool u1|NN const char *s2|NULLOK char **pe2 \
 				|UV l2|bool u2|U32 flags
 AiTp	|I32	|foldEQ_latin1	|NN const char* a|NN const char* b|I32 len
@@ -860,29 +983,29 @@ pR	|OP*	|invert		|NULLOK OP* cmd
 ApR	|I32	|is_lvalue_sub
 : Used in cop.h
 XopR	|I32	|was_lvalue_sub
-ApxRTP	|STRLEN	|_is_utf8_char_helper|NN const U8 * const s|NN const U8 * e|const U32 flags
-AbDxpR	|U32	|to_uni_upper_lc|U32 c
-AbDxpR	|U32	|to_uni_title_lc|U32 c
-AbDxpR	|U32	|to_uni_lower_lc|U32 c
-AbDxpR	|bool	|is_uni_alnum	|UV c
-AbDxpR	|bool	|is_uni_alnumc	|UV c
-AbDxpR	|bool	|is_uni_idfirst	|UV c
-AbDxpR	|bool	|is_uni_alpha	|UV c
-AbDxpPR	|bool	|is_uni_ascii	|UV c
-AbDxpPR	|bool	|is_uni_blank	|UV c
-AbDxpPR	|bool	|is_uni_space	|UV c
-AbDxpPR	|bool	|is_uni_cntrl	|UV c
-AbDxpR	|bool	|is_uni_graph	|UV c
-AbDxpR	|bool	|is_uni_digit	|UV c
-AbDxpR	|bool	|is_uni_upper	|UV c
-AbDxpR	|bool	|is_uni_lower	|UV c
-AbDxpR	|bool	|is_uni_print	|UV c
-AbDxpR	|bool	|is_uni_punct	|UV c
-AbDxpPR	|bool	|is_uni_xdigit	|UV c
-Axp	|UV	|to_uni_upper	|UV c|NN U8 *p|NN STRLEN *lenp
-Axp	|UV	|to_uni_title	|UV c|NN U8 *p|NN STRLEN *lenp
-AbDxpR	|bool	|isIDFIRST_lazy	|NN const char* p
-AbDxpR	|bool	|isALNUM_lazy	|NN const char* p
+CpRTP	|STRLEN	|is_utf8_char_helper|NN const U8 * const s|NN const U8 * e|const U32 flags
+CbDpR	|U32	|to_uni_upper_lc|U32 c
+CbDpR	|U32	|to_uni_title_lc|U32 c
+CbDpR	|U32	|to_uni_lower_lc|U32 c
+CbDpR	|bool	|is_uni_alnum	|UV c
+CbDpR	|bool	|is_uni_alnumc	|UV c
+CbDpR	|bool	|is_uni_idfirst	|UV c
+CbDpR	|bool	|is_uni_alpha	|UV c
+CbDpPR	|bool	|is_uni_ascii	|UV c
+CbDpPR	|bool	|is_uni_blank	|UV c
+CbDpPR	|bool	|is_uni_space	|UV c
+CbDpPR	|bool	|is_uni_cntrl	|UV c
+CbDpR	|bool	|is_uni_graph	|UV c
+CbDpR	|bool	|is_uni_digit	|UV c
+CbDpR	|bool	|is_uni_upper	|UV c
+CbDpR	|bool	|is_uni_lower	|UV c
+CbDpR	|bool	|is_uni_print	|UV c
+CbDpR	|bool	|is_uni_punct	|UV c
+CbDpPR	|bool	|is_uni_xdigit	|UV c
+Cp	|UV	|to_uni_upper	|UV c|NN U8 *p|NN STRLEN *lenp
+Cp	|UV	|to_uni_title	|UV c|NN U8 *p|NN STRLEN *lenp
+CbDpR	|bool	|isIDFIRST_lazy	|NN const char* p
+CbDpR	|bool	|isALNUM_lazy	|NN const char* p
 p	|void	|init_uniprops
 #ifdef PERL_IN_UTF8_C
 STR	|U8	|to_lower_latin1|const U8 c|NULLOK U8 *p|NULLOK STRLEN *lenp  \
@@ -899,33 +1022,33 @@ EXTp	|UV        |_to_fold_latin1|const U8 c|NN U8 *p|NN STRLEN *lenp|const unsig
 #if defined(PERL_IN_UTF8_C) || defined(PERL_IN_PP_C)
 p	|UV	|_to_upper_title_latin1|const U8 c|NN U8 *p|NN STRLEN *lenp|const char S_or_s
 #endif
-Axp	|UV	|to_uni_lower	|UV c|NN U8 *p|NN STRLEN *lenp
-Axmp	|UV	|to_uni_fold	|UV c|NN U8 *p|NN STRLEN *lenp
-Axp	|UV	|_to_uni_fold_flags|UV c|NN U8 *p|NN STRLEN *lenp|U8 flags
-AbDxpR	|bool	|is_uni_alnum_lc|UV c
-AbDxpR	|bool	|is_uni_alnumc_lc|UV c
-AbDxpR	|bool	|is_uni_idfirst_lc|UV c
-AxpR	|bool	|_is_uni_perl_idcont|UV c
-AxpR	|bool	|_is_uni_perl_idstart|UV c
-AbDxpR	|bool	|is_uni_alpha_lc|UV c
-AbDxpPR	|bool	|is_uni_ascii_lc|UV c
-AbDxpPR	|bool	|is_uni_space_lc|UV c
-AbDxpPR	|bool	|is_uni_blank_lc|UV c
-AbDxpPR	|bool	|is_uni_cntrl_lc|UV c
-AbDxpR	|bool	|is_uni_graph_lc|UV c
-AbDxpR	|bool	|is_uni_digit_lc|UV c
-AbDxpR	|bool	|is_uni_upper_lc|UV c
-AbDxpR	|bool	|is_uni_lower_lc|UV c
-AbDxpR	|bool	|is_uni_print_lc|UV c
-AbDxpR	|bool	|is_uni_punct_lc|UV c
-AbDxpPR	|bool	|is_uni_xdigit_lc|UV c
+Cp	|UV	|to_uni_lower	|UV c|NN U8 *p|NN STRLEN *lenp
+Cm	|UV	|to_uni_fold	|UV c|NN U8 *p|NN STRLEN *lenp
+Cp	|UV	|_to_uni_fold_flags|UV c|NN U8 *p|NN STRLEN *lenp|U8 flags
+CbDpR	|bool	|is_uni_alnum_lc|UV c
+CbDpR	|bool	|is_uni_alnumc_lc|UV c
+CbDpR	|bool	|is_uni_idfirst_lc|UV c
+CpR	|bool	|_is_uni_perl_idcont|UV c
+CpR	|bool	|_is_uni_perl_idstart|UV c
+CbDpR	|bool	|is_uni_alpha_lc|UV c
+CbDpPR	|bool	|is_uni_ascii_lc|UV c
+CbDpPR	|bool	|is_uni_space_lc|UV c
+CbDpPR	|bool	|is_uni_blank_lc|UV c
+CbDpPR	|bool	|is_uni_cntrl_lc|UV c
+CbDpR	|bool	|is_uni_graph_lc|UV c
+CbDpR	|bool	|is_uni_digit_lc|UV c
+CbDpR	|bool	|is_uni_upper_lc|UV c
+CbDpR	|bool	|is_uni_lower_lc|UV c
+CbDpR	|bool	|is_uni_print_lc|UV c
+CbDpR	|bool	|is_uni_punct_lc|UV c
+CbDpPR	|bool	|is_uni_xdigit_lc|UV c
 ATdmoR	|bool	|is_utf8_invariant_string|NN const U8* const s		    \
 		|STRLEN len
-ATidR	|bool	|is_utf8_invariant_string_loc|NN const U8* const s	    \
+ATidRp	|bool	|is_utf8_invariant_string_loc|NN const U8* const s	    \
 		|STRLEN len						    \
 		|NULLOK const U8 ** ep
 #ifndef EBCDIC
-ATiR	|unsigned int|_variant_byte_number|PERL_UINTMAX_T word
+CTiRp	|unsigned int|variant_byte_number|PERL_UINTMAX_T word
 #endif
 #if defined(PERL_CORE) || defined(PERL_EXT)
 EiTRd	|Size_t	|variant_under_utf8_count|NN const U8* const s		    \
@@ -934,19 +1057,19 @@ EiTRd	|Size_t	|variant_under_utf8_count|NN const U8* const s		    \
 AmTdRP	|bool	|is_ascii_string|NN const U8* const s|STRLEN len
 AmTdRP	|bool	|is_invariant_string|NN const U8* const s|STRLEN len
 #if defined(PERL_CORE) || defined (PERL_EXT)
-EXTidR	|bool	|is_utf8_non_invariant_string|NN const U8* const s	    \
+EXTidRp	|bool	|is_utf8_non_invariant_string|NN const U8* const s	    \
 		|STRLEN len
 #endif
 AbTpdD	|STRLEN	|is_utf8_char	|NN const U8 *s
 AbMTpd	|STRLEN	|is_utf8_char_buf|NN const U8 *buf|NN const U8 *buf_end
-ATidR	|Size_t	|isUTF8_CHAR|NN const U8 * const s0			    \
+ATidRp	|Size_t	|isUTF8_CHAR|NN const U8 * const s0			    \
 			    |NN const U8 * const e
-ATidR	|Size_t	|isSTRICT_UTF8_CHAR |NN const U8 * const s0		    \
+ATidRp	|Size_t	|isSTRICT_UTF8_CHAR |NN const U8 * const s0		    \
 				    |NN const U8 * const e
-ATidR	|Size_t	|isC9_STRICT_UTF8_CHAR |NN const U8 * const s0		    \
+ATidRp	|Size_t	|isC9_STRICT_UTF8_CHAR |NN const U8 * const s0		    \
 				       |NN const U8 * const e
 ATmdR	|bool	|is_utf8_string	|NN const U8 *s|STRLEN len
-ATidR	|bool	|is_utf8_string_flags					    \
+ATidRp	|bool	|is_utf8_string_flags					    \
 		|NN const U8 *s|STRLEN len|const U32 flags
 ATmdR	|bool	|is_strict_utf8_string|NN const U8 *s|STRLEN len
 ATmdR	|bool	|is_c9strict_utf8_string|NN const U8 *s|STRLEN len
@@ -962,13 +1085,13 @@ ATdm	|bool	|is_c9strict_utf8_string_loc				    \
 ATipd	|bool	|is_utf8_string_loclen					    \
 		|NN const U8 *s|STRLEN len|NULLOK const U8 **ep		    \
 		|NULLOK STRLEN *el
-ATid	|bool	|is_utf8_string_loclen_flags				    \
+ATidp	|bool	|is_utf8_string_loclen_flags				    \
 		|NN const U8 *s|STRLEN len|NULLOK const U8 **ep		    \
 		|NULLOK STRLEN *el|const U32 flags
-ATid	|bool	|is_strict_utf8_string_loclen				    \
+ATidp	|bool	|is_strict_utf8_string_loclen				    \
 		|NN const U8 *s|STRLEN len|NULLOK const U8 **ep	    \
 		|NULLOK STRLEN *el
-ATid	|bool	|is_c9strict_utf8_string_loclen				    \
+ATidp	|bool	|is_c9strict_utf8_string_loclen				    \
 		|NN const U8 *s|STRLEN len|NULLOK const U8 **ep	    \
 		|NULLOK STRLEN *el
 AmTd	|bool	|is_utf8_fixed_width_buf_flags				    \
@@ -976,51 +1099,51 @@ AmTd	|bool	|is_utf8_fixed_width_buf_flags				    \
 AmTd	|bool	|is_utf8_fixed_width_buf_loc_flags			    \
 		|NN const U8 * const s|STRLEN len			    \
 		|NULLOK const U8 **ep|const U32 flags
-ATid	|bool	|is_utf8_fixed_width_buf_loclen_flags			    \
+ATidp	|bool	|is_utf8_fixed_width_buf_loclen_flags			    \
 		|NN const U8 * const s|STRLEN len			    \
 		|NULLOK const U8 **ep|NULLOK STRLEN *el|const U32 flags
 AmTdP	|bool	|is_utf8_valid_partial_char				    \
 		|NN const U8 * const s|NN const U8 * const e
-ATidR	|bool	|is_utf8_valid_partial_char_flags			    \
+ATidRp	|bool	|is_utf8_valid_partial_char_flags			    \
 		|NN const U8 * const s|NN const U8 * const e|const U32 flags
-AxpR	|bool	|_is_uni_FOO|const U8 classnum|const UV c
-AxpR	|bool	|_is_utf8_FOO|U8 classnum|NN const U8 * const p		    \
+CpR	|bool	|_is_uni_FOO|const U8 classnum|const UV c
+CpR	|bool	|_is_utf8_FOO|U8 classnum|NN const U8 * const p		    \
 		|NN const char * const name				    \
 		|NN const char * const alternative			    \
 		|const bool use_utf8|const bool use_locale		    \
 		|NN const char * const file|const unsigned line
-AxpR	|bool	|_is_utf8_FOO_with_len|const U8 classnum|NN const U8 *p	    \
+CpR	|bool	|_is_utf8_FOO_with_len|const U8 classnum|NN const U8 *p	    \
 		|NN const U8 * const e
-AbDxpR	|bool	|is_utf8_alnum	|NN const U8 *p
-AbDxpR	|bool	|is_utf8_alnumc	|NN const U8 *p
-AbDxpR	|bool	|is_utf8_idfirst|NN const U8 *p
-AbDxpR	|bool	|is_utf8_xidfirst|NN const U8 *p
-AxpR	|bool	|_is_utf8_idcont|NN const U8 *p
-AxpR	|bool	|_is_utf8_idstart|NN const U8 *p
-AxpR	|bool	|_is_utf8_xidcont|NN const U8 *p
-AxpR	|bool	|_is_utf8_xidstart|NN const U8 *p
-AxpR	|bool	|_is_utf8_perl_idcont_with_len|NN const U8 *p		    \
+CbDpR	|bool	|is_utf8_alnum	|NN const U8 *p
+CbDpR	|bool	|is_utf8_alnumc	|NN const U8 *p
+CbDpR	|bool	|is_utf8_idfirst|NN const U8 *p
+CbDpR	|bool	|is_utf8_xidfirst|NN const U8 *p
+CpR	|bool	|_is_utf8_idcont|NN const U8 *p
+CpR	|bool	|_is_utf8_idstart|NN const U8 *p
+CpR	|bool	|_is_utf8_xidcont|NN const U8 *p
+CpR	|bool	|_is_utf8_xidstart|NN const U8 *p
+CpR	|bool	|_is_utf8_perl_idcont_with_len|NN const U8 *p		    \
 		|NN const U8 * const e
-AxpR	|bool	|_is_utf8_perl_idstart_with_len|NN const U8 *p		    \
+CpR	|bool	|_is_utf8_perl_idstart_with_len|NN const U8 *p		    \
 		|NN const U8 * const e
-AbDxpR	|bool	|is_utf8_idcont	|NN const U8 *p
-AbDxpR	|bool	|is_utf8_xidcont	|NN const U8 *p
-AbDxpR	|bool	|is_utf8_alpha	|NN const U8 *p
-AbDxpR	|bool	|is_utf8_ascii	|NN const U8 *p
-AbDxpR	|bool	|is_utf8_blank	|NN const U8 *p
-AbDxpR	|bool	|is_utf8_space	|NN const U8 *p
-AbDxpR	|bool	|is_utf8_perl_space	|NN const U8 *p
-AbDxpR	|bool	|is_utf8_perl_word	|NN const U8 *p
-AbDxpR	|bool	|is_utf8_cntrl	|NN const U8 *p
-AbDxpR	|bool	|is_utf8_digit	|NN const U8 *p
-AbDxpR	|bool	|is_utf8_posix_digit	|NN const U8 *p
-AbDxpR	|bool	|is_utf8_graph	|NN const U8 *p
-AbDxpR	|bool	|is_utf8_upper	|NN const U8 *p
-AbDxpR	|bool	|is_utf8_lower	|NN const U8 *p
-AbDxpR	|bool	|is_utf8_print	|NN const U8 *p
-AbDxpR	|bool	|is_utf8_punct	|NN const U8 *p
-AbDxpR	|bool	|is_utf8_xdigit	|NN const U8 *p
-AxpR	|bool	|_is_utf8_mark	|NN const U8 *p
+CbDpR	|bool	|is_utf8_idcont	|NN const U8 *p
+CbDpR	|bool	|is_utf8_xidcont	|NN const U8 *p
+CbDpR	|bool	|is_utf8_alpha	|NN const U8 *p
+CbDpR	|bool	|is_utf8_ascii	|NN const U8 *p
+CbDpR	|bool	|is_utf8_blank	|NN const U8 *p
+CbDpR	|bool	|is_utf8_space	|NN const U8 *p
+CbDpR	|bool	|is_utf8_perl_space	|NN const U8 *p
+CbDpR	|bool	|is_utf8_perl_word	|NN const U8 *p
+CbDpR	|bool	|is_utf8_cntrl	|NN const U8 *p
+CbDpR	|bool	|is_utf8_digit	|NN const U8 *p
+CbDpR	|bool	|is_utf8_posix_digit	|NN const U8 *p
+CbDpR	|bool	|is_utf8_graph	|NN const U8 *p
+CbDpR	|bool	|is_utf8_upper	|NN const U8 *p
+CbDpR	|bool	|is_utf8_lower	|NN const U8 *p
+CbDpR	|bool	|is_utf8_print	|NN const U8 *p
+CbDpR	|bool	|is_utf8_punct	|NN const U8 *p
+CbDpR	|bool	|is_utf8_xdigit	|NN const U8 *p
+CpR	|bool	|_is_utf8_mark	|NN const U8 *p
 AbDxpR	|bool	|is_utf8_mark	|NN const U8 *p
 #if defined(PERL_CORE) || defined(PERL_EXT)
 EXdpR	|bool	|isSCRIPT_RUN	|NN const U8 *s|NN const U8 *send   \
@@ -1178,7 +1301,7 @@ p	|int	|magic_setcollxfrm|NN SV* sv|NN MAGIC* mg
 pbD	|char*	|mem_collxfrm	|NN const char* input_string|STRLEN len|NN STRLEN* xlen
 : Defined in locale.c, used only in sv.c
 #   if defined(PERL_IN_LOCALE_C) || defined(PERL_IN_SV_C) || defined(PERL_IN_MATHOMS_C)
-px	|char*	|_mem_collxfrm	|NN const char* input_string	\
+p	|char*	|_mem_collxfrm	|NN const char* input_string	\
 				|STRLEN len			\
 				|NN STRLEN* xlen		\
 				|bool utf8
@@ -1248,8 +1371,8 @@ pX	|I32	|my_stat_flags	|NULLOK const U32 flags
 Afp	|char *	|my_strftime	|NN const char *fmt|int sec|int min|int hour|int mday|int mon|int year|int wday|int yday|int isdst
 : Used in pp_ctl.c
 p	|void	|my_unexec
-AbDxTPR	|UV	|NATIVE_TO_NEED	|const UV enc|const UV ch
-AbDxTPR	|UV	|ASCII_TO_NEED	|const UV enc|const UV ch
+CbDTPR	|UV	|NATIVE_TO_NEED	|const UV enc|const UV ch
+CbDTPR	|UV	|ASCII_TO_NEED	|const UV enc|const UV ch
 ApR	|OP*	|newANONLIST	|NULLOK OP* o
 ApR	|OP*	|newANONHASH	|NULLOK OP* o
 Ap	|OP*	|newANONSUB	|I32 floor|NULLOK OP* proto|NULLOK OP* block
@@ -1425,8 +1548,8 @@ ATdo	|const char*|Perl_langinfo|const nl_item item
 #else
 ATdo	|const char*|Perl_langinfo|const int item
 #endif
-ApOx	|int	|init_i18nl10n	|int printwarn
-AbpOxD	|int	|init_i18nl14n	|int printwarn
+CpO	|int	|init_i18nl10n	|int printwarn
+CbpOD	|int	|init_i18nl14n	|int printwarn
 p	|char*	|my_strerror	|const int errnum
 XpT	|void	|_warn_problematic_locale
 Xp	|void	|set_numeric_underlying
@@ -1458,6 +1581,7 @@ ApMb	|OP*	|ref		|NULLOK OP* o|I32 type
 S	|OP*	|refkids	|NULLOK OP* o|I32 type
 #endif
 Ap	|void	|regdump	|NN const regexp* r
+CiTop	|struct regexp *|ReANY	|NN const REGEXP * const re
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_PERL_C) || defined(PERL_IN_UTF8_C)
 EXpR	|SV*	|_new_invlist_C_array|NN const UV* const list
 EXp	|bool	|_invlistEQ	|NN SV* const a|NN SV* const b|const bool complement_b
@@ -1482,14 +1606,14 @@ p	|REGEXP*|re_op_compile	|NULLOK SV ** const patternp \
 				|NULLOK bool *is_bare_re \
 				|const U32 rx_flags|const U32 pm_flags
 Ap	|REGEXP*|re_compile	|NN SV * const pattern|U32 orig_rx_flags
-Ap	|char*	|re_intuit_start|NN REGEXP * const rx \
+Cp	|char*	|re_intuit_start|NN REGEXP * const rx \
 				|NULLOK SV* sv \
 				|NN const char* const strbeg \
 				|NN char* strpos \
 				|NN char* strend \
 				|const U32 flags \
 				|NULLOK re_scream_pos_data *data
-Ap	|SV*	|re_intuit_string|NN REGEXP  *const r
+Cp	|SV*	|re_intuit_string|NN REGEXP  *const r
 Ap	|I32	|regexec_flags	|NN REGEXP *const rx|NN char *stringarg \
 				|NN char *strend|NN char *strbeg \
 				|SSize_t minend|NN SV *sv \
@@ -1546,7 +1670,7 @@ Apda	|char*	|savesharedsvpv	|NN SV *sv
 Apda	|char*	|savesvpv	|NN SV* sv
 Ap	|void	|savestack_grow
 Ap	|void	|savestack_grow_cnt	|I32 need
-Amp	|void	|save_aelem	|NN AV* av|SSize_t idx|NN SV **sptr
+Am	|void	|save_aelem	|NN AV* av|SSize_t idx|NN SV **sptr
 Ap	|void	|save_aelem_flags|NN AV* av|SSize_t idx|NN SV **sptr \
 				 |const U32 flags
 Ap	|I32	|save_alloc	|I32 size|I32 pad
@@ -1569,7 +1693,7 @@ Ap	|void	|save_shared_pvref|NN char** str
 Adp	|void	|save_gp	|NN GV* gv|I32 empty
 Apdh	|HV*	|save_hash	|NN GV* gv
 Ap	|void	|save_hints
-Amp	|void	|save_helem	|NN HV *hv|NN SV *key|NN SV **sptr
+Am	|void	|save_helem	|NN HV *hv|NN SV *key|NN SV **sptr
 Ap	|void	|save_helem_flags|NN HV *hv|NN SV *key|NN SV **sptr|const U32 flags
 Apdh	|void	|save_hptr	|NN HV** hptr
 Ap	|void	|save_I16	|NN I16* intp
@@ -1602,6 +1726,8 @@ Ap	|void	|save_pushptrptr|NULLOK void *const ptr1 \
 S	|void	|save_pushptri32ptr|NULLOK void *const ptr1|const I32 i \
 				|NULLOK void *const ptr2|const int type
 #endif
+Xiop	|I32	|TOPMARK
+Xiop	|I32	|POPMARK
 : Used in perly.y
 p	|OP*	|sawparens	|NULLOK OP* o
 Apd	|OP*	|op_contextualize|NN OP* o|I32 context
@@ -1692,10 +1818,10 @@ Apd	|void	|sv_clear	|NN SV *const orig_sv
 #if defined(PERL_IN_SV_C)
 S	|bool	|curse		|NN SV * const sv|const bool check_refcnt
 #endif
-AMopd	|I32	|sv_cmp		|NULLOK SV *const sv1|NULLOK SV *const sv2
+AMpd	|I32	|sv_cmp		|NULLOK SV *const sv1|NULLOK SV *const sv2
 Apd	|I32	|sv_cmp_flags	|NULLOK SV *const sv1|NULLOK SV *const sv2 \
 				|const U32 flags
-AMopd	|I32	|sv_cmp_locale	|NULLOK SV *const sv1|NULLOK SV *const sv2
+AMpd	|I32	|sv_cmp_locale	|NULLOK SV *const sv1|NULLOK SV *const sv2
 Apd	|I32	|sv_cmp_locale_flags	|NULLOK SV *const sv1 \
 				|NULLOK SV *const sv2|const U32 flags
 #if defined(USE_LOCALE_COLLATE)
@@ -1741,7 +1867,7 @@ Apd	|void	|sv_magic	|NN SV *const sv|NULLOK SV *const obj|const int how \
 Apd	|MAGIC *|sv_magicext	|NN SV *const sv|NULLOK SV *const obj|const int how \
 				|NULLOK const MGVTBL *const vtbl|NULLOK const char *const name \
 				|const I32 namlen
-EiT	|bool	|sv_only_taint_gmagic|NN SV *sv
+EiTp	|bool	|sv_only_taint_gmagic|NN SV *sv
 : exported for re.pm
 EXp	|MAGIC *|sv_magicext_mglob|NN SV *sv
 ApdbMR	|SV*	|sv_mortalcopy	|NULLOK SV *const oldsv
@@ -1838,15 +1964,15 @@ ESR	|SV*	|invlist_contents|NN SV* const invlist		    \
 ESRT	|bool	|new_regcurly	|NN const char *s|NN const char *e
 #endif
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_UTF8_C)
-EXm	|void	|_invlist_intersection	|NN SV* const a|NN SV* const b|NN SV** i
+m	|void	|_invlist_intersection	|NN SV* const a|NN SV* const b|NN SV** i
 EXp	|void	|_invlist_intersection_maybe_complement_2nd \
 		|NULLOK SV* const a|NN SV* const b          \
 		|const bool complement_b|NN SV** i
-EXm	|void	|_invlist_union	|NULLOK SV* const a|NN SV* const b|NN SV** output
+Cm	|void	|_invlist_union	|NULLOK SV* const a|NN SV* const b|NN SV** output
 EXp	|void	|_invlist_union_maybe_complement_2nd        \
 		|NULLOK SV* const a|NN SV* const b          \
 		|const bool complement_b|NN SV** output
-EXm	|void	|_invlist_subtract|NN SV* const a|NN SV* const b|NN SV** result
+m	|void	|_invlist_subtract|NN SV* const a|NN SV* const b|NN SV** result
 EXp	|void	|_invlist_invert|NN SV* const invlist
 EXpR	|SV*	|_new_invlist	|IV initial_size
 EXpR	|SV*	|_add_range_to_invlist	|NULLOK SV* invlist|UV start|UV end
@@ -1863,6 +1989,9 @@ EiRT	|UV	|_invlist_len	|NN SV* const invlist
 EiRT	|bool	|_invlist_contains_cp|NN SV* const invlist|const UV cp
 EXpRT	|SSize_t|_invlist_search	|NN SV* const invlist|const UV cp
 #endif
+#if defined(PERL_IN_PP_C) || defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C) || defined(PERL_IN_UNIVERSAL_C)
+EiT	|const char *|get_regex_charset_name|const U32 flags|NN STRLEN* const lenp
+#endif
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C)
 EXp	|SV*	|_get_regclass_nonbitmap_data				   \
 				|NULLOK const regexp *prog		   \
@@ -1879,7 +2008,7 @@ EXp	|void	|_invlist_dump	|NN PerlIO *file|I32 level   \
 #endif
 Ap	|void	|taint_env
 Ap	|void	|taint_proper	|NULLOK const char* f|NN const char *const s
-Epx	|char *	|_byte_dump_string					\
+Ep	|char *	|_byte_dump_string					\
 				|NN const U8 * const start		\
 				|const STRLEN len			\
 				|const bool format
@@ -1890,7 +2019,7 @@ iTR	|int	|does_utf8_overflow|NN const U8 * const s		\
 iTR	|int	|is_utf8_overlong_given_start_byte_ok|NN const U8 * const s \
 						     |const STRLEN len
 iTR	|int	|isFF_OVERLONG	|NN const U8 * const s|const STRLEN len
-SxR	|char *	|unexpected_non_continuation_text			\
+SR	|char *	|unexpected_non_continuation_text			\
 		|NN const U8 * const s					\
 		|STRLEN print_len					\
 		|const STRLEN non_cont_byte_pos				\
@@ -1922,19 +2051,19 @@ S	|UV	|turkic_lc	|NN const U8 * const p0|NN const U8 * const e|NN U8* ustrp|NN S
 S	|UV	|turkic_uc	|NN const U8 * const p |NN const U8 * const e|NN U8* ustrp|NN STRLEN *lenp
 #endif
 ApbMdD	|UV	|to_utf8_lower	|NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp
-Axp	|UV	|_to_utf8_lower_flags|NN const U8 *p|NULLOK const U8* e		\
+Cp	|UV	|_to_utf8_lower_flags|NN const U8 *p|NULLOK const U8* e		\
 				|NN U8* ustrp|NULLOK STRLEN *lenp|bool flags	\
 				|NN const char * const file|const int line
 ApbMdD	|UV	|to_utf8_upper	|NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp
-Axp	|UV	|_to_utf8_upper_flags	|NN const U8 *p|NULLOK const U8 *e	\
+Cp	|UV	|_to_utf8_upper_flags	|NN const U8 *p|NULLOK const U8 *e	\
 				|NN U8* ustrp|NULLOK STRLEN *lenp|bool flags	\
 				|NN const char * const file|const int line
 ApbMdD	|UV	|to_utf8_title	|NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp
-Axp	|UV	|_to_utf8_title_flags	|NN const U8 *p|NULLOK const U8* e	\
+Cp	|UV	|_to_utf8_title_flags	|NN const U8 *p|NULLOK const U8* e	\
 				|NN U8* ustrp|NULLOK STRLEN *lenp|bool flags	\
 				|NN const char * const file|const int line
 ApbMdD	|UV	|to_utf8_fold	|NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp
-Axp	|UV	|_to_utf8_fold_flags|NN const U8 *p|NULLOK const U8 *e		\
+Cp	|UV	|_to_utf8_fold_flags|NN const U8 *p|NULLOK const U8 *e		\
 				|NN U8* ustrp|NULLOK STRLEN *lenp|U8 flags  \
 				|NN const char * const file|const int line
 #if defined(PERL_IN_MG_C) || defined(PERL_IN_PP_C)
@@ -1956,7 +2085,7 @@ Ap	|void	|unsharepvn	|NULLOK const char* sv|I32 len|U32 hash
 p	|void	|unshare_hek	|NULLOK HEK* hek
 : Used in perly.y
 p	|void	|utilize	|int aver|I32 floor|NULLOK OP* version|NN OP* idop|NULLOK OP* arg
-Apx	|void	|_force_out_malformed_utf8_message			    \
+Cp	|void	|_force_out_malformed_utf8_message			    \
 		|NN const U8 *const p|NN const U8 * const e|const U32 flags \
 		|const bool die_here
 EXp	|U8*	|utf16_to_utf8	|NN U8* p|NN U8 *d|I32 bytelen|NN I32 *newlen
@@ -1977,11 +2106,11 @@ AxTp	|U8*	|bytes_from_utf8_loc|NN const U8 *s			    \
 				    |NULLOK const U8 ** first_unconverted
 Apxd	|U8*	|bytes_to_utf8	|NN const U8 *s|NN STRLEN *lenp
 ApdD	|UV	|utf8_to_uvchr	|NN const U8 *s|NULLOK STRLEN *retlen
-AbpdD	|UV	|utf8_to_uvuni	|NN const U8 *s|NULLOK STRLEN *retlen
-AbpxD	|UV	|valid_utf8_to_uvuni	|NN const U8 *s|NULLOK STRLEN *retlen
+CbpdD	|UV	|utf8_to_uvuni	|NN const U8 *s|NULLOK STRLEN *retlen
+CbpD	|UV	|valid_utf8_to_uvuni	|NN const U8 *s|NULLOK STRLEN *retlen
 AMpd	|UV	|utf8_to_uvchr_buf	|NN const U8 *s|NN const U8 *send|NULLOK STRLEN *retlen
-Ai	|UV	|_utf8_to_uvchr_buf	|NN const U8 *s|NN const U8 *send|NULLOK STRLEN *retlen
-ApdD	|UV	|utf8_to_uvuni_buf	|NN const U8 *s|NN const U8 *send|NULLOK STRLEN *retlen
+Cip	|UV	|utf8_to_uvchr_buf_helper|NN const U8 *s|NN const U8 *send|NULLOK STRLEN *retlen
+CpdD	|UV	|utf8_to_uvuni_buf	|NN const U8 *s|NN const U8 *send|NULLOK STRLEN *retlen
 p	|bool	|check_utf8_print	|NN const U8 *s|const STRLEN len
 
 AdMTp	|UV	|utf8n_to_uvchr	|NN const U8 *s				    \
@@ -1993,29 +2122,29 @@ AdMTp	|UV	|utf8n_to_uvchr_error|NN const U8 *s			    \
 				|NULLOK STRLEN *retlen			    \
 				|const U32 flags			    \
 				|NULLOK U32 * errors
-AxTdi	|UV	|utf8n_to_uvchr_msgs|NN const U8 *s			    \
+AxTdip	|UV	|utf8n_to_uvchr_msgs|NN const U8 *s			    \
 				|STRLEN curlen				    \
 				|NULLOK STRLEN *retlen			    \
 				|const U32 flags			    \
 				|NULLOK U32 * errors			    \
 				|NULLOK AV ** msgs
-AxTp	|UV	|_utf8n_to_uvchr_msgs_helper				    \
+CTp	|UV	|_utf8n_to_uvchr_msgs_helper				    \
 				|NN const U8 *s				    \
 				|STRLEN curlen				    \
 				|NULLOK STRLEN *retlen			    \
 				|const U32 flags			    \
 				|NULLOK U32 * errors			    \
 				|NULLOK AV ** msgs
-AipTRd	|UV	|valid_utf8_to_uvchr	|NN const U8 *s|NULLOK STRLEN *retlen
-Adp	|UV	|utf8n_to_uvuni|NN const U8 *s|STRLEN curlen|NULLOK STRLEN *retlen|U32 flags
+CipTRd	|UV	|valid_utf8_to_uvchr	|NN const U8 *s|NULLOK STRLEN *retlen
+Cdp	|UV	|utf8n_to_uvuni|NN const U8 *s|STRLEN curlen|NULLOK STRLEN *retlen|U32 flags
 
 Adm	|U8*	|uvchr_to_utf8	|NN U8 *d|UV uv
-Ap	|U8*	|uvuni_to_utf8	|NN U8 *d|UV uv
+Cp	|U8*	|uvuni_to_utf8	|NN U8 *d|UV uv
 Adm	|U8*	|uvchr_to_utf8_flags	|NN U8 *d|UV uv|UV flags
 Admx	|U8*	|uvchr_to_utf8_flags_msgs|NN U8 *d|UV uv|UV flags|NULLOK HV ** msgs
-AMpod	|U8*	|uvoffuni_to_utf8_flags	|NN U8 *d|UV uv|const UV flags
-Apx	|U8*	|uvoffuni_to_utf8_flags_msgs|NN U8 *d|UV uv|const UV flags|NULLOK HV** msgs
-Adp	|U8*	|uvuni_to_utf8_flags	|NN U8 *d|UV uv|UV flags
+CMpd	|U8*	|uvoffuni_to_utf8_flags	|NN U8 *d|UV uv|const UV flags
+Cp	|U8*	|uvoffuni_to_utf8_flags_msgs|NN U8 *d|UV uv|const UV flags|NULLOK HV** msgs
+Cdp	|U8*	|uvuni_to_utf8_flags	|NN U8 *d|UV uv|UV flags
 Apd	|char*	|pv_uni_display	|NN SV *dsv|NN const U8 *spv|STRLEN len|STRLEN pvlim|UV flags
 ApdR	|char*	|sv_uni_display	|NN SV *dsv|NN SV *ssv|STRLEN pvlim|UV flags
 EXpR	|Size_t	|_inverse_folds	|const UV cp				    \
@@ -2065,7 +2194,7 @@ Ap	|I32    |whichsig_sv    |NN SV* sigsv
 Ap	|I32    |whichsig_pv    |NN const char* sig
 Ap	|I32    |whichsig_pvn   |NN const char* sig|STRLEN len
 : used to check for NULs in pathnames and other names
-AiRd	|bool	|is_safe_syscall|NN const char *pv|STRLEN len|NN const char *what|NN const char *op_name
+AiRdp	|bool	|is_safe_syscall|NN const char *pv|STRLEN len|NN const char *what|NN const char *op_name
 #ifdef PERL_CORE
 iTR	|bool	|should_warn_nl|NN const char *pv
 #endif
@@ -2099,7 +2228,7 @@ ATpa	|Malloc_t|safesysmalloc	|MEM_SIZE nbytes
 ATpa	|Malloc_t|safesyscalloc	|MEM_SIZE elements|MEM_SIZE size
 ATpR	|Malloc_t|safesysrealloc|Malloc_t where|MEM_SIZE nbytes
 ATp	|Free_t	|safesysfree	|Malloc_t where
-AirTe	|void	|croak_memory_wrap
+AirTep	|void	|croak_memory_wrap
 #if defined(PERL_GLOBAL_STRUCT)
 Ap	|struct perl_vars *|GetVars
 Ap	|struct perl_vars*|init_global_struct
@@ -2172,6 +2301,13 @@ pX	|SSize_t|tmps_grow_p	|SSize_t ix
 Apd	|SV*	|sv_rvweaken	|NN SV *const sv
 Apd	|SV*	|sv_rvunweaken	|NN SV *const sv
 ATpxd	|SV*	|sv_get_backrefs|NN SV *const sv
+AiTMdp	|SV *	|SvREFCNT_inc	|NULLOK SV *sv
+AiTMdp	|SV *	|SvREFCNT_inc_NN|NN SV *sv
+AiTMdp	|void	|SvREFCNT_inc_void|NULLOK SV *sv
+AiMdp	|void	|SvREFCNT_dec	|NULLOK SV *sv
+AiMdp	|void	|SvREFCNT_dec_NN|NN SV *sv
+AiTp	|void	|SvAMAGIC_on	|NN SV *sv
+AiTp	|void	|SvAMAGIC_off	|NN SV *sv
 : This is indirectly referenced by globals.c. This is somewhat annoying.
 p	|int	|magic_killbackrefs|NN SV *sv|NN MAGIC *mg
 Ap	|OP*	|newANONATTRSUB	|I32 floor|NULLOK OP *proto|NULLOK OP *attrs|NULLOK OP *block
@@ -2224,7 +2360,9 @@ Ap	|void	|sys_intern_dup	|NN struct interp_intern* src|NN struct interp_intern*
 #  endif
 #endif
 
-Admop	|const XOP *	|custom_op_xop	|NN const OP *o
+: The reason for the 'u' flag is that this passes "aTHX_ x" to its callee: not
+: a legal C parameter
+Admu	|const XOP *	|Perl_custom_op_xop	|NN const OP *o
 AbpRdD	|const char *	|custom_op_name	|NN const OP *o
 AbpRdD	|const char *	|custom_op_desc	|NN const OP *o
 pRX	|XOPRETANY	|custom_op_get_field	|NN const OP *o|const xop_flags_enum field
@@ -2683,7 +2821,7 @@ ESR	|bool	|regtail_study	|NN RExC_state_t *pRExC_state \
 #endif
 
 #if defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C)
-EXRpx	|bool	|isFOO_lc	|const U8 classnum|const U8 character
+EXRp	|bool	|isFOO_lc	|const U8 classnum|const U8 character
 #endif
 
 #if defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_TOKE_C)
@@ -2991,7 +3129,7 @@ STR	|char *	|setlocale_debug_string	|const int category		    \
         || defined(PERL_IN_MG_C)	\
 	|| defined (PERL_EXT_POSIX)	\
 	|| defined (PERL_EXT_LANGINFO))
-Apx	|bool	|_is_cur_LC_category_utf8|int category
+Cp	|bool	|_is_cur_LC_category_utf8|int category
 #endif
 
 
@@ -3034,7 +3172,7 @@ SR	|U8*	|swash_scan_list_line|NN U8* l|NN U8* const lend|NN UV* min \
 		|NN const U8* const typestr
 #endif
 
-EXiT	|void	|append_utf8_from_native_byte|const U8 byte|NN U8** dest
+EXiTp	|void	|append_utf8_from_native_byte|const U8 byte|NN U8** dest
 
 Apd	|void	|sv_set_undef	|NN SV *sv
 Apd	|void	|sv_setsv_flags	|NN SV *dstr|NULLOK SV *sstr|const I32 flags
@@ -3047,10 +3185,10 @@ Amd	|STRLEN	|sv_utf8_upgrade_flags|NN SV *const sv|const I32 flags
 Adp	|STRLEN	|sv_utf8_upgrade_flags_grow|NN SV *const sv|const I32 flags|STRLEN extra
 Apd	|char*	|sv_pvn_force_flags|NN SV *const sv|NULLOK STRLEN *const lp|const I32 flags
 AdpMb	|void	|sv_copypv	|NN SV *const dsv|NN SV *const ssv
-Apmd	|void	|sv_copypv_nomg	|NN SV *const dsv|NN SV *const ssv
+Amd	|void	|sv_copypv_nomg	|NN SV *const dsv|NN SV *const ssv
 Apd	|void	|sv_copypv_flags	|NN SV *const dsv|NN SV *const ssv|const I32 flags
-Apo	|char*	|my_atof2	|NN const char *orig|NN NV* value
-Ap	|char*	|my_atof3	|NN const char *orig|NN NV* value|const STRLEN len
+Cpo	|char*	|my_atof2	|NN const char *orig|NN NV* value
+Cp	|char*	|my_atof3	|NN const char *orig|NN NV* value|const STRLEN len
 ApT	|int	|my_socketpair	|int family|int type|int protocol|int fd[2]
 ApT	|int	|my_dirfd	|NULLOK DIR* dir
 #ifdef PERL_ANY_COW
@@ -3155,6 +3293,9 @@ pd	|void	|do_dump_pad	|I32 level|NN PerlIO *file|NULLOK PADLIST *padlist|int ful
 Sd	|void	|cv_dump	|NN const CV *cv|NN const char *title
 #  endif
 #endif
+#if defined(PERL_IN_PAD_C) || defined(PERL_IN_OP_C)
+iT	|bool	|PadnameIN_SCOPE|NN const PADNAME * const pn|const U32 seq
+#endif
 Apd	|CV*	|cv_clone	|NN CV* proto
 p	|CV*	|cv_clone_into	|NN CV* proto|NN CV *target
 pd	|void	|pad_fixup_inner_anons|NN PADLIST *padlist|NN CV *old_cv|NN CV *new_cv
@@ -3245,8 +3386,8 @@ ApoP	|bool	|ckwarn_d	|U32 w
 XEopxR	|STRLEN *|new_warnings_bitfield|NULLOK STRLEN *buffer \
 				|NN const char *const bits|STRLEN size
 
-AMpTodf	|int	|my_snprintf	|NN char *buffer|const Size_t len|NN const char *format|...
-AMpTod	|int	|my_vsnprintf	|NN char *buffer|const Size_t len|NN const char *format|va_list ap
+AMpTdf	|int	|my_snprintf	|NN char *buffer|const Size_t len|NN const char *format|...
+AMpTd	|int	|my_vsnprintf	|NN char *buffer|const Size_t len|NN const char *format|va_list ap
 #ifdef USE_QUADMATH
 ApTd	|const char*	|quadmath_format_single|NN const char* format
 ApTd	|bool|quadmath_format_needed|NN const char* format
@@ -3376,28 +3517,28 @@ Apx	|void	|leave_adjust_stacks|NN SV **from_sp|NN SV **to_sp \
                 |U8 gimme|int filter
 
 #ifndef PERL_NO_INLINE_FUNCTIONS
-Aix	|PERL_CONTEXT *	|cx_pushblock|U8 type|U8 gimme|NN SV** sp|I32 saveix
-Aix	|void	|cx_popblock|NN PERL_CONTEXT *cx
-Aix	|void	|cx_topblock|NN PERL_CONTEXT *cx
-Aix	|void	|cx_pushsub      |NN PERL_CONTEXT *cx|NN CV *cv \
+Aixp	|PERL_CONTEXT *	|cx_pushblock|U8 type|U8 gimme|NN SV** sp|I32 saveix
+Aixp	|void	|cx_popblock|NN PERL_CONTEXT *cx
+Aixp	|void	|cx_topblock|NN PERL_CONTEXT *cx
+Aixp	|void	|cx_pushsub      |NN PERL_CONTEXT *cx|NN CV *cv \
 				 |NULLOK OP *retop|bool hasargs
-Aix	|void	|cx_popsub_common|NN PERL_CONTEXT *cx
-Aix	|void	|cx_popsub_args  |NN PERL_CONTEXT *cx
-Aix	|void	|cx_popsub       |NN PERL_CONTEXT *cx
-Aix	|void	|cx_pushformat   |NN PERL_CONTEXT *cx|NN CV *cv \
+Aixp	|void	|cx_popsub_common|NN PERL_CONTEXT *cx
+Aixp	|void	|cx_popsub_args  |NN PERL_CONTEXT *cx
+Aixp	|void	|cx_popsub       |NN PERL_CONTEXT *cx
+Aixp	|void	|cx_pushformat   |NN PERL_CONTEXT *cx|NN CV *cv \
 				 |NULLOK OP *retop|NULLOK GV *gv
-Aix	|void	|cx_popformat    |NN PERL_CONTEXT *cx
-Aix	|void	|cx_pusheval     |NN PERL_CONTEXT *cx \
+Aixp	|void	|cx_popformat    |NN PERL_CONTEXT *cx
+Aixp	|void	|cx_pusheval     |NN PERL_CONTEXT *cx \
 				 |NULLOK OP *retop|NULLOK SV *namesv
-Aix	|void	|cx_popeval      |NN PERL_CONTEXT *cx
-Aix	|void	|cx_pushloop_plain|NN PERL_CONTEXT *cx
-Aix	|void	|cx_pushloop_for |NN PERL_CONTEXT *cx \
+Aixp	|void	|cx_popeval      |NN PERL_CONTEXT *cx
+Aixp	|void	|cx_pushloop_plain|NN PERL_CONTEXT *cx
+Aixp	|void	|cx_pushloop_for |NN PERL_CONTEXT *cx \
 				 |NN void *itervarp|NULLOK SV *itersave
-Aix	|void	|cx_poploop      |NN PERL_CONTEXT *cx
-Aix	|void	|cx_pushwhen     |NN PERL_CONTEXT *cx
-Aix	|void	|cx_popwhen      |NN PERL_CONTEXT *cx
-Aix	|void	|cx_pushgiven    |NN PERL_CONTEXT *cx|NULLOK SV *orig_defsv
-Aix	|void	|cx_popgiven     |NN PERL_CONTEXT *cx
+Aixp	|void	|cx_poploop      |NN PERL_CONTEXT *cx
+Aixp	|void	|cx_pushwhen     |NN PERL_CONTEXT *cx
+Aixp	|void	|cx_popwhen      |NN PERL_CONTEXT *cx
+Aixp	|void	|cx_pushgiven    |NN PERL_CONTEXT *cx|NULLOK SV *orig_defsv
+Aixp	|void	|cx_popgiven     |NN PERL_CONTEXT *cx
 #endif
 
 #ifdef USE_DTRACE
diff --git a/embed.h b/embed.h
index 1c154c27c0..f1c3f57aa2 100644
--- a/embed.h
+++ b/embed.h
@@ -27,13 +27,14 @@
 /* Hide global symbols */
 
 #define Gv_AMupdate(a,b)	Perl_Gv_AMupdate(aTHX_ a,b)
+#define SvAMAGIC_off		Perl_SvAMAGIC_off
+#define SvAMAGIC_on		Perl_SvAMAGIC_on
 #define _force_out_malformed_utf8_message(a,b,c,d)	Perl__force_out_malformed_utf8_message(aTHX_ a,b,c,d)
 #define _is_uni_FOO(a,b)	Perl__is_uni_FOO(aTHX_ a,b)
 #define _is_uni_perl_idcont(a)	Perl__is_uni_perl_idcont(aTHX_ a)
 #define _is_uni_perl_idstart(a)	Perl__is_uni_perl_idstart(aTHX_ a)
 #define _is_utf8_FOO(a,b,c,d,e,f,g,h)	Perl__is_utf8_FOO(aTHX_ a,b,c,d,e,f,g,h)
 #define _is_utf8_FOO_with_len(a,b,c)	Perl__is_utf8_FOO_with_len(aTHX_ a,b,c)
-#define _is_utf8_char_helper	Perl__is_utf8_char_helper
 #define _is_utf8_idcont(a)	Perl__is_utf8_idcont(aTHX_ a)
 #define _is_utf8_idstart(a)	Perl__is_utf8_idstart(aTHX_ a)
 #define _is_utf8_mark(a)	Perl__is_utf8_mark(aTHX_ a)
@@ -46,7 +47,6 @@
 #define _to_utf8_lower_flags(a,b,c,d,e,f,g)	Perl__to_utf8_lower_flags(aTHX_ a,b,c,d,e,f,g)
 #define _to_utf8_title_flags(a,b,c,d,e,f,g)	Perl__to_utf8_title_flags(aTHX_ a,b,c,d,e,f,g)
 #define _to_utf8_upper_flags(a,b,c,d,e,f,g)	Perl__to_utf8_upper_flags(aTHX_ a,b,c,d,e,f,g)
-#define _utf8_to_uvchr_buf(a,b,c)	S__utf8_to_uvchr_buf(aTHX_ a,b,c)
 #define _utf8n_to_uvchr_msgs_helper	Perl__utf8n_to_uvchr_msgs_helper
 #define amagic_call(a,b,c,d)	Perl_amagic_call(aTHX_ a,b,c,d)
 #define amagic_deref_call(a,b)	Perl_amagic_deref_call(aTHX_ a,b)
@@ -65,7 +65,7 @@
 #define av_push(a,b)		Perl_av_push(aTHX_ a,b)
 #define av_shift(a)		Perl_av_shift(aTHX_ a)
 #define av_store(a,b,c)		Perl_av_store(aTHX_ a,b,c)
-#define av_top_index(a)		S_av_top_index(aTHX_ a)
+#define av_top_index(a)		Perl_av_top_index(aTHX_ a)
 #define av_undef(a)		Perl_av_undef(aTHX_ a)
 #define av_unshift(a,b)		Perl_av_unshift(aTHX_ a,b)
 #define block_end(a,b)		Perl_block_end(aTHX_ a,b)
@@ -98,7 +98,7 @@
 #ifndef PERL_IMPLICIT_CONTEXT
 #define croak			Perl_croak
 #endif
-#define croak_memory_wrap	S_croak_memory_wrap
+#define croak_memory_wrap	Perl_croak_memory_wrap
 #define croak_no_modify		Perl_croak_no_modify
 #define croak_sv(a)		Perl_croak_sv(aTHX_ a)
 #define croak_xs_usage		Perl_croak_xs_usage
@@ -265,16 +265,16 @@
 #ifndef NO_MATHOMS
 #define isALNUM_lazy(a)		Perl_isALNUM_lazy(aTHX_ a)
 #endif
-#define isC9_STRICT_UTF8_CHAR	S_isC9_STRICT_UTF8_CHAR
+#define isC9_STRICT_UTF8_CHAR	Perl_isC9_STRICT_UTF8_CHAR
 #ifndef NO_MATHOMS
 #define isIDFIRST_lazy(a)	Perl_isIDFIRST_lazy(aTHX_ a)
 #endif
-#define isSTRICT_UTF8_CHAR	S_isSTRICT_UTF8_CHAR
-#define isUTF8_CHAR		S_isUTF8_CHAR
-#define is_c9strict_utf8_string_loclen	S_is_c9strict_utf8_string_loclen
+#define isSTRICT_UTF8_CHAR	Perl_isSTRICT_UTF8_CHAR
+#define isUTF8_CHAR		Perl_isUTF8_CHAR
+#define is_c9strict_utf8_string_loclen	Perl_is_c9strict_utf8_string_loclen
 #define is_lvalue_sub()		Perl_is_lvalue_sub(aTHX)
-#define is_safe_syscall(a,b,c,d)	S_is_safe_syscall(aTHX_ a,b,c,d)
-#define is_strict_utf8_string_loclen	S_is_strict_utf8_string_loclen
+#define is_safe_syscall(a,b,c,d)	Perl_is_safe_syscall(aTHX_ a,b,c,d)
+#define is_strict_utf8_string_loclen	Perl_is_strict_utf8_string_loclen
 #ifndef NO_MATHOMS
 #define is_uni_alnum(a)		Perl_is_uni_alnum(aTHX_ a)
 #endif
@@ -383,13 +383,14 @@
 #ifndef NO_MATHOMS
 #define is_utf8_char		Perl_is_utf8_char
 #endif
+#define is_utf8_char_helper	Perl_is_utf8_char_helper
 #ifndef NO_MATHOMS
 #define is_utf8_cntrl(a)	Perl_is_utf8_cntrl(aTHX_ a)
 #endif
 #ifndef NO_MATHOMS
 #define is_utf8_digit(a)	Perl_is_utf8_digit(aTHX_ a)
 #endif
-#define is_utf8_fixed_width_buf_loclen_flags	S_is_utf8_fixed_width_buf_loclen_flags
+#define is_utf8_fixed_width_buf_loclen_flags	Perl_is_utf8_fixed_width_buf_loclen_flags
 #ifndef NO_MATHOMS
 #define is_utf8_graph(a)	Perl_is_utf8_graph(aTHX_ a)
 #endif
@@ -399,7 +400,7 @@
 #ifndef NO_MATHOMS
 #define is_utf8_idfirst(a)	Perl_is_utf8_idfirst(aTHX_ a)
 #endif
-#define is_utf8_invariant_string_loc	S_is_utf8_invariant_string_loc
+#define is_utf8_invariant_string_loc	Perl_is_utf8_invariant_string_loc
 #ifndef NO_MATHOMS
 #define is_utf8_lower(a)	Perl_is_utf8_lower(aTHX_ a)
 #endif
@@ -424,13 +425,13 @@
 #ifndef NO_MATHOMS
 #define is_utf8_space(a)	Perl_is_utf8_space(aTHX_ a)
 #endif
-#define is_utf8_string_flags	S_is_utf8_string_flags
+#define is_utf8_string_flags	Perl_is_utf8_string_flags
 #define is_utf8_string_loclen	Perl_is_utf8_string_loclen
-#define is_utf8_string_loclen_flags	S_is_utf8_string_loclen_flags
+#define is_utf8_string_loclen_flags	Perl_is_utf8_string_loclen_flags
 #ifndef NO_MATHOMS
 #define is_utf8_upper(a)	Perl_is_utf8_upper(aTHX_ a)
 #endif
-#define is_utf8_valid_partial_char_flags	S_is_utf8_valid_partial_char_flags
+#define is_utf8_valid_partial_char_flags	Perl_is_utf8_valid_partial_char_flags
 #ifndef NO_MATHOMS
 #define is_utf8_xdigit(a)	Perl_is_utf8_xdigit(aTHX_ a)
 #endif
@@ -898,11 +899,12 @@
 #define utf8_length(a,b)	Perl_utf8_length(aTHX_ a,b)
 #define utf8_to_bytes(a,b)	Perl_utf8_to_bytes(aTHX_ a,b)
 #define utf8_to_uvchr(a,b)	Perl_utf8_to_uvchr(aTHX_ a,b)
+#define utf8_to_uvchr_buf_helper(a,b,c)	Perl_utf8_to_uvchr_buf_helper(aTHX_ a,b,c)
 #ifndef NO_MATHOMS
 #define utf8_to_uvuni(a,b)	Perl_utf8_to_uvuni(aTHX_ a,b)
 #endif
 #define utf8_to_uvuni_buf(a,b,c)	Perl_utf8_to_uvuni_buf(aTHX_ a,b,c)
-#define utf8n_to_uvchr_msgs	S_utf8n_to_uvchr_msgs
+#define utf8n_to_uvchr_msgs	Perl_utf8n_to_uvchr_msgs
 #define utf8n_to_uvuni(a,b,c,d)	Perl_utf8n_to_uvuni(aTHX_ a,b,c,d)
 #define uvoffuni_to_utf8_flags_msgs(a,b,c,d)	Perl_uvoffuni_to_utf8_flags_msgs(aTHX_ a,b,c,d)
 #define uvuni_to_utf8(a,b)	Perl_uvuni_to_utf8(aTHX_ a,b)
@@ -940,7 +942,7 @@
 #define csighandler		Perl_csighandler
 #endif
 #if !defined(EBCDIC)
-#define _variant_byte_number	S__variant_byte_number
+#define variant_byte_number	Perl_variant_byte_number
 #endif
 #if !defined(HAS_STRLCAT)
 #define my_strlcat		Perl_my_strlcat
@@ -959,24 +961,24 @@
 #define my_popen(a,b)		Perl_my_popen(aTHX_ a,b)
 #endif
 #if !defined(PERL_NO_INLINE_FUNCTIONS)
-#define cx_popblock(a)		S_cx_popblock(aTHX_ a)
-#define cx_popeval(a)		S_cx_popeval(aTHX_ a)
-#define cx_popformat(a)		S_cx_popformat(aTHX_ a)
-#define cx_popgiven(a)		S_cx_popgiven(aTHX_ a)
-#define cx_poploop(a)		S_cx_poploop(aTHX_ a)
-#define cx_popsub(a)		S_cx_popsub(aTHX_ a)
-#define cx_popsub_args(a)	S_cx_popsub_args(aTHX_ a)
-#define cx_popsub_common(a)	S_cx_popsub_common(aTHX_ a)
-#define cx_popwhen(a)		S_cx_popwhen(aTHX_ a)
-#define cx_pushblock(a,b,c,d)	S_cx_pushblock(aTHX_ a,b,c,d)
-#define cx_pusheval(a,b,c)	S_cx_pusheval(aTHX_ a,b,c)
-#define cx_pushformat(a,b,c,d)	S_cx_pushformat(aTHX_ a,b,c,d)
-#define cx_pushgiven(a,b)	S_cx_pushgiven(aTHX_ a,b)
-#define cx_pushloop_for(a,b,c)	S_cx_pushloop_for(aTHX_ a,b,c)
-#define cx_pushloop_plain(a)	S_cx_pushloop_plain(aTHX_ a)
-#define cx_pushsub(a,b,c,d)	S_cx_pushsub(aTHX_ a,b,c,d)
-#define cx_pushwhen(a)		S_cx_pushwhen(aTHX_ a)
-#define cx_topblock(a)		S_cx_topblock(aTHX_ a)
+#define cx_popblock(a)		Perl_cx_popblock(aTHX_ a)
+#define cx_popeval(a)		Perl_cx_popeval(aTHX_ a)
+#define cx_popformat(a)		Perl_cx_popformat(aTHX_ a)
+#define cx_popgiven(a)		Perl_cx_popgiven(aTHX_ a)
+#define cx_poploop(a)		Perl_cx_poploop(aTHX_ a)
+#define cx_popsub(a)		Perl_cx_popsub(aTHX_ a)
+#define cx_popsub_args(a)	Perl_cx_popsub_args(aTHX_ a)
+#define cx_popsub_common(a)	Perl_cx_popsub_common(aTHX_ a)
+#define cx_popwhen(a)		Perl_cx_popwhen(aTHX_ a)
+#define cx_pushblock(a,b,c,d)	Perl_cx_pushblock(aTHX_ a,b,c,d)
+#define cx_pusheval(a,b,c)	Perl_cx_pusheval(aTHX_ a,b,c)
+#define cx_pushformat(a,b,c,d)	Perl_cx_pushformat(aTHX_ a,b,c,d)
+#define cx_pushgiven(a,b)	Perl_cx_pushgiven(aTHX_ a,b)
+#define cx_pushloop_for(a,b,c)	Perl_cx_pushloop_for(aTHX_ a,b,c)
+#define cx_pushloop_plain(a)	Perl_cx_pushloop_plain(aTHX_ a)
+#define cx_pushsub(a,b,c,d)	Perl_cx_pushsub(aTHX_ a,b,c,d)
+#define cx_pushwhen(a)		Perl_cx_pushwhen(aTHX_ a)
+#define cx_topblock(a)		Perl_cx_topblock(aTHX_ a)
 #endif
 #if defined(DEBUGGING)
 #define pad_setsv(a,b)		Perl_pad_setsv(aTHX_ a,b)
@@ -1091,7 +1093,7 @@
 #if defined(PERL_CORE) || defined(PERL_EXT)
 #define _byte_dump_string(a,b,c)	Perl__byte_dump_string(aTHX_ a,b,c)
 #define _inverse_folds(a,b,c)	Perl__inverse_folds(aTHX_ a,b,c)
-#define append_utf8_from_native_byte	S_append_utf8_from_native_byte
+#define append_utf8_from_native_byte	Perl_append_utf8_from_native_byte
 #define av_reify(a)		Perl_av_reify(aTHX_ a)
 #define current_re_engine()	Perl_current_re_engine(aTHX)
 #define cv_ckproto_len_flags(a,b,c,d,e)	Perl_cv_ckproto_len_flags(aTHX_ a,b,c,d,e)
@@ -1114,7 +1116,7 @@
 #define scan_word(a,b,c,d,e)	Perl_scan_word(aTHX_ a,b,c,d,e)
 #define skipspace_flags(a,b)	Perl_skipspace_flags(aTHX_ a,b)
 #define sv_magicext_mglob(a)	Perl_sv_magicext_mglob(aTHX_ a)
-#define sv_only_taint_gmagic	S_sv_only_taint_gmagic
+#define sv_only_taint_gmagic	Perl_sv_only_taint_gmagic
 #define swash_fetch(a,b,c)	Perl_swash_fetch(aTHX_ a,b,c)
 #define swash_init(a,b,c,d,e)	Perl_swash_init(aTHX_ a,b,c,d,e)
 #define utf16_to_utf8(a,b,c,d)	Perl_utf16_to_utf8(aTHX_ a,b,c,d)
@@ -1175,13 +1177,16 @@
 #define sv_setsv_cow(a,b)	Perl_sv_setsv_cow(aTHX_ a,b)
 #  endif
 #  if defined(PERL_CORE) || defined (PERL_EXT)
-#define is_utf8_non_invariant_string	S_is_utf8_non_invariant_string
+#define is_utf8_non_invariant_string	Perl_is_utf8_non_invariant_string
 #define sv_or_pv_pos_u2b(a,b,c,d)	S_sv_or_pv_pos_u2b(aTHX_ a,b,c,d)
 #  endif
 #  if defined(PERL_CORE) || defined(PERL_EXT)
 #define isSCRIPT_RUN(a,b,c)	Perl_isSCRIPT_RUN(aTHX_ a,b,c)
 #define variant_under_utf8_count	S_variant_under_utf8_count
 #  endif
+#  if defined(PERL_IN_PP_C) || defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C) || defined(PERL_IN_UNIVERSAL_C)
+#define get_regex_charset_name	S_get_regex_charset_name
+#  endif
 #  if defined(PERL_IN_REGCOMP_C)
 #define _make_exactf_invlist(a,b)	S__make_exactf_invlist(aTHX_ a,b)
 #define add_above_Latin1_folds(a,b,c)	S_add_above_Latin1_folds(aTHX_ a,b,c)
@@ -1906,6 +1911,9 @@
 #define pad_findlex(a,b,c,d,e,f,g,h,i)	S_pad_findlex(aTHX_ a,b,c,d,e,f,g,h,i)
 #define pad_reset()		S_pad_reset(aTHX)
 #  endif
+#  if defined(PERL_IN_PAD_C) || defined(PERL_IN_OP_C)
+#define PadnameIN_SCOPE		S_PadnameIN_SCOPE
+#  endif
 #  if defined(PERL_IN_PERL_C)
 #define find_beginning(a,b)	S_find_beginning(aTHX_ a,b)
 #define forbid_setid(a,b)	S_forbid_setid(aTHX_ a,b)
diff --git a/inline.h b/inline.h
index cf813ab1a7..aa4e7b8fdf 100644
--- a/inline.h
+++ b/inline.h
@@ -40,7 +40,7 @@ SOFTWARE.
 /* ------------------------------- av.h ------------------------------- */
 
 PERL_STATIC_INLINE SSize_t
-S_av_top_index(pTHX_ AV *av)
+Perl_av_top_index(pTHX_ AV *av)
 {
     PERL_ARGS_ASSERT_AV_TOP_INDEX;
     assert(SvTYPE(av) == SVt_PVAV);
@@ -51,17 +51,21 @@ S_av_top_index(pTHX_ AV *av)
 /* ------------------------------- cv.h ------------------------------- */
 
 PERL_STATIC_INLINE GV *
-S_CvGV(pTHX_ CV *sv)
+Perl_CvGV(pTHX_ CV *sv)
 {
+    PERL_ARGS_ASSERT_CVGV;
+
     return CvNAMED(sv)
 	? Perl_cvgv_from_hek(aTHX_ sv)
 	: ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_gv_u.xcv_gv;
 }
 
 PERL_STATIC_INLINE I32 *
-S_CvDEPTHp(const CV * const sv)
+Perl_CvDEPTH(const CV * const sv)
 {
+    PERL_ARGS_ASSERT_CVDEPTH;
     assert(SvTYPE(sv) == SVt_PVCV || SvTYPE(sv) == SVt_PVFM);
+
     return &((XPVCV*)SvANY(sv))->xcv_depth;
 }
 
@@ -119,8 +123,10 @@ S_MgBYTEPOS(pTHX_ MAGIC *mg, SV *sv, const char *s, STRLEN len)
 
 #if defined(PERL_IN_PAD_C) || defined(PERL_IN_OP_C)
 PERL_STATIC_INLINE bool
-PadnameIN_SCOPE(const PADNAME * const pn, const U32 seq)
+S_PadnameIN_SCOPE(const PADNAME * const pn, const U32 seq)
 {
+    PERL_ARGS_ASSERT_PADNAMEIN_SCOPE;
+
     /* is seq within the range _LOW to _HIGH ?
      * This is complicated by the fact that PL_cop_seqmax
      * may have wrapped around at some point */
@@ -153,7 +159,7 @@ PadnameIN_SCOPE(const PADNAME * const pn, const U32 seq)
 /* ------------------------------- pp.h ------------------------------- */
 
 PERL_STATIC_INLINE I32
-S_TOPMARK(pTHX)
+Perl_TOPMARK(pTHX)
 {
     DEBUG_s(DEBUG_v(PerlIO_printf(Perl_debug_log,
 				 "MARK top  %p %" IVdf "\n",
@@ -163,7 +169,7 @@ S_TOPMARK(pTHX)
 }
 
 PERL_STATIC_INLINE I32
-S_POPMARK(pTHX)
+Perl_POPMARK(pTHX)
 {
     DEBUG_s(DEBUG_v(PerlIO_printf(Perl_debug_log,
 				 "MARK pop  %p %" IVdf "\n",
@@ -176,10 +182,13 @@ S_POPMARK(pTHX)
 /* ----------------------------- regexp.h ----------------------------- */
 
 PERL_STATIC_INLINE struct regexp *
-S_ReANY(const REGEXP * const re)
+Perl_ReANY(const REGEXP * const re)
 {
     XPV* const p = (XPV*)SvANY(re);
+
+    PERL_ARGS_ASSERT_REANY;
     assert(isREGEXP(re));
+
     return SvTYPE(re) == SVt_PVLV ? p->xpv_len_u.xpvlenu_rx
                                    : (struct regexp *)p;
 }
@@ -187,26 +196,28 @@ S_ReANY(const REGEXP * const re)
 /* ------------------------------- sv.h ------------------------------- */
 
 PERL_STATIC_INLINE SV *
-S_SvREFCNT_inc(SV *sv)
+Perl_SvREFCNT_inc(SV *sv)
 {
     if (LIKELY(sv != NULL))
 	SvREFCNT(sv)++;
     return sv;
 }
 PERL_STATIC_INLINE SV *
-S_SvREFCNT_inc_NN(SV *sv)
+Perl_SvREFCNT_inc_NN(SV *sv)
 {
+    PERL_ARGS_ASSERT_SVREFCNT_INC_NN;
+
     SvREFCNT(sv)++;
     return sv;
 }
 PERL_STATIC_INLINE void
-S_SvREFCNT_inc_void(SV *sv)
+Perl_SvREFCNT_inc_void(SV *sv)
 {
     if (LIKELY(sv != NULL))
 	SvREFCNT(sv)++;
 }
 PERL_STATIC_INLINE void
-S_SvREFCNT_dec(pTHX_ SV *sv)
+Perl_SvREFCNT_dec(pTHX_ SV *sv)
 {
     if (LIKELY(sv != NULL)) {
 	U32 rc = SvREFCNT(sv);
@@ -218,9 +229,12 @@ S_SvREFCNT_dec(pTHX_ SV *sv)
 }
 
 PERL_STATIC_INLINE void
-S_SvREFCNT_dec_NN(pTHX_ SV *sv)
+Perl_SvREFCNT_dec_NN(pTHX_ SV *sv)
 {
     U32 rc = SvREFCNT(sv);
+
+    PERL_ARGS_ASSERT_SVREFCNT_DEC_NN;
+
     if (LIKELY(rc > 1))
 	SvREFCNT(sv) = rc - 1;
     else
@@ -228,26 +242,30 @@ S_SvREFCNT_dec_NN(pTHX_ SV *sv)
 }
 
 PERL_STATIC_INLINE void
-SvAMAGIC_on(SV *sv)
+Perl_SvAMAGIC_on(SV *sv)
 {
+    PERL_ARGS_ASSERT_SVAMAGIC_ON;
     assert(SvROK(sv));
+
     if (SvOBJECT(SvRV(sv))) HvAMAGIC_on(SvSTASH(SvRV(sv)));
 }
 PERL_STATIC_INLINE void
-SvAMAGIC_off(SV *sv)
+Perl_SvAMAGIC_off(SV *sv)
 {
+    PERL_ARGS_ASSERT_SVAMAGIC_OFF;
+
     if (SvROK(sv) && SvOBJECT(SvRV(sv)))
 	HvAMAGIC_off(SvSTASH(SvRV(sv)));
 }
 
 PERL_STATIC_INLINE U32
-S_SvPADSTALE_on(SV *sv)
+Perl_SvPADSTALE_on(SV *sv)
 {
     assert(!(SvFLAGS(sv) & SVs_PADTMP));
     return SvFLAGS(sv) |= SVs_PADSTALE;
 }
 PERL_STATIC_INLINE U32
-S_SvPADSTALE_off(SV *sv)
+Perl_SvPADSTALE_off(SV *sv)
 {
     assert(!(SvFLAGS(sv) & SVs_PADTMP));
     return SvFLAGS(sv) &= ~SVs_PADSTALE;
@@ -271,7 +289,7 @@ S_sv_or_pv_pos_u2b(pTHX_ SV *sv, const char *pv, STRLEN pos, STRLEN *lenp)
 /* saves machine code for a common noreturn idiom typically used in Newx*() */
 GCC_DIAG_IGNORE_DECL(-Wunused-function);
 static void
-S_croak_memory_wrap(void)
+Perl_croak_memory_wrap(void)
 {
     Perl_croak_nocontext("%s",PL_memory_wrap);
 }
@@ -284,7 +302,7 @@ GCC_DIAG_RESTORE_DECL;
 */
 
 PERL_STATIC_INLINE void
-S_append_utf8_from_native_byte(const U8 byte, U8** dest)
+Perl_append_utf8_from_native_byte(const U8 byte, U8** dest)
 {
     /* Takes an input 'byte' (Latin1 or EBCDIC) and appends it to the UTF-8
      * encoded string at '*dest', updating '*dest' to include it */
@@ -301,10 +319,10 @@ S_append_utf8_from_native_byte(const U8 byte, U8** dest)
 
 /*
 =for apidoc valid_utf8_to_uvchr
-Like C<L</utf8_to_uvchr_buf>>, but should only be called when it is known that
-the next character in the input UTF-8 string C<s> is well-formed (I<e.g.>,
-it passes C<L</isUTF8_CHAR>>.  Surrogates, non-character code points, and
-non-Unicode code points are allowed.
+Like C<L<perlapi/utf8_to_uvchr_buf>>, but should only be called when it is
+known that the next character in the input UTF-8 string C<s> is well-formed
+(I<e.g.>, it passes C<L<perlapi/isUTF8_CHAR>>.  Surrogates, non-character code
+points, and non-Unicode code points are allowed.
 
 =cut
 
@@ -394,7 +412,7 @@ UTF-8 invariant, this function does not change the contents of C<*ep>.
 */
 
 PERL_STATIC_INLINE bool
-S_is_utf8_invariant_string_loc(const U8* const s, STRLEN len, const U8 ** ep)
+Perl_is_utf8_invariant_string_loc(const U8* const s, STRLEN len, const U8 ** ep)
 {
     const U8* send;
     const U8* x = s;
@@ -466,7 +484,7 @@ S_is_utf8_invariant_string_loc(const U8* const s, STRLEN len, const U8 ** ep)
 #  if   BYTEORDER == 0x1234 || BYTEORDER == 0x12345678    \
      || BYTEORDER == 0x4321 || BYTEORDER == 0x87654321
 
-                *ep = x + _variant_byte_number(* (PERL_UINTMAX_T *) x);
+                *ep = x + variant_byte_number(* (PERL_UINTMAX_T *) x);
                 assert(*ep >= s && *ep < send);
 
                 return FALSE;
@@ -504,7 +522,7 @@ S_is_utf8_invariant_string_loc(const U8* const s, STRLEN len, const U8 ** ep)
 #ifndef EBCDIC
 
 PERL_STATIC_INLINE unsigned int
-S__variant_byte_number(PERL_UINTMAX_T word)
+Perl_variant_byte_number(PERL_UINTMAX_T word)
 {
 
     /* This returns the position in a word (0..7) of the first variant byte in
@@ -757,7 +775,7 @@ at this low a level.  A valid use case could change that.
 */
 
 PERL_STATIC_INLINE bool
-S_is_utf8_non_invariant_string(const U8* const s, STRLEN len)
+Perl_is_utf8_non_invariant_string(const U8* const s, STRLEN len)
 {
     const U8 * first_variant;
 
@@ -891,7 +909,7 @@ C<L</is_c9strict_utf8_string_loclen>>.
 */
 
 PERL_STATIC_INLINE bool
-S_is_utf8_string_flags(const U8 *s, STRLEN len, const U32 flags)
+Perl_is_utf8_string_flags(const U8 *s, STRLEN len, const U32 flags)
 {
     const U8 * first_variant;
 
@@ -1050,7 +1068,7 @@ documented at the definition of PL_extended_utf8_dfa_tab[].
 */
 
 PERL_STATIC_INLINE Size_t
-S_isUTF8_CHAR(const U8 * const s0, const U8 * const e)
+Perl_isUTF8_CHAR(const U8 * const s0, const U8 * const e)
 {
     const U8 * s = s0;
     UV state = 0;
@@ -1078,7 +1096,7 @@ S_isUTF8_CHAR(const U8 * const s0, const U8 * const e)
 #if defined(UV_IS_QUAD) || defined(EBCDIC)
 
     if (NATIVE_UTF8_TO_I8(*s0) == 0xFF && e - s0 >= UTF8_MAXBYTES) {
-       return _is_utf8_char_helper(s0, e, 0);
+       return is_utf8_char_helper(s0, e, 0);
     }
 
 #endif
@@ -1124,7 +1142,7 @@ documented at the definition of strict_extended_utf8_dfa_tab[].
 */
 
 PERL_STATIC_INLINE Size_t
-S_isSTRICT_UTF8_CHAR(const U8 * const s0, const U8 * const e)
+Perl_isSTRICT_UTF8_CHAR(const U8 * const s0, const U8 * const e)
 {
     const U8 * s = s0;
     UV state = 0;
@@ -1190,7 +1208,7 @@ documented at the definition of PL_c9_utf8_dfa_tab[].
 */
 
 PERL_STATIC_INLINE Size_t
-S_isC9_STRICT_UTF8_CHAR(const U8 * const s0, const U8 * const e)
+Perl_isC9_STRICT_UTF8_CHAR(const U8 * const s0, const U8 * const e)
 {
     const U8 * s = s0;
     UV state = 0;
@@ -1242,7 +1260,7 @@ See also C<L</is_strict_utf8_string_loc>>.
 */
 
 PERL_STATIC_INLINE bool
-S_is_strict_utf8_string_loclen(const U8 *s, STRLEN len, const U8 **ep, STRLEN *el)
+Perl_is_strict_utf8_string_loclen(const U8 *s, STRLEN len, const U8 **ep, STRLEN *el)
 {
     const U8 * first_variant;
 
@@ -1319,7 +1337,7 @@ See also C<L</is_c9strict_utf8_string_loc>>.
 */
 
 PERL_STATIC_INLINE bool
-S_is_c9strict_utf8_string_loclen(const U8 *s, STRLEN len, const U8 **ep, STRLEN *el)
+Perl_is_c9strict_utf8_string_loclen(const U8 *s, STRLEN len, const U8 **ep, STRLEN *el)
 {
     const U8 * first_variant;
 
@@ -1401,7 +1419,7 @@ See also C<L</is_utf8_string_loc_flags>>.
 */
 
 PERL_STATIC_INLINE bool
-S_is_utf8_string_loclen_flags(const U8 *s, STRLEN len, const U8 **ep, STRLEN *el, const U32 flags)
+Perl_is_utf8_string_loclen_flags(const U8 *s, STRLEN len, const U8 **ep, STRLEN *el, const U32 flags)
 {
     const U8 * first_variant;
 
@@ -1691,7 +1709,7 @@ determined from just the first one or two bytes.
  */
 
 PERL_STATIC_INLINE bool
-S_is_utf8_valid_partial_char_flags(const U8 * const s, const U8 * const e, const U32 flags)
+Perl_is_utf8_valid_partial_char_flags(const U8 * const s, const U8 * const e, const U32 flags)
 {
     PERL_ARGS_ASSERT_IS_UTF8_VALID_PARTIAL_CHAR_FLAGS;
 
@@ -1702,7 +1720,7 @@ S_is_utf8_valid_partial_char_flags(const U8 * const s, const U8 * const e, const
         return FALSE;
     }
 
-    return cBOOL(_is_utf8_char_helper(s, e, flags));
... 3906 lines suppressed ...

-- 
Perl5 Master Repository



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About