This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Refactor \x processing to single function
[perl5.git] / proto.h
diff --git a/proto.h b/proto.h
index d324314..3188170 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -29,18 +29,36 @@ PERL_CALLCONV bool  Perl__is_utf8__perl_idstart(pTHX_ const U8 *p)
 #define PERL_ARGS_ASSERT__IS_UTF8__PERL_IDSTART        \
        assert(p)
 
-PERL_CALLCONV UV       Perl__to_uni_fold_flags(pTHX_ UV c, U8 *p, STRLEN *lenp, U8 flags)
+PERL_CALLCONV UV       Perl__to_uni_fold_flags(pTHX_ UV c, U8 *p, STRLEN *lenp, const U8 flags)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
 #define PERL_ARGS_ASSERT__TO_UNI_FOLD_FLAGS    \
        assert(p); assert(lenp)
 
-PERL_CALLCONV UV       Perl__to_utf8_fold_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, U8 flags)
+PERL_CALLCONV UV       Perl__to_utf8_fold_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, U8 flags, bool* tainted_ptr)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT__TO_UTF8_FOLD_FLAGS   \
        assert(p); assert(ustrp)
 
+PERL_CALLCONV UV       Perl__to_utf8_lower_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, const bool flags, bool* tainted_ptr)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT__TO_UTF8_LOWER_FLAGS  \
+       assert(p); assert(ustrp)
+
+PERL_CALLCONV UV       Perl__to_utf8_title_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, const bool flags, bool* tainted_ptr)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT__TO_UTF8_TITLE_FLAGS  \
+       assert(p); assert(ustrp)
+
+PERL_CALLCONV UV       Perl__to_utf8_upper_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, const bool flags, bool* tainted_ptr)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT__TO_UTF8_UPPER_FLAGS  \
+       assert(p); assert(ustrp)
+
 PERL_CALLCONV PADOFFSET        Perl_allocmy(pTHX_ const char *const name, const STRLEN len, const U32 flags)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_ALLOCMY       \
@@ -57,6 +75,7 @@ PERL_CALLCONV SV *    Perl_amagic_deref_call(pTHX_ SV *ref, int method)
 #define PERL_ARGS_ASSERT_AMAGIC_DEREF_CALL     \
        assert(ref)
 
+PERL_CALLCONV bool     Perl_amagic_is_enabled(pTHX_ int method);
 PERL_CALLCONV I32      Perl_apply(pTHX_ I32 type, SV** mark, SV** sp)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
@@ -556,6 +575,12 @@ PERL_CALLCONV OP * Perl_ck_svconst(pTHX_ OP *o)
 #define PERL_ARGS_ASSERT_CK_SVCONST    \
        assert(o)
 
+PERL_CALLCONV OP *     Perl_ck_tell(pTHX_ OP *o)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_CK_TELL       \
+       assert(o)
+
 PERL_CALLCONV OP *     Perl_ck_trunc(pTHX_ OP *o)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -621,6 +646,7 @@ PERL_CALLCONV void  Perl_croak_xs_usage(pTHX_ const CV *const cv, const char *con
 #define PERL_ARGS_ASSERT_CROAK_XS_USAGE        \
        assert(cv); assert(params)
 
+PERL_CALLCONV regexp_engine const *    Perl_current_re_engine(pTHX);
 PERL_CALLCONV const char *     Perl_custom_op_desc(pTHX_ const OP *o)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -868,7 +894,7 @@ PERL_CALLCONV I32   Perl_do_trans(pTHX_ SV* sv)
 #define PERL_ARGS_ASSERT_DO_TRANS      \
        assert(sv)
 
-PERL_CALLCONV UV       Perl_do_vecget(pTHX_ SV* sv, I32 offset, I32 size)
+PERL_CALLCONV UV       Perl_do_vecget(pTHX_ SV* sv, SSize_t offset, int size)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_DO_VECGET     \
        assert(sv)
@@ -1794,10 +1820,17 @@ PERL_CALLCONV bool      Perl_is_utf8_ascii(pTHX_ const U8 *p)
        assert(p)
 
 PERL_CALLCONV STRLEN   Perl_is_utf8_char(const U8 *s)
+                       __attribute__deprecated__
                        __attribute__nonnull__(1);
 #define PERL_ARGS_ASSERT_IS_UTF8_CHAR  \
        assert(s)
 
+PERL_CALLCONV STRLEN   Perl_is_utf8_char_buf(const U8 *buf, const U8 *buf_end)
+                       __attribute__nonnull__(1)
+                       __attribute__nonnull__(2);
+#define PERL_ARGS_ASSERT_IS_UTF8_CHAR_BUF      \
+       assert(buf); assert(buf_end)
+
 PERL_CALLCONV bool     Perl_is_utf8_cntrl(pTHX_ const U8 *p)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -1881,7 +1914,7 @@ PERL_CALLCONV bool        Perl_is_utf8_string(const U8 *s, STRLEN len)
 #define PERL_ARGS_ASSERT_IS_UTF8_STRING        \
        assert(s)
 
-/* PERL_CALLCONV bool  Perl_is_utf8_string_loc(const U8 *s, STRLEN len, const U8 **p)
+/* PERL_CALLCONV bool  Perl_is_utf8_string_loc(const U8 *s, STRLEN len, const U8 **ep)
                        __attribute__nonnull__(1); */
 #define PERL_ARGS_ASSERT_IS_UTF8_STRING_LOC    \
        assert(s)
@@ -2028,6 +2061,13 @@ PERL_CALLCONV int        Perl_magic_clearsig(pTHX_ SV* sv, MAGIC* mg)
 #define PERL_ARGS_ASSERT_MAGIC_CLEARSIG        \
        assert(sv); assert(mg)
 
+PERL_CALLCONV int      Perl_magic_copycallchecker(pTHX_ SV* sv, MAGIC *mg, SV *nsv, const char *name, I32 namlen)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3);
+#define PERL_ARGS_ASSERT_MAGIC_COPYCALLCHECKER \
+       assert(sv); assert(mg); assert(nsv)
+
 PERL_CALLCONV void     Perl_magic_dump(pTHX_ const MAGIC *mg);
 PERL_CALLCONV int      Perl_magic_existspack(pTHX_ SV* sv, const MAGIC* mg)
                        __attribute__nonnull__(pTHX_1)
