This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
embed.fnc: Restrict access to non-public functions
[perl5.git] / proto.h
diff --git a/proto.h b/proto.h
index 0544378..43f87d1 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -640,7 +640,13 @@ PERL_CALLCONV_NO_RET void  Perl_croak(pTHX_ const char* pat, ...)
                        __attribute__noreturn__
                        __attribute__format__null_ok__(__printf__,pTHX_1,pTHX_2);
 
-PERL_CALLCONV_NO_RET void      Perl_croak_no_modify(pTHX)
+PERL_STATIC_NO_RET void        S_croak_memory_wrap(void)
+                       __attribute__noreturn__;
+
+PERL_CALLCONV_NO_RET void      Perl_croak_no_mem(void)
+                       __attribute__noreturn__;
+
+PERL_CALLCONV_NO_RET void      Perl_croak_no_modify(void)
                        __attribute__noreturn__;
 
 PERL_CALLCONV_NO_RET void      Perl_croak_sv(pTHX_ SV *baseex)
@@ -649,10 +655,10 @@ PERL_CALLCONV_NO_RET void Perl_croak_sv(pTHX_ SV *baseex)
 #define PERL_ARGS_ASSERT_CROAK_SV      \
        assert(baseex)
 
-PERL_CALLCONV_NO_RET void      Perl_croak_xs_usage(pTHX_ const CV *const cv, const char *const params)
+PERL_CALLCONV_NO_RET void      Perl_croak_xs_usage(const CV *const cv, const char *const params)
                        __attribute__noreturn__
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
+                       __attribute__nonnull__(1)
+                       __attribute__nonnull__(2);
 #define PERL_ARGS_ASSERT_CROAK_XS_USAGE        \
        assert(cv); assert(params)
 
@@ -691,6 +697,12 @@ PERL_CALLCONV CV*  Perl_cv_clone(pTHX_ CV* proto)
 #define PERL_ARGS_ASSERT_CV_CLONE      \
        assert(proto)
 
+PERL_CALLCONV CV*      Perl_cv_clone_into(pTHX_ CV* proto, CV *target)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_CV_CLONE_INTO \
+       assert(proto); assert(target)
+
 PERL_CALLCONV SV*      Perl_cv_const_sv(pTHX_ const CV *const cv)
                        __attribute__warn_unused_result__;
 
@@ -1117,8 +1129,10 @@ PERL_CALLCONV void       Perl_get_db_sub(pTHX_ SV **svp, CV *cv)
 #define PERL_ARGS_ASSERT_GET_DB_SUB    \
        assert(cv)
 
-PERL_CALLCONV UV       Perl_get_hash_seed(pTHX)
-                       __attribute__warn_unused_result__;
+PERL_CALLCONV void     Perl_get_hash_seed(pTHX_ unsigned char *seed_buffer)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_GET_HASH_SEED \
+       assert(seed_buffer)
 
 PERL_CALLCONV HV*      Perl_get_hv(pTHX_ const char *name, I32 flags)
                        __attribute__nonnull__(pTHX_1);
@@ -1764,60 +1778,6 @@ PERL_CALLCONV bool       Perl_is_uni_xdigit_lc(pTHX_ UV c)
                        __attribute__warn_unused_result__
                        __attribute__pure__;
 
-PERL_CALLCONV bool     Perl_is_utf8_X_L(pTHX_ const U8 *p)
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_IS_UTF8_X_L   \
-       assert(p)
-
-PERL_CALLCONV bool     Perl_is_utf8_X_LVT(pTHX_ const U8 *p)
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_IS_UTF8_X_LVT \
-       assert(p)
-
-PERL_CALLCONV bool     Perl_is_utf8_X_LV_LVT_V(pTHX_ const U8 *p)
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_IS_UTF8_X_LV_LVT_V    \
-       assert(p)
-
-PERL_CALLCONV bool     Perl_is_utf8_X_T(pTHX_ const U8 *p)
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_IS_UTF8_X_T   \
-       assert(p)
-
-PERL_CALLCONV bool     Perl_is_utf8_X_V(pTHX_ const U8 *p)
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_IS_UTF8_X_V   \
-       assert(p)
-
-PERL_CALLCONV bool     Perl_is_utf8_X_begin(pTHX_ const U8 *p)
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_IS_UTF8_X_BEGIN       \
-       assert(p)
-
-PERL_CALLCONV bool     Perl_is_utf8_X_extend(pTHX_ const U8 *p)
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_IS_UTF8_X_EXTEND      \
-       assert(p)
-
-PERL_CALLCONV bool     Perl_is_utf8_X_non_hangul(pTHX_ const U8 *p)
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_IS_UTF8_X_NON_HANGUL  \
-       assert(p)
-
-PERL_CALLCONV bool     Perl_is_utf8_X_prepend(pTHX_ const U8 *p)
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_IS_UTF8_X_PREPEND     \
-       assert(p)
-
 PERL_CALLCONV bool     Perl_is_utf8_alnum(pTHX_ const U8 *p)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -2188,12 +2148,6 @@ PERL_CALLCONV int        Perl_magic_killbackrefs(pTHX_ SV *sv, MAGIC *mg)
 #define PERL_ARGS_ASSERT_MAGIC_KILLBACKREFS    \
        assert(sv); assert(mg)
 