@@ -2176,12 +2216,6 @@ PERL_CALLCONV int        Perl_magic_set_all_env(pTHX_ SV* sv, MAGIC* mg)
 #define PERL_ARGS_ASSERT_MAGIC_SET_ALL_ENV     \
        assert(sv); assert(mg)
 
-PERL_CALLCONV int      Perl_magic_setamagic(pTHX_ SV* sv, MAGIC* mg)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
-#define PERL_ARGS_ASSERT_MAGIC_SETAMAGIC       \
-       assert(sv); assert(mg)
-
 PERL_CALLCONV int      Perl_magic_setarylen(pTHX_ SV* sv, MAGIC* mg)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
@@ -2283,6 +2317,12 @@ PERL_CALLCONV int        Perl_magic_setvec(pTHX_ SV* sv, MAGIC* mg)
 #define PERL_ARGS_ASSERT_MAGIC_SETVEC  \
        assert(sv); assert(mg)
 
+PERL_CALLCONV int      Perl_magic_setvstring(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_MAGIC_SETVSTRING      \
+       assert(sv); assert(mg)
+
 PERL_CALLCONV U32      Perl_magic_sizepack(pTHX_ SV* sv, MAGIC* mg)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
@@ -2436,11 +2476,6 @@ PERL_CALLCONV SV*        Perl_mro_set_private_data(pTHX_ struct mro_meta *const smeta,
 #define PERL_ARGS_ASSERT_MRO_SET_PRIVATE_DATA  \
        assert(smeta); assert(which); assert(data)
 
-PERL_CALLCONV void     Perl_munge_qwlist_to_paren_list(pTHX_ OP* qwlist)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_MUNGE_QWLIST_TO_PAREN_LIST    \
-       assert(qwlist)
-
 PERL_CALLCONV NV       Perl_my_atof(pTHX_ const char *s)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_MY_ATOF       \
@@ -2518,6 +2553,7 @@ PERL_CALLCONV OP* Perl_newASSIGNOP(pTHX_ I32 flags, OP* left, I32 optype, OP* ri
                        __attribute__warn_unused_result__;
 
 PERL_CALLCONV CV*      Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block);
+PERL_CALLCONV CV*      Perl_newATTRSUB_flags(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block, U32 flags);
 /* PERL_CALLCONV AV*   Perl_newAV(pTHX)
                        __attribute__warn_unused_result__; */
 
@@ -2678,6 +2714,11 @@ PERL_CALLCONV OP*        Perl_newSTATEOP(pTHX_ I32 flags, char* label, OP* o)
                        __attribute__malloc__
                        __attribute__warn_unused_result__;
 
+PERL_CALLCONV CV*      Perl_newSTUB(pTHX_ GV *gv, bool fake)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_NEWSTUB       \
+       assert(gv)
+
 /* PERL_CALLCONV CV*   Perl_newSUB(pTHX_ I32 floor, OP* o, OP* proto, OP* block); */
 PERL_CALLCONV SV*      Perl_newSV(pTHX_ const STRLEN len)
                        __attribute__malloc__
@@ -2924,19 +2965,16 @@ PERL_CALLCONV HV*       Perl_pad_compname_type(pTHX_ const PADOFFSET po)
                        __attribute__warn_unused_result__;
 
 PERL_CALLCONV PADOFFSET        Perl_pad_findmy_pv(pTHX_ const char* name, U32 flags)
-                       __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_PAD_FINDMY_PV \
        assert(name)
 
 PERL_CALLCONV PADOFFSET        Perl_pad_findmy_pvn(pTHX_ const char* namepv, STRLEN namelen, U32 flags)
-                       __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_PAD_FINDMY_PVN        \
        assert(namepv)
 
 PERL_CALLCONV PADOFFSET        Perl_pad_findmy_sv(pTHX_ SV* name, U32 flags)
-                       __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_PAD_FINDMY_SV \
        assert(name)
@@ -3008,7 +3046,7 @@ PERL_CALLCONV int perl_run(PerlInterpreter *my_perl)
        assert(my_perl)
 
 PERL_CALLCONV void     Perl_pmop_dump(pTHX_ PMOP* pm);
-PERL_CALLCONV OP*      Perl_pmruntime(pTHX_ OP *o, OP *expr, bool isreg)
+PERL_CALLCONV OP*      Perl_pmruntime(pTHX_ OP *o, OP *expr, bool isreg, I32 floor)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT_PMRUNTIME     \
@@ -3100,7 +3138,7 @@ PERL_CALLCONV void        Perl_qerror(pTHX_ SV* err)
 #define PERL_ARGS_ASSERT_QERROR        \
        assert(err)
 
-PERL_CALLCONV REGEXP*  Perl_re_compile(pTHX_ SV * const pattern, U32 flags)
+PERL_CALLCONV REGEXP*  Perl_re_compile(pTHX_ SV * const pattern, U32 orig_rx_flags)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_RE_COMPILE    \
        assert(pattern)
@@ -3117,10 +3155,23 @@ PERL_CALLCONV SV*       Perl_re_intuit_string(pTHX_ REGEXP  *const r)
 #define PERL_ARGS_ASSERT_RE_INTUIT_STRING      \
        assert(r)
 
+PERL_CALLCONV REGEXP*  Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count, OP *expr, const regexp_engine* eng, REGEXP *VOL old_re, bool *is_bare_re, U32 rx_flags, U32 pm_flags)
+                       __attribute__nonnull__(pTHX_4);
+#define PERL_ARGS_ASSERT_RE_OP_COMPILE \
+       assert(eng)
+
 PERL_CALLCONV Malloc_t Perl_realloc(Malloc_t where, MEM_SIZE nbytes)
                        __attribute__malloc__
                        __attribute__warn_unused_result__;
 
+PERL_CALLCONV void     Perl_reentrant_free(pTHX);
+PERL_CALLCONV void     Perl_reentrant_init(pTHX);
+PERL_CALLCONV void*    Perl_reentrant_retry(const char *f, ...)
+                       __attribute__nonnull__(1);
+#define PERL_ARGS_ASSERT_REENTRANT_RETRY       \
+       assert(f)
+
+PERL_CALLCONV void     Perl_reentrant_size(pTHX);
 /* PERL_CALLCONV OP*   Perl_ref(pTHX_ OP* o, I32 type); */
 PERL_CALLCONV HV *     Perl_refcounted_he_chain_2hv(pTHX_ const struct refcounted_he *c, U32 flags);
 PERL_CALLCONV SV *     Perl_refcounted_he_fetch_pv(pTHX_ const struct refcounted_he *chain, const char *key, U32 hash, U32 flags)
@@ -3520,10 +3571,7 @@ PERL_CALLCONV char*      Perl_savesharedpv(pTHX_ const char* pv)
 
 PERL_CALLCONV char*    Perl_savesharedpvn(pTHX_ const char *const pv, const STRLEN len)
                        __attribute__malloc__
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_SAVESHAREDPVN \
-       assert(pv)
+                       __attribute__warn_unused_result__;
 
 PERL_CALLCONV char*    Perl_savesharedsvpv(pTHX_ SV *sv)
                        __attribute__malloc__
@@ -3601,7 +3649,11 @@ PERL_CALLCONV void       Perl_set_context(void *t)
 PERL_CALLCONV void     Perl_set_numeric_local(pTHX);
 PERL_CALLCONV void     Perl_set_numeric_radix(pTHX);
 PERL_CALLCONV void     Perl_set_numeric_standard(pTHX);
-PERL_CALLCONV void     Perl_setdefout(pTHX_ GV* gv);
+PERL_CALLCONV void     Perl_setdefout(pTHX_ GV* gv)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_SETDEFOUT     \
+       assert(gv)
+
 PERL_CALLCONV HEK*     Perl_share_hek(pTHX_ const char* str, I32 len, U32 hash)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_SHARE_HEK     \
@@ -3630,13 +3682,6 @@ PERL_CALLCONV PerlIO*    Perl_start_glob(pTHX_ SV *tmpglob, IO *io)
        assert(tmpglob); assert(io)
 
 PERL_CALLCONV I32      Perl_start_subparse(pTHX_ I32 is_format, U32 flags);
-PERL_CALLCONV bool     Perl_stashpv_hvname_match(pTHX_ const COP *c, const HV *hv)
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
-#define PERL_ARGS_ASSERT_STASHPV_HVNAME_MATCH  \
-       assert(c); assert(hv)
-
 PERL_CALLCONV NV       Perl_str_to_version(pTHX_ SV *sv)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -3684,7 +3729,7 @@ PERL_CALLCONV char*       Perl_sv_2pv_flags(pTHX_ SV *const sv, STRLEN *const lp, cons
 #define PERL_ARGS_ASSERT_SV_2PV_NOLEN  \
        assert(sv)
 
-PERL_CALLCONV char*    Perl_sv_2pvbyte(pTHX_ SV *const sv, STRLEN *const lp)
+PERL_CALLCONV char*    Perl_sv_2pvbyte(pTHX_ SV *sv, STRLEN *const lp)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_SV_2PVBYTE    \
        assert(sv)
@@ -3695,7 +3740,7 @@ PERL_CALLCONV char*       Perl_sv_2pvbyte(pTHX_ SV *const sv, STRLEN *const lp)
 #define PERL_ARGS_ASSERT_SV_2PVBYTE_NOLEN      \
        assert(sv)
 
-PERL_CALLCONV char*    Perl_sv_2pvutf8(pTHX_ SV *const sv, STRLEN *const lp)
+PERL_CALLCONV char*    Perl_sv_2pvutf8(pTHX_ SV *sv, STRLEN *const lp)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_SV_2PVUTF8    \
        assert(sv)
@@ -3807,23 +3852,6 @@ PERL_CALLCONV I32        Perl_sv_cmp(pTHX_ SV *const sv1, SV *const sv2);
 PERL_CALLCONV I32      Perl_sv_cmp_flags(pTHX_ SV *const sv1, SV *const sv2, const U32 flags);
 PERL_CALLCONV I32      Perl_sv_cmp_locale(pTHX_ SV *const sv1, SV *const sv2);
 PERL_CALLCONV I32      Perl_sv_cmp_locale_flags(pTHX_ SV *const sv1, SV *const sv2, const U32 flags);
-PERL_CALLCONV OP*      Perl_sv_compile_2op(pTHX_ SV *sv, OP **startop, const char *code, PAD **padp)
-                       __attribute__deprecated__
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3)
-                       __attribute__nonnull__(pTHX_4);
-#define PERL_ARGS_ASSERT_SV_COMPILE_2OP        \
-       assert(sv); assert(startop); assert(code); assert(padp)
-
-PERL_CALLCONV OP*      Perl_sv_compile_2op_is_broken(pTHX_ SV *sv, OP **startop, const char *code, PAD **padp)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3)
-                       __attribute__nonnull__(pTHX_4);
-#define PERL_ARGS_ASSERT_SV_COMPILE_2OP_IS_BROKEN      \
-       assert(sv); assert(startop); assert(code); assert(padp)
-
 PERL_CALLCONV void     Perl_sv_copypv(pTHX_ SV *const dsv, SV *const ssv)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
@@ -3925,6 +3953,11 @@ PERL_CALLCONV char*      Perl_sv_gets(pTHX_ SV *const sv, PerlIO *const fp, I32 appen
 #define PERL_ARGS_ASSERT_SV_GETS       \
        assert(sv); assert(fp)
 
+PERL_CALLCONV bool     Perl_sv_gmagical_2iv_please(pTHX_ SV *sv)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_SV_GMAGICAL_2IV_PLEASE        \
+       assert(sv)
+
 PERL_CALLCONV char*    Perl_sv_grow(pTHX_ SV *const sv, STRLEN newlen)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_SV_GROW       \
@@ -4357,6 +4390,7 @@ PERL_CALLCONV UV  Perl_swash_fetch(pTHX_ SV *swash, const U8 *ptr, bool do_utf8)
        assert(swash); assert(ptr)
 
 PERL_CALLCONV SV*      Perl_swash_init(pTHX_ const char* pkg, const char* name, SV* listsv, I32 minbits, I32 none)
+                       __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
@@ -4437,22 +4471,24 @@ PERL_CALLCONV UV        Perl_to_utf8_case(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, S
 /* PERL_CALLCONV UV    Perl_to_utf8_fold(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2); */
+#define PERL_ARGS_ASSERT_TO_UTF8_FOLD  \
+       assert(p); assert(ustrp)
 
-PERL_CALLCONV UV       Perl_to_utf8_lower(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp)
+/* PERL_CALLCONV UV    Perl_to_utf8_lower(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp)
                        __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
+                       __attribute__nonnull__(pTHX_2); */
 #define PERL_ARGS_ASSERT_TO_UTF8_LOWER \
        assert(p); assert(ustrp)
 
-PERL_CALLCONV UV       Perl_to_utf8_title(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp)
+/* PERL_CALLCONV UV    Perl_to_utf8_title(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp)
                        __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
+                       __attribute__nonnull__(pTHX_2); */
 #define PERL_ARGS_ASSERT_TO_UTF8_TITLE \
        assert(p); assert(ustrp)
 
-PERL_CALLCONV UV       Perl_to_utf8_upper(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp)
+/* PERL_CALLCONV UV    Perl_to_utf8_upper(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp)
                        __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
+                       __attribute__nonnull__(pTHX_2); */
 #define PERL_ARGS_ASSERT_TO_UTF8_UPPER \
        assert(p); assert(ustrp)
 
@@ -4525,15 +4561,29 @@ PERL_CALLCONV U8*       Perl_utf8_to_bytes(pTHX_ U8 *s, STRLEN *len)
        assert(s); assert(len)
 
 PERL_CALLCONV UV       Perl_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen)
+                       __attribute__deprecated__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_UTF8_TO_UVCHR \
        assert(s)
 
+PERL_CALLCONV UV       Perl_utf8_to_uvchr_buf(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_UTF8_TO_UVCHR_BUF     \
+       assert(s); assert(send)
+
 PERL_CALLCONV UV       Perl_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen)
+                       __attribute__deprecated__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_UTF8_TO_UVUNI \
        assert(s)
 
+PERL_CALLCONV UV       Perl_utf8_to_uvuni_buf(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_UTF8_TO_UVUNI_BUF     \
+       assert(s); assert(send)
+
 PERL_CALLCONV UV       Perl_utf8n_to_uvuni(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_UTF8N_TO_UVUNI        \
@@ -4554,6 +4604,16 @@ PERL_CALLCONV U8*        Perl_uvuni_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags)
 #define PERL_ARGS_ASSERT_UVUNI_TO_UTF8_FLAGS   \
        assert(d)
 
+PERL_CALLCONV UV       Perl_valid_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_VALID_UTF8_TO_UVCHR   \
+       assert(s)
+
+PERL_CALLCONV UV       Perl_valid_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_VALID_UTF8_TO_UVUNI   \
+       assert(s)
+
 PERL_CALLCONV int      Perl_vcmp(pTHX_ SV *lhv, SV *rhv)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
@@ -4679,6 +4739,12 @@ PERL_CALLCONV I32        Perl_whichsig_sv(pTHX_ SV* sigsv)
 #define PERL_ARGS_ASSERT_WHICHSIG_SV   \
        assert(sigsv)
 
+PERL_CALLCONV void     Perl_wrap_op_checker(pTHX_ Optype opcode, Perl_check_t new_checker, Perl_check_t *old_checker_p)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3);
+#define PERL_ARGS_ASSERT_WRAP_OP_CHECKER       \
+       assert(new_checker); assert(old_checker_p)
+
 PERL_CALLCONV void     Perl_write_to_stderr(pTHX_ SV* msv)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_WRITE_TO_STDERR       \
@@ -4700,6 +4766,16 @@ PERL_CALLCONV int        Perl_yyerror(pTHX_ const char *const s)
 #define PERL_ARGS_ASSERT_YYERROR       \
        assert(s)
 
+PERL_CALLCONV int      Perl_yyerror_pv(pTHX_ const char *const s, U32 flags)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_YYERROR_PV    \
+       assert(s)
+
+PERL_CALLCONV int      Perl_yyerror_pvn(pTHX_ const char *const s, STRLEN len, U32 flags)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_YYERROR_PVN   \
+       assert(s)
+
 PERL_CALLCONV int      Perl_yylex(pTHX);
 PERL_CALLCONV int      Perl_yyparse(pTHX_ int gramtype);
 PERL_CALLCONV void     Perl_yyunlex(pTHX);
@@ -5413,6 +5489,15 @@ STATIC bool      S_grok_bslash_o(pTHX_ const char* s, UV* uv, STRLEN* len, const char
 #define PERL_ARGS_ASSERT_GROK_BSLASH_O \
        assert(s); assert(uv); assert(len); assert(error_msg)
 
+PERL_STATIC_INLINE bool        S_grok_bslash_x(pTHX_ const char* s, UV* uv, STRLEN* len, const char** error_msg, const bool output_warning)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3)
+                       __attribute__nonnull__(pTHX_4);
+#define PERL_ARGS_ASSERT_GROK_BSLASH_X \
+       assert(s); assert(uv); assert(len); assert(error_msg)
+
 PERL_STATIC_INLINE I32 S_regcurly(pTHX_ const char *s)
                        __attribute__warn_unused_result__
                        __attribute__pure__
@@ -5467,11 +5552,6 @@ STATIC void      S_gv_magicalize_isa(pTHX_ GV *gv)
 #define PERL_ARGS_ASSERT_GV_MAGICALIZE_ISA     \
        assert(gv)
 
-STATIC void    S_gv_magicalize_overload(pTHX_ GV *gv)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_GV_MAGICALIZE_OVERLOAD        \
-       assert(gv)
-
 STATIC HV*     S_require_tie_mod(pTHX_ GV *gv, const char *varpv, SV* namesv, const char *methpv, const U32 flags)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
@@ -5601,6 +5681,14 @@ STATIC void      S_save_magic(pTHX_ I32 mgs_ix, SV *sv)
 
 STATIC void    S_unwind_handler_stack(pTHX_ const void *p);
 #endif
+#if defined(PERL_IN_MG_C) || defined(PERL_IN_PP_C)
+PERL_CALLCONV bool     Perl_translate_substr_offsets(pTHX_ STRLEN curlen, IV pos1_iv, bool pos1_is_uv, IV len_iv, bool len_is_uv, STRLEN *posp, STRLEN *lenp)
+                       __attribute__nonnull__(pTHX_6)
+                       __attribute__nonnull__(pTHX_7);
+#define PERL_ARGS_ASSERT_TRANSLATE_SUBSTR_OFFSETS      \
+       assert(posp); assert(lenp)
+
+#endif
 #if defined(PERL_IN_MRO_C)
 STATIC void    S_mro_clean_isarev(pTHX_ HV * const isa, const char * const name, const STRLEN len, HV * const exceptions, U32 flags)
                        __attribute__nonnull__(pTHX_1)
@@ -5639,13 +5727,20 @@ STATIC void     S_apply_attrs_my(pTHX_ HV *stash, OP *target, OP *attrs, OP **imopsp
 #define PERL_ARGS_ASSERT_APPLY_ATTRS_MY        \
        assert(stash); assert(target); assert(imopsp)
 
-STATIC void    S_bad_type(pTHX_ I32 n, const char *t, const char *name, const OP *kid)
+STATIC void    S_bad_type_pv(pTHX_ I32 n, const char *t, const char *name, U32 flags, const OP *kid)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3)
-                       __attribute__nonnull__(pTHX_4);
-#define PERL_ARGS_ASSERT_BAD_TYPE      \
+                       __attribute__nonnull__(pTHX_5);
+#define PERL_ARGS_ASSERT_BAD_TYPE_PV   \
        assert(t); assert(name); assert(kid)
 
+STATIC void    S_bad_type_sv(pTHX_ I32 n, const char *t, SV *namesv, U32 flags, const OP *kid)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3)
+                       __attribute__nonnull__(pTHX_5);
+#define PERL_ARGS_ASSERT_BAD_TYPE_SV   \
+       assert(t); assert(namesv); assert(kid)
+
 STATIC void    S_cop_free(pTHX_ COP *cop)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_COP_FREE      \