-PERL_CALLCONV U32      Perl_magic_len(pTHX_ SV* sv, MAGIC* mg)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
-#define PERL_ARGS_ASSERT_MAGIC_LEN     \
-       assert(sv); assert(mg)
-
 PERL_CALLCONV SV*      Perl_magic_methcall(pTHX_ SV *sv, const MAGIC *mg, const char *meth, U32 flags, U32 argc, ...)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
@@ -2408,6 +2362,7 @@ PERL_CALLCONV int Perl_mg_get(pTHX_ SV* sv)
        assert(sv)
 
 PERL_CALLCONV U32      Perl_mg_length(pTHX_ SV* sv)
+                       __attribute__deprecated__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_MG_LENGTH     \
        assert(sv)
@@ -2686,6 +2641,11 @@ PERL_CALLCONV OP*        Perl_newLOOPOP(pTHX_ I32 flags, I32 debuggable, OP* expr, OP*
                        __attribute__malloc__
                        __attribute__warn_unused_result__;
 
+PERL_CALLCONV CV *     Perl_newMYSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_NEWMYSUB      \
+       assert(o)
+
 PERL_CALLCONV OP*      Perl_newNULLLIST(pTHX)
                        __attribute__malloc__
                        __attribute__warn_unused_result__;
@@ -3011,7 +2971,7 @@ PERL_CALLCONV void        Perl_pad_fixup_inner_anons(pTHX_ PADLIST *padlist, CV *old_cv
        assert(padlist); assert(old_cv); assert(new_cv)
 
 PERL_CALLCONV void     Perl_pad_free(pTHX_ PADOFFSET po);
-PERL_CALLCONV void     Perl_pad_leavemy(pTHX);
+PERL_CALLCONV OP *     Perl_pad_leavemy(pTHX);
 PERL_CALLCONV PADLIST* Perl_pad_new(pTHX_ int flags)
                        __attribute__malloc__
                        __attribute__warn_unused_result__;
@@ -4019,6 +3979,11 @@ PERL_CALLCONV IV Perl_sv_iv(pTHX_ SV* sv)
 
 PERL_CALLCONV STRLEN   Perl_sv_len(pTHX_ SV *const sv);
 PERL_CALLCONV STRLEN   Perl_sv_len_utf8(pTHX_ SV *const sv);
+PERL_CALLCONV STRLEN   Perl_sv_len_utf8_nomg(pTHX_ SV *const sv)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_SV_LEN_UTF8_NOMG      \
+       assert(sv)
+
 PERL_CALLCONV void     Perl_sv_magic(pTHX_ SV *const sv, SV *const obj, const int how, const char *const name, const I32 namlen)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_SV_MAGIC      \
@@ -4029,7 +3994,11 @@ PERL_CALLCONV MAGIC *    Perl_sv_magicext(pTHX_ SV *const sv, SV *const obj, const
 #define PERL_ARGS_ASSERT_SV_MAGICEXT   \
        assert(sv)
 
-PERL_CALLCONV SV*      Perl_sv_mortalcopy(pTHX_ SV *const oldsv)
+/* PERL_CALLCONV SV*   Perl_sv_mortalcopy(pTHX_ SV *const oldsv)
+                       __attribute__malloc__
+                       __attribute__warn_unused_result__; */
+
+PERL_CALLCONV SV*      Perl_sv_mortalcopy_flags(pTHX_ SV *const oldsv, U32 flags)
                        __attribute__malloc__
                        __attribute__warn_unused_result__;
 
@@ -4150,6 +4119,7 @@ PERL_CALLCONV void        Perl_sv_reset(pTHX_ const char* s, HV *const stash)
 #define PERL_ARGS_ASSERT_SV_RESET      \
        assert(s)
 
+PERL_CALLCONV void     Perl_sv_resetpvn(pTHX_ const char* s, STRLEN len, HV *const stash);
 PERL_CALLCONV SV*      Perl_sv_rvweaken(pTHX_ SV *const sv)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_SV_RVWEAKEN   \
@@ -4862,9 +4832,6 @@ PERL_CALLCONV void*       Perl_my_cxt_init(pTHX_ int *index, size_t size)
 #endif
 #if !(defined(PERL_MAD))
 PERL_CALLCONV void     Perl_newFORM(pTHX_ I32 floor, OP* o, OP* block);
-PERL_CALLCONV_NO_RET void      Perl_newMYSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
-                       __attribute__noreturn__;
-
 PERL_CALLCONV void     Perl_package(pTHX_ OP* o)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_PACKAGE       \
@@ -5253,17 +5220,14 @@ PERL_CALLCONV MEM_SIZE  Perl_malloced_size(void *p)
 #endif
 #if defined(MYSWAP)
 PERL_CALLCONV long     Perl_my_htonl(pTHX_ long l)
-                       __attribute__malloc__
                        __attribute__warn_unused_result__
                        __attribute__pure__;
 
 PERL_CALLCONV long     Perl_my_ntohl(pTHX_ long l)
-                       __attribute__malloc__
                        __attribute__warn_unused_result__
                        __attribute__pure__;
 
 PERL_CALLCONV short    Perl_my_swap(pTHX_ short s)
-                       __attribute__malloc__
                        __attribute__warn_unused_result__
                        __attribute__pure__;
 
@@ -5287,12 +5251,23 @@ PERL_CALLCONV void      Perl_opslab_free_nopad(pTHX_ OPSLAB *slab)
 #define PERL_ARGS_ASSERT_OPSLAB_FREE_NOPAD     \
        assert(slab)
 
+PERL_CALLCONV void     Perl_parser_free_nexttoke_ops(pTHX_ yy_parser *parser, OPSLAB *slab)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_PARSER_FREE_NEXTTOKE_OPS      \
+       assert(parser); assert(slab)
+
 #  if defined(PERL_DEBUG_READONLY_OPS)
 PERL_CALLCONV void     Perl_Slab_to_ro(pTHX_ OPSLAB *slab)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_SLAB_TO_RO    \
        assert(slab)
 
+PERL_CALLCONV void     Perl_Slab_to_rw(pTHX_ OPSLAB *const slab)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_SLAB_TO_RW    \
+       assert(slab)
+
 #  endif
 #endif
 #if defined(PERL_CR_FILTER)
@@ -5312,13 +5287,6 @@ PERL_CALLCONV PADOFFSET  Perl_op_refcnt_dec(pTHX_ OP *o)
        assert(o)
 
 PERL_CALLCONV OP *     Perl_op_refcnt_inc(pTHX_ OP *o);
-#  if defined(PERL_IN_OP_C)
-STATIC void    S_Slab_to_rw(pTHX_ void *op)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_SLAB_TO_RW    \
-       assert(op)
-
-#  endif
 #endif
 #if defined(PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION)
 /* PERL_CALLCONV bool  Perl_do_exec(pTHX_ const char* cmd)
@@ -5596,11 +5564,6 @@ PERL_CALLCONV void       Perl_hv_kill_backrefs(pTHX_ HV *hv)
 
 #endif
 #if defined(PERL_IN_GV_C)
-STATIC HV*     S_gv_get_super_pkg(pTHX_ const char* name, I32 namelen, U32 flags)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_GV_GET_SUPER_PKG      \
-       assert(name)
-
 STATIC void    S_gv_init_svtype(pTHX_ GV *gv, const svtype sv_type)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_GV_INIT_SVTYPE        \
@@ -5662,7 +5625,7 @@ STATIC void       S_hv_magic_check(HV *hv, bool *needs_copy, bool *needs_store)
 #define PERL_ARGS_ASSERT_HV_MAGIC_CHECK        \
        assert(hv); assert(needs_copy); assert(needs_store)
 
-STATIC void    S_hv_notallowed(pTHX_ int flags, const char *key, I32 klen, const char *msg)
+PERL_STATIC_NO_RET void        S_hv_notallowed(pTHX_ int flags, const char *key, I32 klen, const char *msg)
                        __attribute__noreturn__
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_4);
@@ -5773,7 +5736,7 @@ STATIC NV S_mulexp10(NV value, I32 exponent);
 #endif
 #if defined(PERL_IN_OP_C)
 PERL_STATIC_INLINE bool        S_aassign_common_vars(pTHX_ OP* o);
-STATIC void    S_apply_attrs(pTHX_ HV *stash, SV *target, OP *attrs, bool for_my)
+STATIC void    S_apply_attrs(pTHX_ HV *stash, SV *target, OP *attrs)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT_APPLY_ATTRS   \
@@ -5894,11 +5857,6 @@ PERL_STATIC_INLINE OP*   S_op_std_init(pTHX_ OP *o)
 #define PERL_ARGS_ASSERT_OP_STD_INIT   \
        assert(o)
 
-STATIC OP*     S_opt_scalarhv(pTHX_ OP* rep_op)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_OPT_SCALARHV  \
-       assert(rep_op)
-
 STATIC OP*     S_pmtrans(pTHX_ OP* o, OP* expr, OP* repl)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
@@ -5906,10 +5864,10 @@ STATIC OP*      S_pmtrans(pTHX_ OP* o, OP* expr, OP* repl)
 #define PERL_ARGS_ASSERT_PMTRANS       \
        assert(o); assert(expr); assert(repl)
 
-STATIC void    S_process_special_blocks(pTHX_ const char *const fullname, GV *const gv, CV *const cv)
-                       __attribute__nonnull__(pTHX_1)
+STATIC void    S_process_special_blocks(pTHX_ I32 floor, const char *const fullname, GV *const gv, CV *const cv)
                        __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3);
+                       __attribute__nonnull__(pTHX_3)
+                       __attribute__nonnull__(pTHX_4);
 #define PERL_ARGS_ASSERT_PROCESS_SPECIAL_BLOCKS        \
        assert(fullname); assert(gv); assert(cv)
 
@@ -6033,10 +5991,10 @@ STATIC SV*      S_mayberelocate(pTHX_ const char *const dir, STRLEN len, U32 flags)
 #define PERL_ARGS_ASSERT_MAYBERELOCATE \
        assert(dir)
 
-STATIC void    S_minus_v(pTHX)
+PERL_STATIC_NO_RET void        S_minus_v(pTHX)
                        __attribute__noreturn__;
 
-STATIC void    S_my_exit_jump(pTHX)
+PERL_STATIC_NO_RET void        S_my_exit_jump(pTHX)
                        __attribute__noreturn__;
 
 STATIC void    S_nuke_stacks(pTHX);
@@ -6047,10 +6005,10 @@ STATIC PerlIO * S_open_script(pTHX_ const char *scriptname, bool dosearch, bool
        assert(scriptname); assert(suidscript)
 
 STATIC void*   S_parse_body(pTHX_ char **env, XSINIT_t xsinit);
-STATIC void    S_run_body(pTHX_ I32 oldscope)
+PERL_STATIC_NO_RET void        S_run_body(pTHX_ I32 oldscope)
                        __attribute__noreturn__;
 
-STATIC void    S_usage(pTHX)
+PERL_STATIC_NO_RET void        S_usage(pTHX)
                        __attribute__noreturn__;
 
 #endif
@@ -6377,12 +6335,6 @@ STATIC SV*       S__new_invlist_C_array(pTHX_ UV* list)
 #define PERL_ARGS_ASSERT__NEW_INVLIST_C_ARRAY  \
        assert(list)
 
-STATIC void    S_add_alternate(pTHX_ AV** alternate_ptr, U8* string, STRLEN len)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
-#define PERL_ARGS_ASSERT_ADD_ALTERNATE \
-       assert(alternate_ptr); assert(string)
-
 PERL_STATIC_INLINE SV* S_add_cp_to_invlist(pTHX_ SV* invlist, const UV cp)
                        __attribute__warn_unused_result__;
 
@@ -6400,11 +6352,6 @@ PERL_STATIC_INLINE void  S_alloc_maybe_populate_EXACT(pTHX_ struct RExC_state_t *
 #define PERL_ARGS_ASSERT_ALLOC_MAYBE_POPULATE_EXACT    \
        assert(pRExC_state); assert(node); assert(flagp)
 
-STATIC void    S_checkposixcc(pTHX_ struct RExC_state_t *pRExC_state)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_CHECKPOSIXCC  \
-       assert(pRExC_state)
-
 STATIC void    S_cl_and(struct regnode_charclass_class *cl, const struct regnode_charclass_class *and_with)
                        __attribute__nonnull__(1)
                        __attribute__nonnull__(2);
@@ -6563,7 +6510,7 @@ STATIC char *     S_nextchar(pTHX_ struct RExC_state_t *pRExC_state)
 #define PERL_ARGS_ASSERT_NEXTCHAR      \
        assert(pRExC_state)
 
-STATIC void    S_re_croak2(pTHX_ const char* pat1, const char* pat2, ...)
+PERL_STATIC_NO_RET void        S_re_croak2(pTHX_ const char* pat1, const char* pat2, ...)
                        __attribute__noreturn__
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
@@ -6631,7 +6578,7 @@ STATIC regnode*   S_regpiece(pTHX_ struct RExC_state_t *pRExC_state, I32 *flagp, U
 #define PERL_ARGS_ASSERT_REGPIECE      \
        assert(pRExC_state); assert(flagp)
 
-STATIC I32     S_regpposixcc(pTHX_ struct RExC_state_t *pRExC_state, I32 value)
+PERL_STATIC_INLINE I32 S_regpposixcc(pTHX_ struct RExC_state_t *pRExC_state, I32 value, SV *free_me)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_REGPPOSIXCC   \
        assert(pRExC_state)
@@ -6674,13 +6621,6 @@ STATIC I32       S_study_chunk(pTHX_ struct RExC_state_t *pRExC_state, regnode **scanp
 
 #endif
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C)
-PERL_CALLCONV SV*      Perl__core_swash_init(pTHX_ const char* pkg, const char* name, SV* listsv, I32 minbits, I32 none, SV* invlist, U8* const flags_p)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3);
-#define PERL_ARGS_ASSERT__CORE_SWASH_INIT      \
-       assert(pkg); assert(name); assert(listsv)
-
 PERL_STATIC_INLINE UV* S__get_invlist_len_addr(pTHX_ SV* invlist)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -6717,6 +6657,21 @@ PERL_CALLCONV IV Perl__invlist_search(pTHX_ SV* const invlist, const UV cp)
 #define PERL_ARGS_ASSERT__INVLIST_SEARCH       \
        assert(invlist)
 
+PERL_CALLCONV HV*      Perl__swash_inversion_hash(pTHX_ SV* const swash)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT__SWASH_INVERSION_HASH \
+       assert(swash)
+
+#endif
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C) || defined(PERL_IN_TOKE_C)
+PERL_CALLCONV SV*      Perl__core_swash_init(pTHX_ const char* pkg, const char* name, SV* listsv, I32 minbits, I32 none, SV* invlist, U8* const flags_p)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3);
+#define PERL_ARGS_ASSERT__CORE_SWASH_INIT      \
+       assert(pkg); assert(name); assert(listsv)
+
 #endif
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_UTF8_C)
 PERL_CALLCONV SV*      Perl__add_range_to_invlist(pTHX_ SV* invlist, const UV start, const UV end)
@@ -6767,12 +6722,6 @@ PERL_CALLCONV void       Perl__invlist_union_maybe_complement_2nd(pTHX_ SV* const a, S
 PERL_CALLCONV SV*      Perl__new_invlist(pTHX_ IV initial_size)
                        __attribute__warn_unused_result__;
 
-PERL_CALLCONV HV*      Perl__swash_inversion_hash(pTHX_ SV* const swash)
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT__SWASH_INVERSION_HASH \
-       assert(swash)
-
 PERL_CALLCONV SV*      Perl__swash_to_invlist(pTHX_ SV* const swash)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -6781,7 +6730,7 @@ PERL_CALLCONV SV* Perl__swash_to_invlist(pTHX_ SV* const swash)
 
 #endif
 #if defined(PERL_IN_REGEXEC_C)
-STATIC SV*     S_core_regclass_swash(pTHX_ const regexp *prog, const struct regnode *node, bool doinit, SV **listsvp, SV **altsvp)
+STATIC SV*     S_core_regclass_swash(pTHX_ const regexp *prog, const struct regnode *node, bool doinit, SV **listsvp)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT_CORE_REGCLASS_SWASH   \
@@ -6796,6 +6745,12 @@ STATIC char*     S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s, cons
 #define PERL_ARGS_ASSERT_FIND_BYCLASS  \
        assert(prog); assert(c); assert(s); assert(strend)
 
+PERL_STATIC_INLINE bool        S_is_utf8_X_LVT(pTHX_ const U8 *p)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_IS_UTF8_X_LVT \
+       assert(p)
+
 STATIC I32     S_reg_check_named_buff_matched(pTHX_ const regexp *rex, const regnode *scan)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1)
@@ -6827,35 +6782,37 @@ STATIC U8*      S_reghopmaybe3(U8 *s, I32 off, const U8 *lim)
 #define PERL_ARGS_ASSERT_REGHOPMAYBE3  \
        assert(s); assert(lim)
 
-STATIC bool    S_reginclass(pTHX_ const regexp * const prog, const regnode * const n, const U8 * const p, STRLEN *lenp, bool const do_utf8sv_is_utf8)
+STATIC bool    S_reginclass(pTHX_ const regexp * const prog, const regnode * const n, const U8 * const p, bool const utf8_target)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
 #define PERL_ARGS_ASSERT_REGINCLASS    \
        assert(n); assert(p)
 
-STATIC I32     S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog)
+STATIC I32     S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3);
 #define PERL_ARGS_ASSERT_REGMATCH      \
-       assert(reginfo); assert(prog)
+       assert(reginfo); assert(startpos); assert(prog)
 
-STATIC I32     S_regrepeat(pTHX_ const regexp *prog, const regnode *p, I32 max, int depth)
+STATIC I32     S_regrepeat(pTHX_ const regexp *prog, char **startposp, const regnode *p, I32 max, int depth)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3);
 #define PERL_ARGS_ASSERT_REGREPEAT     \
-       assert(prog); assert(p)
+       assert(prog); assert(startposp); assert(p)
 
-STATIC I32     S_regtry(pTHX_ regmatch_info *reginfo, char **startpos)
+STATIC I32     S_regtry(pTHX_ regmatch_info *reginfo, char **startposp)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT_REGTRY        \
-       assert(reginfo); assert(startpos)
+       assert(reginfo); assert(startposp)
 
-STATIC void    S_to_byte_substr(pTHX_ regexp * prog)
+STATIC bool    S_to_byte_substr(pTHX_ regexp * prog)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_TO_BYTE_SUBSTR        \
        assert(prog)
@@ -7086,6 +7043,7 @@ STATIC void       S_force_ident(pTHX_ const char *s, int kind)
 #define PERL_ARGS_ASSERT_FORCE_IDENT   \
        assert(s)
 
+STATIC void    S_force_ident_maybe_lex(pTHX_ char pit);
 STATIC void    S_force_next(pTHX_ I32 type);
 STATIC char*   S_force_strict_version(pTHX_ char *s)
                        __attribute__nonnull__(pTHX_1);
@@ -7102,6 +7060,13 @@ STATIC char*     S_force_word(pTHX_ char *start, int token, int check_keyword, int a
 #define PERL_ARGS_ASSERT_FORCE_WORD    \
        assert(start)
 
+PERL_STATIC_INLINE SV* S_get_and_check_backslash_N_name(pTHX_ const char* s, const char* const e)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_GET_AND_CHECK_BACKSLASH_N_NAME        \
+       assert(s); assert(e)
+
 STATIC void    S_incline(pTHX_ const char *s)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_INCLINE       \
@@ -7122,7 +7087,7 @@ STATIC I32        S_lop(pTHX_ I32 f, int x, char *s)
 #define PERL_ARGS_ASSERT_LOP   \
        assert(s)
 
-STATIC void    S_missingterm(pTHX_ char *s)
+PERL_STATIC_NO_RET void        S_missingterm(pTHX_ char *s)
                        __attribute__noreturn__;
 
 STATIC SV*     S_new_constant(pTHX_ const char *s, STRLEN len, const char *key, STRLEN keylen, SV *sv, SV *pv, const char *type, STRLEN typelen)
@@ -7136,6 +7101,7 @@ STATIC void       S_no_op(pTHX_ const char *const what, char *s)
 #define PERL_ARGS_ASSERT_NO_OP \
        assert(what)
 
+STATIC int     S_pending_ident(pTHX);
 STATIC void    S_readpipe_override(pTHX);
 STATIC char*   S_scan_const(pTHX_ char *start)
                        __attribute__warn_unused_result__
@@ -7299,12 +7265,6 @@ STATIC U8        S_to_lower_latin1(pTHX_ const U8 c, U8 *p, STRLEN *lenp)
 
 #endif
 #if defined(PERL_IN_UTF8_C) || defined(PERL_IN_PP_C)
-PERL_CALLCONV bool     Perl__is_utf8_quotemeta(pTHX_ const U8 *p)
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT__IS_UTF8_QUOTEMETA    \
-       assert(p)
-
 PERL_CALLCONV UV       Perl__to_upper_title_latin1(pTHX_ const U8 c, U8 *p, STRLEN *lenp, const char S_or_s)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
@@ -7319,6 +7279,18 @@ PERL_CALLCONV UV Perl__to_fold_latin1(pTHX_ const U8 c, U8 *p, STRLEN *lenp, con
 #define PERL_ARGS_ASSERT__TO_FOLD_LATIN1       \
        assert(p); assert(lenp)
 
+PERL_CALLCONV bool     Perl_is_utf8_X_extend(pTHX_ const U8 *p)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_IS_UTF8_X_EXTEND      \
+       assert(p)
+
+PERL_CALLCONV bool     Perl_is_utf8_X_regular_begin(pTHX_ const U8 *p)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_IS_UTF8_X_REGULAR_BEGIN       \
+       assert(p)
+
 #endif
 #if defined(PERL_IN_UTIL_C)
 STATIC bool    S_ckwarn_common(pTHX_ U32 w);
@@ -7334,9 +7306,6 @@ STATIC SV *       S_with_queued_errors(pTHX_ SV *ex)
 #define PERL_ARGS_ASSERT_WITH_QUEUED_ERRORS    \
        assert(ex)
 
-STATIC char *  S_write_no_mem(pTHX)
-                       __attribute__noreturn__;
-
 #  if defined(PERL_MEM_LOG) && !defined(PERL_MEM_LOG_NOIMPL)
 STATIC void    S_mem_log_common(enum mem_log_type mlt, const UV n, const UV typesize, const char *type_name, const SV *sv, Malloc_t oldalloc, Malloc_t newalloc, const char *filename, const int linenumber, const char *funcname)
                        __attribute__nonnull__(4)
@@ -7370,9 +7339,6 @@ PERL_CALLCONV MADPROP*    Perl_newMADsv(pTHX_ char key, SV* sv)
 #define PERL_ARGS_ASSERT_NEWMADSV      \
        assert(sv)
 
-PERL_CALLCONV_NO_RET OP *      Perl_newMYSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
-                       __attribute__noreturn__;
-
 PERL_CALLCONV TOKEN*   Perl_newTOKEN(pTHX_ I32 optype, YYSTYPE lval, MADPROP* madprop);
 PERL_CALLCONV void     Perl_op_getmad(pTHX_ OP* from, OP* o, char slot);
 PERL_CALLCONV void     Perl_op_getmad_weak(pTHX_ OP* from, OP* o, char slot);
@@ -7774,6 +7740,14 @@ PERL_CALLCONV SSize_t    Perl_PerlIO_write(pTHX_ PerlIO *f, const void *vbuf, Size_
        assert(vbuf)
 
 #endif
+#if defined(WIN32)
+PERL_CALLCONV_NO_RET void      win32_croak_not_implemented(const char * fname)
+                       __attribute__noreturn__
+                       __attribute__nonnull__(1);
+#define PERL_ARGS_ASSERT_WIN32_CROAK_NOT_IMPLEMENTED   \
+       assert(fname)
+
+#endif
 #if defined(WIN32) || defined(__SYMBIAN32__) || defined(VMS)
 PERL_CALLCONV int      Perl_do_aspawn(pTHX_ SV* really, SV** mark, SV** sp)
                        __attribute__nonnull__(pTHX_2)