@@ -5673,7 +5768,7 @@ STATIC OP*        S_fold_constants(pTHX_ OP *o)
 
 STATIC OP*     S_force_list(pTHX_ OP* arg);
 STATIC OP*     S_gen_constant_list(pTHX_ OP* o);
-STATIC const char*     S_gv_ename(pTHX_ GV *gv)
+STATIC SV*     S_gv_ename(pTHX_ GV *gv)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_GV_ENAME      \
        assert(gv)
@@ -5782,19 +5877,33 @@ STATIC void     S_simplify_sort(pTHX_ OP *o)
 #define PERL_ARGS_ASSERT_SIMPLIFY_SORT \
        assert(o)
 
-STATIC OP*     S_too_few_arguments(pTHX_ OP *o, const char* name)
+STATIC OP*     S_too_few_arguments_pv(pTHX_ OP *o, const char* name, U32 flags)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
-#define PERL_ARGS_ASSERT_TOO_FEW_ARGUMENTS     \
+#define PERL_ARGS_ASSERT_TOO_FEW_ARGUMENTS_PV  \
        assert(o); assert(name)
 
-STATIC OP*     S_too_many_arguments(pTHX_ OP *o, const char* name)
+STATIC OP*     S_too_few_arguments_sv(pTHX_ OP *o, SV* namesv, U32 flags)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_TOO_FEW_ARGUMENTS_SV  \
+       assert(o); assert(namesv)
+
+STATIC OP*     S_too_many_arguments_pv(pTHX_ OP *o, const char* name, U32 flags)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
-#define PERL_ARGS_ASSERT_TOO_MANY_ARGUMENTS    \
+#define PERL_ARGS_ASSERT_TOO_MANY_ARGUMENTS_PV \
        assert(o); assert(name)
 
+STATIC OP*     S_too_many_arguments_sv(pTHX_ OP *o, SV* namesv, U32 flags)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_TOO_MANY_ARGUMENTS_SV \
+       assert(o); assert(namesv)
+
 #  if defined(USE_ITHREADS)
 STATIC void    S_forget_pmop(pTHX_ PMOP *const o, U32 flags)
                        __attribute__nonnull__(pTHX_1);
@@ -5872,12 +5981,11 @@ STATIC void     S_my_exit_jump(pTHX)
                        __attribute__noreturn__;
 
 STATIC void    S_nuke_stacks(pTHX);
-STATIC int     S_open_script(pTHX_ const char *scriptname, bool dosearch, bool *suidscript, PerlIO **rsfpp)
+STATIC PerlIO *        S_open_script(pTHX_ const char *scriptname, bool dosearch, bool *suidscript)
                        __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_3)
-                       __attribute__nonnull__(pTHX_4);
+                       __attribute__nonnull__(pTHX_3);
 #define PERL_ARGS_ASSERT_OPEN_SCRIPT   \
-       assert(scriptname); assert(suidscript); assert(rsfpp)
+       assert(scriptname); assert(suidscript)
 
 STATIC void*   S_parse_body(pTHX_ char **env, XSINIT_t xsinit);
 STATIC void    S_run_body(pTHX_ I32 oldscope)
@@ -5935,13 +6043,13 @@ STATIC OP*      S_do_smartmatch(pTHX_ HV* seen_this, HV* seen_other, const bool copie
 STATIC OP*     S_docatch(pTHX_ OP *o)
                        __attribute__warn_unused_result__;
 
-STATIC bool    S_doeval(pTHX_ int gimme, OP** startop, CV* outside, U32 seq, HV* hh);
-STATIC OP*     S_dofindlabel(pTHX_ OP *o, const char *label, OP **opstack, OP **oplimit)
+STATIC bool    S_doeval(pTHX_ int gimme, CV* outside, U32 seq, HV* hh);
+STATIC OP*     S_dofindlabel(pTHX_ OP *o, const char *label, STRLEN len, U32 flags, OP **opstack, OP **oplimit)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3)
-                       __attribute__nonnull__(pTHX_4);
+                       __attribute__nonnull__(pTHX_5)
+                       __attribute__nonnull__(pTHX_6);
 #define PERL_ARGS_ASSERT_DOFINDLABEL   \
        assert(o); assert(label); assert(opstack); assert(oplimit)
 
@@ -5956,7 +6064,7 @@ STATIC I32        S_dopoptoeval(pTHX_ I32 startingblock)
 STATIC I32     S_dopoptogiven(pTHX_ I32 startingblock)
                        __attribute__warn_unused_result__;
 
-STATIC I32     S_dopoptolabel(pTHX_ const char *label)
+STATIC I32     S_dopoptolabel(pTHX_ const char *label, STRLEN len, U32 flags)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_DOPOPTOLABEL  \
@@ -6193,12 +6301,23 @@ STATIC SV *     S_space_join_names_mortal(pTHX_ char *const *array)
 
 #endif
 #if defined(PERL_IN_REGCOMP_C)
+STATIC void    S__append_range_to_invlist(pTHX_ SV* const invlist, const UV start, const UV end)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT__APPEND_RANGE_TO_INVLIST      \
+       assert(invlist)
+
 PERL_STATIC_INLINE UV* S__invlist_array_init(pTHX_ SV* const invlist, const bool will_have_0)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT__INVLIST_ARRAY_INIT   \
        assert(invlist)
 
+STATIC SV*     S__new_invlist_C_array(pTHX_ UV* list)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#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);
@@ -6215,9 +6334,6 @@ STATIC U32        S_add_data(struct RExC_state_t *pRExC_state, U32 n, const char *s)
 #define PERL_ARGS_ASSERT_ADD_DATA      \
        assert(pRExC_state); assert(s)
 
-STATIC SV*     S_add_range_to_invlist(pTHX_ SV* invlist, const UV start, const UV end)
-                       __attribute__warn_unused_result__;
-
 STATIC void    S_checkposixcc(pTHX_ struct RExC_state_t *pRExC_state)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_CHECKPOSIXCC  \
@@ -6266,6 +6382,12 @@ PERL_STATIC_INLINE UV*   S_get_invlist_len_addr(pTHX_ SV* invlist)
 #define PERL_ARGS_ASSERT_GET_INVLIST_LEN_ADDR  \
        assert(invlist)
 
+PERL_STATIC_INLINE UV* S_get_invlist_version_id_addr(pTHX_ SV* invlist)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_GET_INVLIST_VERSION_ID_ADDR   \
+       assert(invlist)
+
 PERL_STATIC_INLINE UV* S_get_invlist_zero_addr(pTHX_ SV* invlist)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -6314,6 +6436,12 @@ PERL_STATIC_INLINE UV    S_invlist_max(pTHX_ SV* const invlist)
 #define PERL_ARGS_ASSERT_INVLIST_MAX   \
        assert(invlist)
 
+STATIC IV      S_invlist_search(pTHX_ SV* const invlist, const UV cp)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_INVLIST_SEARCH        \
+       assert(invlist)
+
 PERL_STATIC_INLINE void        S_invlist_set_len(pTHX_ SV* const invlist, const UV len)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_INVLIST_SET_LEN       \
@@ -6324,12 +6452,13 @@ PERL_STATIC_INLINE void S_invlist_trim(pTHX_ SV* const invlist)
 #define PERL_ARGS_ASSERT_INVLIST_TRIM  \
        assert(invlist)
 
-STATIC U32     S_join_exact(pTHX_ struct RExC_state_t *pRExC_state, regnode *scan, I32 *min, U32 flags, regnode *val, U32 depth)
+STATIC U32     S_join_exact(pTHX_ struct RExC_state_t *pRExC_state, regnode *scan, UV *min_subtract, bool *has_exactf_sharp_s, U32 flags, regnode *val, U32 depth)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3);
+                       __attribute__nonnull__(pTHX_3)
+                       __attribute__nonnull__(pTHX_4);
 #define PERL_ARGS_ASSERT_JOIN_EXACT    \
-       assert(pRExC_state); assert(scan); assert(min)
+       assert(pRExC_state); assert(scan); assert(min_subtract); assert(has_exactf_sharp_s)
 
 STATIC I32     S_make_trie(pTHX_ struct RExC_state_t *pRExC_state, regnode *startbranch, regnode *first, regnode *last, regnode *tail, U32 word_count, U32 flags, U32 depth)
                        __attribute__nonnull__(pTHX_1)
@@ -6482,18 +6611,35 @@ STATIC I32      S_study_chunk(pTHX_ struct RExC_state_t *pRExC_state, regnode **scanp
        assert(pRExC_state); assert(scanp); assert(minlenp); assert(deltap); assert(last)
 
 #endif
-#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_UTF8_C)
-PERL_CALLCONV void     Perl__append_range_to_invlist(pTHX_ SV* const invlist, const UV start, const UV end)
+#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, bool return_if_undef, SV* invlist, bool passed_in_invlist_has_user_defined_property)
+                       __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_CALLCONV SV*      Perl__invlist_contents(pTHX_ SV* const invlist)
+                       __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT__APPEND_RANGE_TO_INVLIST      \
+#define PERL_ARGS_ASSERT__INVLIST_CONTENTS     \
        assert(invlist)
 
-PERL_CALLCONV void     Perl__invlist_intersection(pTHX_ SV* const a, SV* const b, SV** i)
+#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)
+                       __attribute__warn_unused_result__;
+
+/* PERL_CALLCONV void  _invlist_intersection(pTHX_ SV* const a, SV* const b, SV** i)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3);
-#define PERL_ARGS_ASSERT__INVLIST_INTERSECTION \
-       assert(a); assert(b); assert(i)
+                       __attribute__nonnull__(pTHX_3); */
+
+PERL_CALLCONV void     Perl__invlist_intersection_maybe_complement_2nd(pTHX_ SV* const a, SV* const b, bool complement_b, SV** i)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_4);
+#define PERL_ARGS_ASSERT__INVLIST_INTERSECTION_MAYBE_COMPLEMENT_2ND    \
+       assert(b); assert(i)
 
 PERL_CALLCONV void     Perl__invlist_invert(pTHX_ SV* const invlist)
                        __attribute__nonnull__(pTHX_1);
@@ -6505,19 +6651,26 @@ PERL_CALLCONV void      Perl__invlist_invert_prop(pTHX_ SV* const invlist)
 #define PERL_ARGS_ASSERT__INVLIST_INVERT_PROP  \
        assert(invlist)
 
-PERL_CALLCONV void     Perl__invlist_subtract(pTHX_ SV* const a, SV* const b, SV** result)
+PERL_CALLCONV void     Perl__invlist_populate_swatch(pTHX_ SV* const invlist, const UV start, const UV end, U8* swatch)
                        __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3);
-#define PERL_ARGS_ASSERT__INVLIST_SUBTRACT     \
-       assert(a); assert(b); assert(result)
+                       __attribute__nonnull__(pTHX_4);
+#define PERL_ARGS_ASSERT__INVLIST_POPULATE_SWATCH      \
+       assert(invlist); assert(swatch)
 
-PERL_CALLCONV void     Perl__invlist_union(pTHX_ SV* const a, SV* const b, SV** output)
+/* PERL_CALLCONV void  _invlist_subtract(pTHX_ SV* const a, SV* const b, SV** result)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3);
-#define PERL_ARGS_ASSERT__INVLIST_UNION        \
-       assert(a); assert(b); assert(output)
+                       __attribute__nonnull__(pTHX_3); */
+
+/* PERL_CALLCONV void  _invlist_union(pTHX_ SV* const a, SV* const b, SV** output)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3); */
+
+PERL_CALLCONV void     Perl__invlist_union_maybe_complement_2nd(pTHX_ SV* const a, SV* const b, bool complement_b, SV** output)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_4);
+#define PERL_ARGS_ASSERT__INVLIST_UNION_MAYBE_COMPLEMENT_2ND   \
+       assert(b); assert(output)
 
 PERL_CALLCONV SV*      Perl__new_invlist(pTHX_ IV initial_size)
                        __attribute__warn_unused_result__;
@@ -6536,6 +6689,12 @@ 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)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_CORE_REGCLASS_SWASH   \
+       assert(node)
+
 STATIC char*   S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s, const char *strend, regmatch_info *reginfo)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1)
@@ -6552,12 +6711,16 @@ STATIC I32      S_reg_check_named_buff_matched(pTHX_ const regexp *rex, const regnode
 #define PERL_ARGS_ASSERT_REG_CHECK_NAMED_BUFF_MATCHED  \
        assert(rex); assert(scan)
 
-STATIC char*   S_regcppop(pTHX_ const regexp *rex)
+STATIC void    S_regcppop(pTHX_ regexp *rex)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_REGCPPOP      \
        assert(rex)
 
-STATIC CHECKPOINT      S_regcppush(pTHX_ I32 parenfloor);
+STATIC CHECKPOINT      S_regcppush(pTHX_ const regexp *rex, I32 parenfloor)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_REGCPPUSH     \
+       assert(rex)
+
 STATIC U8*     S_reghop3(U8 *s, I32 off, const U8 *lim)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(1)
@@ -6919,7 +7082,7 @@ STATIC char*      S_scan_pat(pTHX_ char *start, I32 type)
 #define PERL_ARGS_ASSERT_SCAN_PAT      \
        assert(start)
 
-STATIC char*   S_scan_str(pTHX_ char *start, int keep_quoted, int keep_delims)
+STATIC char*   S_scan_str(pTHX_ char *start, int keep_quoted, int keep_delims, int re_reparse)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_SCAN_STR      \
@@ -6977,7 +7140,7 @@ STATIC SV*        S_tokeq(pTHX_ SV *sv)
        assert(sv)
 
 STATIC void    S_update_debugger_info(pTHX_ SV *orig_sv, const char *const buf, STRLEN len);
-STATIC int     S_yywarn(pTHX_ const char *const s)
+STATIC int     S_yywarn(pTHX_ const char *const s, U32 flags)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_YYWARN        \
        assert(s)
@@ -7011,11 +7174,13 @@ STATIC bool     S_isa_lookup(pTHX_ HV *stash, const char * const name, STRLEN len, U
 
 #endif
 #if defined(PERL_IN_UTF8_C)
-PERL_CALLCONV UV       Perl__to_fold_latin1(pTHX_ const U8 c, U8 *p, STRLEN *lenp, const U8 flags)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3);
-#define PERL_ARGS_ASSERT__TO_FOLD_LATIN1       \
-       assert(p); assert(lenp)
+STATIC UV      S_check_locale_boundary_crossing(pTHX_ const U8* const p, const UV result, U8* const ustrp, STRLEN *lenp)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_3)
+                       __attribute__nonnull__(pTHX_4);
+#define PERL_ARGS_ASSERT_CHECK_LOCALE_BOUNDARY_CROSSING        \
+       assert(p); assert(ustrp); assert(lenp)
 
 STATIC STRLEN  S_is_utf8_char_slow(const U8 *s, const STRLEN len)
                        __attribute__warn_unused_result__
@@ -7031,10 +7196,10 @@ STATIC bool     S_is_utf8_common(pTHX_ const U8 *const p, SV **swash, const char * c
 #define PERL_ARGS_ASSERT_IS_UTF8_COMMON        \
        assert(p); assert(swash); assert(swashname)
 
-STATIC SV*     S_swash_get(pTHX_ SV* swash, UV start, UV span)
+STATIC SV*     S_swatch_get(pTHX_ SV* swash, UV start, UV span)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_SWASH_GET     \
+#define PERL_ARGS_ASSERT_SWATCH_GET    \
        assert(swash)
 
 STATIC U8      S_to_lower_latin1(pTHX_ const U8 c, U8 *p, STRLEN *lenp)
@@ -7042,6 +7207,12 @@ 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);
@@ -7049,6 +7220,14 @@ PERL_CALLCONV UV Perl__to_upper_title_latin1(pTHX_ const U8 c, U8 *p, STRLEN *le
        assert(p); assert(lenp)
 
 #endif
+#if defined(PERL_IN_UTF8_C) || defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C)
+PERL_CALLCONV UV       Perl__to_fold_latin1(pTHX_ const U8 c, U8 *p, STRLEN *lenp, const bool flags)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3);
+#define PERL_ARGS_ASSERT__TO_FOLD_LATIN1       \
+       assert(p); assert(lenp)
+
+#endif
 #if defined(PERL_IN_UTIL_C)
 STATIC bool    S_ckwarn_common(pTHX_ U32 w);
 STATIC const COP*      S_closest_cop(pTHX_ const COP *cop, const OP *o)
@@ -7303,6 +7482,11 @@ PERL_CALLCONV I32        Perl_unlnk(pTHX_ const char* f)
 
 #endif
 #if defined(USE_ITHREADS)
+PERL_CALLCONV PADOFFSET        Perl_alloccopstash(pTHX_ HV *hv)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_ALLOCCOPSTASH \
+       assert(hv)
+
 PERL_CALLCONV void*    Perl_any_dup(pTHX_ void* v, const PerlInterpreter* proto_perl)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_2);
@@ -7509,16 +7693,6 @@ PERL_CALLCONV SSize_t    Perl_PerlIO_write(pTHX_ PerlIO *f, const void *vbuf, Size_
        assert(vbuf)
 
 #endif
-#if defined(USE_REENTRANT_API)
-PERL_CALLCONV void     Perl_reentrant_free(pTHX);
-PERL_CALLCONV void     Perl_reentrant_init(pTHX);
-PERL_CALLCONV void*    Perl_reentrant_retry(const char *f, ...)
-                       __attribute__nonnull__(1);
-#define PERL_ARGS_ASSERT_REENTRANT_RETRY       \
-       assert(f)
-
-PERL_CALLCONV void     Perl_reentrant_size(pTHX);
-#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)