This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
lib/locale.t: Add %p to strftime test
[perl5.git] / proto.h
diff --git a/proto.h b/proto.h
index 060f864..3532594 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -42,6 +42,7 @@ PERL_CALLCONV void    Perl_Slab_Free(pTHX_ void *op)
 #define PERL_ARGS_ASSERT_SLAB_FREE     \
        assert(op)
 
+PERL_CALLCONV bool     Perl__is_in_locale_category(pTHX_ const bool compiling, const int category);
 PERL_CALLCONV bool     Perl__is_uni_FOO(pTHX_ const U8 classnum, const UV c)
                        __attribute__warn_unused_result__;
 
@@ -57,6 +58,25 @@ PERL_CALLCONV bool   Perl__is_utf8_FOO(pTHX_ const U8 classnum, const U8 *p)
 #define PERL_ARGS_ASSERT__IS_UTF8_FOO  \
        assert(p)
 
+PERL_STATIC_INLINE STRLEN      S__is_utf8_char_slow(const U8 *s, const U8 *e)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(1)
+                       __attribute__nonnull__(2);
+#define PERL_ARGS_ASSERT__IS_UTF8_CHAR_SLOW    \
+       assert(s); assert(e)
+
+PERL_CALLCONV bool     Perl__is_utf8_idcont(pTHX_ const U8 *p)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT__IS_UTF8_IDCONT       \
+       assert(p)
+
+PERL_CALLCONV bool     Perl__is_utf8_idstart(pTHX_ const U8 *p)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT__IS_UTF8_IDSTART      \
+       assert(p)
+
 PERL_CALLCONV bool     Perl__is_utf8_mark(pTHX_ const U8 *p)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -75,31 +95,43 @@ 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, const U8 flags)
+PERL_CALLCONV bool     Perl__is_utf8_xidcont(pTHX_ const U8 *p)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT__IS_UTF8_XIDCONT      \
+       assert(p)
+
+PERL_CALLCONV bool     Perl__is_utf8_xidstart(pTHX_ const U8 *p)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT__IS_UTF8_XIDSTART     \
+       assert(p)
+
+PERL_CALLCONV UV       Perl__to_uni_fold_flags(pTHX_ UV c, U8 *p, STRLEN *lenp, 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, bool* tainted_ptr)
+PERL_CALLCONV UV       Perl__to_utf8_fold_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, U8 flags)
                        __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)
+PERL_CALLCONV UV       Perl__to_utf8_lower_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, bool flags)
                        __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)
+PERL_CALLCONV UV       Perl__to_utf8_title_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, bool flags)
                        __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)
+PERL_CALLCONV UV       Perl__to_utf8_upper_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, bool flags)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT__TO_UTF8_UPPER_FLAGS  \
@@ -221,9 +253,10 @@ PERL_CALLCONV SV*  Perl_av_pop(pTHX_ AV *av)
        assert(av)
 
 PERL_CALLCONV void     Perl_av_push(pTHX_ AV *av, SV *val)
-                       __attribute__nonnull__(pTHX_1);
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT_AV_PUSH       \
-       assert(av)
+       assert(av); assert(val)
 
 PERL_CALLCONV void     Perl_av_reify(pTHX_ AV *av)
                        __attribute__nonnull__(pTHX_1);
@@ -364,6 +397,12 @@ PERL_CALLCONV OP * Perl_ck_anoncode(pTHX_ OP *o)
 #define PERL_ARGS_ASSERT_CK_ANONCODE   \
        assert(o)
 
+PERL_CALLCONV OP *     Perl_ck_backtick(pTHX_ OP *o)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_CK_BACKTICK   \
+       assert(o)
+
 PERL_CALLCONV OP *     Perl_ck_bitop(pTHX_ OP *o)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -394,12 +433,6 @@ PERL_CALLCONV OP * Perl_ck_delete(pTHX_ OP *o)
 #define PERL_ARGS_ASSERT_CK_DELETE     \
        assert(o)
 
-PERL_CALLCONV OP *     Perl_ck_die(pTHX_ OP *o)
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_CK_DIE        \
-       assert(o)
-
 PERL_CALLCONV OP *     Perl_ck_each(pTHX_ OP *o)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -456,12 +489,6 @@ PERL_CALLCONV OP * Perl_ck_exists(pTHX_ OP *o)
 #define PERL_ARGS_ASSERT_CK_EXISTS     \
        assert(o)
 
-PERL_CALLCONV OP *     Perl_ck_exit(pTHX_ OP *o)
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_CK_EXIT       \
-       assert(o)
-
 PERL_CALLCONV OP *     Perl_ck_ftst(pTHX_ OP *o)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -728,6 +755,12 @@ PERL_CALLCONV const char * Perl_custom_op_desc(pTHX_ const OP *o)
 #define PERL_ARGS_ASSERT_CUSTOM_OP_DESC        \
        assert(o)
 
+PERL_CALLCONV XOPRETANY        Perl_custom_op_get_field(pTHX_ const OP *o, const xop_flags_enum field)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_CUSTOM_OP_GET_FIELD   \
+       assert(o)
+
 PERL_CALLCONV const char *     Perl_custom_op_name(pTHX_ const OP *o)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -740,11 +773,9 @@ PERL_CALLCONV void Perl_custom_op_register(pTHX_ Perl_ppaddr_t ppaddr, const XOP
 #define PERL_ARGS_ASSERT_CUSTOM_OP_REGISTER    \
        assert(ppaddr); assert(xop)
 
-PERL_CALLCONV const XOP *      Perl_custom_op_xop(pTHX_ const OP *o)
+/* PERL_CALLCONV const XOP *   Perl_custom_op_xop(pTHX_ const OP *o)
                        __attribute__pure__
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_CUSTOM_OP_XOP \
-       assert(o)
+                       __attribute__nonnull__(pTHX_1); */
 
 PERL_CALLCONV void     Perl_cv_ckproto_len_flags(pTHX_ const CV* cv, const GV* gv, const char* p, const STRLEN len, const U32 flags)
                        __attribute__nonnull__(pTHX_1);
@@ -842,14 +873,6 @@ PERL_CALLCONV char*        Perl_delimcpy(char* to, const char* toend, const char* from,
        assert(to); assert(toend); assert(from); assert(fromend); assert(retlen)
 
 PERL_CALLCONV void     Perl_despatch_signals(pTHX);
-PERL_CALLCONV OP*      Perl_die(pTHX_ const char* pat, ...)
-                       __attribute__format__null_ok__(__printf__,pTHX_1,pTHX_2);
-
-PERL_CALLCONV OP*      Perl_die_sv(pTHX_ SV *baseex)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_DIE_SV        \
-       assert(baseex)
-
 PERL_CALLCONV_NO_RET void      Perl_die_unwind(pTHX_ SV* msv)
                        __attribute__noreturn__
                        __attribute__nonnull__(pTHX_1);
@@ -935,6 +958,12 @@ PERL_CALLCONV void Perl_do_op_dump(pTHX_ I32 level, PerlIO *file, const OP *o)
 #define PERL_ARGS_ASSERT_DO_OPEN       \
        assert(gv); assert(name)
 
+PERL_CALLCONV bool     Perl_do_open6(pTHX_ GV *gv, const char *oname, STRLEN len, PerlIO *supplied_fp, SV **svp, U32 num)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_DO_OPEN6      \
+       assert(gv); assert(oname)
+
 PERL_CALLCONV bool     Perl_do_open9(pTHX_ GV *gv, const char *name, I32 len, int as_raw, int rawmode, int rawperm, PerlIO *supplied_fp, SV *svs, I32 num)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
@@ -942,6 +971,12 @@ PERL_CALLCONV bool Perl_do_open9(pTHX_ GV *gv, const char *name, I32 len, int as
 #define PERL_ARGS_ASSERT_DO_OPEN9      \
        assert(gv); assert(name); assert(svs)
 
+PERL_CALLCONV bool     Perl_do_open_raw(pTHX_ GV *gv, const char *oname, STRLEN len, int rawmode, int rawperm)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_DO_OPEN_RAW   \
+       assert(gv); assert(oname)
+
 PERL_CALLCONV bool     Perl_do_openn(pTHX_ GV *gv, const char *oname, I32 len, int as_raw, int rawmode, int rawperm, PerlIO *supplied_fp, SV **svp, I32 num)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
@@ -1023,6 +1058,16 @@ PERL_CALLCONV void       Perl_dounwind(pTHX_ I32 cxix);
 PERL_CALLCONV I32      Perl_dowantarray(pTHX)
                        __attribute__warn_unused_result__;
 
+PERL_CALLCONV void     Perl_drand48_init_r(perl_drand48_t *random_state, U32 seed)
+                       __attribute__nonnull__(1);
+#define PERL_ARGS_ASSERT_DRAND48_INIT_R        \
+       assert(random_state)
+
+PERL_CALLCONV double   Perl_drand48_r(perl_drand48_t *random_state)
+                       __attribute__nonnull__(1);
+#define PERL_ARGS_ASSERT_DRAND48_R     \
+       assert(random_state)
+
 PERL_CALLCONV void     Perl_dump_all(pTHX);
 PERL_CALLCONV void     Perl_dump_all_perl(pTHX_ bool justperl);
 PERL_CALLCONV void     Perl_dump_eval(pTHX);
@@ -1477,6 +1522,11 @@ PERL_CALLCONV void       Perl_gv_name_set(pTHX_ GV* gv, const char *name, U32 len, U32
 #define PERL_ARGS_ASSERT_GV_NAME_SET   \
        assert(gv); assert(name)
 
+PERL_CALLCONV GV *     Perl_gv_override(pTHX_ const char * const name, const STRLEN len)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_GV_OVERRIDE   \
+       assert(name)
+
 PERL_CALLCONV HV*      Perl_gv_stashpv(pTHX_ const char* name, I32 flags)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_GV_STASHPV    \
@@ -1736,7 +1786,7 @@ PERL_CALLCONV bool        Perl_io_close(pTHX_ IO* io, bool not_implicit)
 #define PERL_ARGS_ASSERT_IO_CLOSE      \
        assert(io)
 
-PERL_STATIC_INLINE bool        S_isALNUM_lazy(pTHX_ const char* p)
+PERL_CALLCONV bool     Perl_isALNUM_lazy(pTHX_ const char* p)
                        __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__pure__
@@ -1744,7 +1794,7 @@ PERL_STATIC_INLINE bool   S_isALNUM_lazy(pTHX_ const char* p)
 #define PERL_ARGS_ASSERT_ISALNUM_LAZY  \
        assert(p)
 
-PERL_STATIC_INLINE bool        S_isIDFIRST_lazy(pTHX_ const char* p)
+PERL_CALLCONV bool     Perl_isIDFIRST_lazy(pTHX_ const char* p)
                        __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__pure__
@@ -1760,11 +1810,11 @@ PERL_CALLCONV bool      Perl_is_ascii_string(const U8 *s, STRLEN len)
 PERL_CALLCONV I32      Perl_is_lvalue_sub(pTHX)
                        __attribute__warn_unused_result__;
 
-PERL_STATIC_INLINE bool        S_is_safe_syscall(pTHX_ SV *pv, const char *what, const char *op_name)
+PERL_STATIC_INLINE bool        S_is_safe_syscall(pTHX_ const char *pv, STRLEN len, const char *what, const char *op_name)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3);
+                       __attribute__nonnull__(pTHX_3)
+                       __attribute__nonnull__(pTHX_4);
 #define PERL_ARGS_ASSERT_IS_SAFE_SYSCALL       \
        assert(pv); assert(what); assert(op_name)
 
@@ -1959,9 +2009,9 @@ PERL_CALLCONV STRLEN      Perl_is_utf8_char(const U8 *s)
 #define PERL_ARGS_ASSERT_IS_UTF8_CHAR  \
        assert(s)
 
-PERL_CALLCONV STRLEN   Perl_is_utf8_char_buf(const U8 *buf, const U8 *buf_end)
+/* PERL_CALLCONV STRLEN        Perl_is_utf8_char_buf(const U8 *buf, const U8 *buf_end)
                        __attribute__nonnull__(1)
-                       __attribute__nonnull__(2);
+                       __attribute__nonnull__(2); */
 #define PERL_ARGS_ASSERT_IS_UTF8_CHAR_BUF      \
        assert(buf); assert(buf_end)
 
@@ -2477,7 +2527,7 @@ PERL_CALLCONV Malloc_t    Perl_malloc(MEM_SIZE nbytes)
                        __attribute__malloc__
                        __attribute__warn_unused_result__;
 
-PERL_CALLCONV void     Perl_markstack_grow(pTHX);
+PERL_CALLCONV I32 *    Perl_markstack_grow(pTHX);
 PERL_CALLCONV SV*      Perl_mess(pTHX_ const char* pat, ...)
                        __attribute__format__(__printf__,pTHX_1,pTHX_2)
                        __attribute__nonnull__(pTHX_1);
@@ -2666,7 +2716,9 @@ PERL_CALLCONV int Perl_my_snprintf(char *buffer, const Size_t len, const char *f
 PERL_CALLCONV int      Perl_my_socketpair(int family, int type, int protocol, int fd[2]);
 /* PERL_CALLCONV I32   Perl_my_stat(pTHX); */
 PERL_CALLCONV I32      Perl_my_stat_flags(pTHX_ const U32 flags);
+PERL_CALLCONV char*    Perl_my_strerror(pTHX_ const int errnum);
 PERL_CALLCONV char *   Perl_my_strftime(pTHX_ const char *fmt, int sec, int min, int hour, int mday, int mon, int year, int wday, int yday, int isdst)
+                       __attribute__format__(__strftime__,pTHX_1,0)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_MY_STRFTIME   \
        assert(fmt)
@@ -2692,8 +2744,8 @@ PERL_CALLCONV OP* Perl_newASSIGNOP(pTHX_ I32 flags, OP* left, I32 optype, OP* ri
                        __attribute__malloc__
                        __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 CV*   newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block); */
+PERL_CALLCONV CV*      Perl_newATTRSUB_x(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block, bool o_is_gv);
 /* PERL_CALLCONV AV*   Perl_newAV(pTHX)
                        __attribute__warn_unused_result__; */
 
@@ -2721,6 +2773,7 @@ PERL_CALLCONV OP* Perl_newCVREF(pTHX_ I32 flags, OP* o)
                        __attribute__malloc__
                        __attribute__warn_unused_result__;
 
+PERL_CALLCONV void     Perl_newFORM(pTHX_ I32 floor, OP* o, OP* block);
 PERL_CALLCONV OP*      Perl_newFOROP(pTHX_ I32 flags, OP* sv, OP* expr, OP* block, OP* cont)
                        __attribute__malloc__
                        __attribute__warn_unused_result__
@@ -3037,7 +3090,7 @@ PERL_CALLCONV void        Perl_op_clear(pTHX_ OP* o)
 #define PERL_ARGS_ASSERT_OP_CLEAR      \
        assert(o)
 
-PERL_CALLCONV SV*      Perl_op_const_sv(pTHX_ const OP* o)
+PERL_CALLCONV SV*      Perl_op_const_sv(pTHX_ const OP* o, CV* cv)
                        __attribute__warn_unused_result__;
 
 PERL_CALLCONV OP*      Perl_op_contextualize(pTHX_ OP* o, I32 context)
@@ -3078,6 +3131,11 @@ PERL_CALLCONV void       Perl_pack_cat(pTHX_ SV *cat, const char *pat, const char *pat
 #define PERL_ARGS_ASSERT_PACK_CAT      \
        assert(cat); assert(pat); assert(patend); assert(beglist); assert(endlist); assert(next_in_list)
 
+PERL_CALLCONV void     Perl_package(pTHX_ OP* o)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_PACKAGE       \
+       assert(o)
+
 PERL_CALLCONV void     Perl_package_version(pTHX_ OP* v)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_PACKAGE_VERSION       \
@@ -3165,6 +3223,9 @@ PERL_CALLCONV OP* Perl_parse_fullstmt(pTHX_ U32 flags);
 PERL_CALLCONV SV*      Perl_parse_label(pTHX_ U32 flags);
 PERL_CALLCONV OP*      Perl_parse_listexpr(pTHX_ U32 flags);
 PERL_CALLCONV OP*      Perl_parse_stmtseq(pTHX_ U32 flags);
+PERL_CALLCONV OP *     Perl_parse_subsignature(pTHX)
+                       __attribute__warn_unused_result__;
+
 PERL_CALLCONV OP*      Perl_parse_termexpr(pTHX_ U32 flags);
 PERL_CALLCONV U32      Perl_parse_unicode_opts(pTHX_ const char **popt)
                        __attribute__nonnull__(pTHX_1);
@@ -3461,7 +3522,7 @@ PERL_CALLCONV void        Perl_reginitcolors(pTHX);
 PERL_CALLCONV regnode* Perl_regnext(pTHX_ regnode* p)
                        __attribute__warn_unused_result__;
 
-PERL_CALLCONV void     Perl_regprop(pTHX_ const regexp *prog, SV* sv, const regnode* o)
+PERL_CALLCONV void     Perl_regprop(pTHX_ const regexp *prog, SV* sv, const regnode* o, const regmatch_info *reginfo)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
 #define PERL_ARGS_ASSERT_REGPROP       \
@@ -3792,14 +3853,8 @@ PERL_CALLCONV char*      Perl_scan_vstring(pTHX_ const char *s, const char *const e,
 #define PERL_ARGS_ASSERT_SCAN_VSTRING  \
        assert(s); assert(e); assert(sv)
 
-PERL_CALLCONV char*    Perl_screaminstr(pTHX_ SV *bigstr, SV *littlestr, I32 start_shift, I32 end_shift, I32 *old_posp, I32 last)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_5);
-#define PERL_ARGS_ASSERT_SCREAMINSTR   \
-       assert(bigstr); assert(littlestr); assert(old_posp)
-
 PERL_CALLCONV U32      Perl_seed(pTHX);
+PERL_CALLCONV void     Perl_set_caret_X(pTHX);
 PERL_CALLCONV void     Perl_set_context(void *t)
                        __attribute__nonnull__(1);
 #define PERL_ARGS_ASSERT_SET_CONTEXT   \
@@ -3855,7 +3910,7 @@ PERL_CALLCONV void        Perl_sub_crush_depth(pTHX_ CV* cv)
 /* PERL_CALLCONV bool  sv_2bool(pTHX_ SV *const sv)
                        __attribute__nonnull__(pTHX_1); */
 
-PERL_CALLCONV bool     Perl_sv_2bool_flags(pTHX_ SV *const sv, const I32 flags)
+PERL_CALLCONV bool     Perl_sv_2bool_flags(pTHX_ SV *sv, I32 flags)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_SV_2BOOL_FLAGS        \
        assert(sv)
@@ -3871,17 +3926,37 @@ PERL_CALLCONV IO*       Perl_sv_2io(pTHX_ SV *const sv)
 #define PERL_ARGS_ASSERT_SV_2IO        \
        assert(sv)
 
-/* PERL_CALLCONV IV    Perl_sv_2iv(pTHX_ SV *sv); */
-PERL_CALLCONV IV       Perl_sv_2iv_flags(pTHX_ SV *const sv, const I32 flags);
+/* PERL_CALLCONV IV    Perl_sv_2iv(pTHX_ SV *sv)
+                       __attribute__nonnull__(pTHX_1); */
+#define PERL_ARGS_ASSERT_SV_2IV        \
+       assert(sv)
+
+PERL_CALLCONV IV       Perl_sv_2iv_flags(pTHX_ SV *const sv, const I32 flags)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_SV_2IV_FLAGS  \
+       assert(sv)
+
 PERL_CALLCONV SV*      Perl_sv_2mortal(pTHX_ SV *const sv);
 PERL_CALLCONV SV*      Perl_sv_2num(pTHX_ SV *const sv)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_SV_2NUM       \
        assert(sv)
 
-PERL_CALLCONV NV       Perl_sv_2nv_flags(pTHX_ SV *const sv, const I32 flags);
-/* PERL_CALLCONV char* Perl_sv_2pv(pTHX_ SV *sv, STRLEN *lp); */
-PERL_CALLCONV char*    Perl_sv_2pv_flags(pTHX_ SV *const sv, STRLEN *const lp, const I32 flags);
+PERL_CALLCONV NV       Perl_sv_2nv_flags(pTHX_ SV *const sv, const I32 flags)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_SV_2NV_FLAGS  \
+       assert(sv)
+
+/* PERL_CALLCONV char* Perl_sv_2pv(pTHX_ SV *sv, STRLEN *lp)
+                       __attribute__nonnull__(pTHX_1); */
+#define PERL_ARGS_ASSERT_SV_2PV        \
+       assert(sv)
+
+PERL_CALLCONV char*    Perl_sv_2pv_flags(pTHX_ SV *const sv, STRLEN *const lp, const I32 flags)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_SV_2PV_FLAGS  \
+       assert(sv)
+
 /* PERL_CALLCONV char* Perl_sv_2pv_nolen(pTHX_ SV* sv)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1); */
@@ -3910,8 +3985,16 @@ PERL_CALLCONV char*      Perl_sv_2pvutf8(pTHX_ SV *sv, STRLEN *const lp)
 #define PERL_ARGS_ASSERT_SV_2PVUTF8_NOLEN      \
        assert(sv)
 
-/* PERL_CALLCONV UV    Perl_sv_2uv(pTHX_ SV *sv); */
-PERL_CALLCONV UV       Perl_sv_2uv_flags(pTHX_ SV *const sv, const I32 flags);
+/* PERL_CALLCONV UV    Perl_sv_2uv(pTHX_ SV *sv)
+                       __attribute__nonnull__(pTHX_1); */
+#define PERL_ARGS_ASSERT_SV_2UV        \
+       assert(sv)
+
+PERL_CALLCONV UV       Perl_sv_2uv_flags(pTHX_ SV *const sv, const I32 flags)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_SV_2UV_FLAGS  \
+       assert(sv)
+
 PERL_CALLCONV int      Perl_sv_backoff(pTHX_ SV *const sv)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_SV_BACKOFF    \
@@ -4786,6 +4869,11 @@ PERL_CALLCONV UV Perl_utf8n_to_uvuni(pTHX_ const U8 *s, STRLEN curlen, STRLEN *r
 #define PERL_ARGS_ASSERT_UTF8N_TO_UVUNI        \
        assert(s)
 
+PERL_CALLCONV void     Perl_utilize(pTHX_ int aver, I32 floor, OP* version, OP* idop, OP* arg)
+                       __attribute__nonnull__(pTHX_4);
+#define PERL_ARGS_ASSERT_UTILIZE       \
+       assert(idop)
+
 /* PERL_CALLCONV U8*   uvchr_to_utf8(pTHX_ U8 *d, UV uv)
                        __attribute__nonnull__(pTHX_1); */
 
@@ -5022,20 +5110,22 @@ PERL_CALLCONV void*     Perl_my_cxt_init(pTHX_ int *index, size_t size)
 
 #  endif
 #endif
-#if !(defined(PERL_MAD))
-PERL_CALLCONV void     Perl_newFORM(pTHX_ I32 floor, OP* o, OP* block);
-PERL_CALLCONV void     Perl_package(pTHX_ OP* o)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_PACKAGE       \
-       assert(o)
-
-PERL_CALLCONV void     Perl_utilize(pTHX_ int aver, I32 floor, OP* version, OP* idop, OP* arg)
-                       __attribute__nonnull__(pTHX_4);
-#define PERL_ARGS_ASSERT_UTILIZE       \
-       assert(idop)
+#if !(defined(WIN32))
+/* PERL_CALLCONV char* my_setlocale(pTHX_ int category, const char* locale)
+                       __attribute__pure__; */
 
 #endif
 #if !(defined(_MSC_VER))
+PERL_CALLCONV_NO_RET OP*       Perl_die(pTHX_ const char* pat, ...)
+                       __attribute__noreturn__
+                       __attribute__format__null_ok__(__printf__,pTHX_1,pTHX_2);
+
+PERL_CALLCONV_NO_RET OP*       Perl_die_sv(pTHX_ SV *baseex)
+                       __attribute__noreturn__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_DIE_SV        \
+       assert(baseex)
+
 PERL_CALLCONV_NO_RET int       Perl_magic_regdatum_set(pTHX_ SV* sv, MAGIC* mg)
                        __attribute__noreturn__
                        __attribute__nonnull__(pTHX_1)
@@ -5043,6 +5133,20 @@ PERL_CALLCONV_NO_RET int Perl_magic_regdatum_set(pTHX_ SV* sv, MAGIC* mg)
 #define PERL_ARGS_ASSERT_MAGIC_REGDATUM_SET    \
        assert(sv); assert(mg)
 
+PERL_CALLCONV_NO_RET char*     Perl_screaminstr(pTHX_ SV *bigstr, SV *littlestr, I32 start_shift, I32 end_shift, I32 *old_posp, I32 last)
+                       __attribute__noreturn__
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_5);
+#define PERL_ARGS_ASSERT_SCREAMINSTR   \
+       assert(bigstr); assert(littlestr); assert(old_posp)
+
+#  if defined(PERL_IMPLICIT_CONTEXT)
+PERL_CALLCONV_NO_RET OP*       Perl_die_nocontext(const char* pat, ...)
+                       __attribute__noreturn__
+                       __attribute__format__null_ok__(__printf__,1,2);
+
+#  endif
 #endif
 #if !defined(HAS_BZERO) && !defined(HAS_MEMSET)
 PERL_CALLCONV char*    Perl_my_bzero(char* loc, I32 len)
@@ -5261,9 +5365,14 @@ STATIC bool      S_put_latin1_charclass_innards(pTHX_ SV* sv, char* bitmap)
 #define PERL_ARGS_ASSERT_PUT_LATIN1_CHARCLASS_INNARDS  \
        assert(sv); assert(bitmap)
 
+STATIC void    S_put_range(pTHX_ SV* sv, UV start, UV end)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_PUT_RANGE     \
+       assert(sv)
+
 STATIC void    S_regdump_extflags(pTHX_ const char *lead, const U32 flags);
 STATIC void    S_regdump_intflags(pTHX_ const char *lead, const U32 flags);
-STATIC U8      S_regtail_study(pTHX_ struct RExC_state_t *pRExC_state, regnode *p, const regnode *val, U32 depth)
+STATIC U8      S_regtail_study(pTHX_ RExC_state_t *pRExC_state, regnode *p, const regnode *val, U32 depth)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
@@ -5299,6 +5408,7 @@ STATIC void       S_del_sv(pTHX_ SV *p)
 #  endif
 #  if defined(PERL_IN_TOKE_C)
 STATIC void    S_printbuf(pTHX_ const char *const fmt, const char *const s)
+                       __attribute__format__(__printf__,pTHX_1,0)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT_PRINTBUF      \
@@ -5318,13 +5428,6 @@ PERL_CALLCONV void       Perl_dump_sv_child(pTHX_ SV *sv)
        assert(sv)
 
 #endif
-#if defined(DUMP_FDS)
-PERL_CALLCONV void     Perl_dump_fds(pTHX_ char* s)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_DUMP_FDS      \
-       assert(s)
-
-#endif
 #if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM)
 PERL_CALLCONV I32      Perl_do_ipcctl(pTHX_ I32 optype, SV** mark, SV** sp)
                        __attribute__nonnull__(pTHX_2)
@@ -5432,6 +5535,12 @@ PERL_CALLCONV void       Perl_parser_free_nexttoke_ops(pTHX_ yy_parser *parser, OPSLAB
 #define PERL_ARGS_ASSERT_PARSER_FREE_NEXTTOKE_OPS      \
        assert(parser); assert(slab)
 
+PERL_STATIC_INLINE bool        S_should_warn_nl(const char *pv)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(1);
+#define PERL_ARGS_ASSERT_SHOULD_WARN_NL        \
+       assert(pv)
+
 #  if defined(PERL_DEBUG_READONLY_OPS)
 PERL_CALLCONV void     Perl_Slab_to_ro(pTHX_ OPSLAB *slab)
                        __attribute__nonnull__(pTHX_1);
@@ -5463,6 +5572,20 @@ STATIC void      S_strip_return(pTHX_ SV *sv)
 
 #  endif
 #endif
+#if defined(PERL_DEBUG_READONLY_COW)
+PERL_CALLCONV void     Perl_sv_buf_to_ro(pTHX_ SV *sv)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_SV_BUF_TO_RO  \
+       assert(sv)
+
+#  if defined(PERL_IN_SV_C)
+STATIC void    S_sv_buf_to_rw(pTHX_ SV *sv)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_SV_BUF_TO_RW  \
+       assert(sv)
+
+#  endif
+#endif
 #if defined(PERL_DEBUG_READONLY_OPS)
 PERL_CALLCONV PADOFFSET        Perl_op_refcnt_dec(pTHX_ OP *o)
                        __attribute__nonnull__(pTHX_1);
@@ -5513,9 +5636,6 @@ PERL_CALLCONV void        Perl_deb_nocontext(const char* pat, ...)
 #define PERL_ARGS_ASSERT_DEB_NOCONTEXT \
        assert(pat)
 
-PERL_CALLCONV OP*      Perl_die_nocontext(const char* pat, ...)
-                       __attribute__format__null_ok__(__printf__,1,2);
-
 PERL_CALLCONV char*    Perl_form_nocontext(const char* pat, ...)
                        __attribute__format__(__printf__,1,2)
                        __attribute__nonnull__(1);
@@ -5592,6 +5712,11 @@ PERL_CALLCONV void       Perl_warner_nocontext(U32 err, const char* pat, ...)
 #define PERL_ARGS_ASSERT_WARNER_NOCONTEXT      \
        assert(pat)
 
+#  if defined(_MSC_VER)
+PERL_CALLCONV OP*      Perl_die_nocontext(const char* pat, ...)
+                       __attribute__format__null_ok__(__printf__,1,2);
+
+#  endif
 #endif
 #if defined(PERL_IMPLICIT_SYS)
 PERL_CALLCONV PerlInterpreter* perl_alloc_using(struct IPerlMem *ipM, struct IPerlMem *ipMS, struct IPerlMem *ipMP, struct IPerlEnv *ipE, struct IPerlStdIO *ipStd, struct IPerlLIO *ipLIO, struct IPerlDir *ipD, struct IPerlSock *ipS, struct IPerlProc *ipP)
@@ -5647,6 +5772,24 @@ STATIC void      S_exec_failed(pTHX_ const char *cmd, int fd, int do_report)
 STATIC bool    S_ingroup(pTHX_ Gid_t testgid, bool effective)
                        __attribute__warn_unused_result__;
 
+STATIC bool    S_openn_cleanup(pTHX_ GV *gv, IO *io, PerlIO *fp, char *mode, const char *oname, PerlIO *saveifp, PerlIO *saveofp, int savefd, char savetype, int writing, bool was_fdopen, const char *type)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_4)
+                       __attribute__nonnull__(pTHX_5);
+#define PERL_ARGS_ASSERT_OPENN_CLEANUP \
+       assert(gv); assert(io); assert(mode); assert(oname)
+
+STATIC IO *    S_openn_setup(pTHX_ GV *gv, char *mode, PerlIO **saveifp, PerlIO **saveofp, int *savefd, char *savetype)
+                       __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_OPENN_SETUP   \
+       assert(gv); assert(mode); assert(saveifp); assert(saveofp); assert(savefd); assert(savetype)
+
 #endif
 #if defined(PERL_IN_DOOP_C)
 STATIC I32     S_do_trans_complex(pTHX_ SV * const sv)
@@ -5699,15 +5842,6 @@ STATIC SV*       S_pm_description(pTHX_ const PMOP *pm)
        assert(pm)
 
 STATIC UV      S_sequence_num(pTHX_ const OP *o);
-#  if defined(PERL_MAD)
-STATIC void    S_xmldump_attr(pTHX_ I32 level, PerlIO *file, const char* pat, ...)
-                       __attribute__format__(__printf__,pTHX_3,pTHX_4)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3);
-#define PERL_ARGS_ASSERT_XMLDUMP_ATTR  \
-       assert(file); assert(pat)
-
-#  endif
 #endif
 #if defined(PERL_IN_DUMP_C) || defined(PERL_IN_HV_C) || defined(PERL_IN_SV_C) || defined(PERL_IN_SCOPE_C)
 PERL_CALLCONV void     Perl_hv_kill_backrefs(pTHX_ HV *hv)
@@ -5717,16 +5851,49 @@ PERL_CALLCONV void      Perl_hv_kill_backrefs(pTHX_ HV *hv)
 
 #endif
 #if defined(PERL_IN_GV_C)
+STATIC bool    S_find_default_stash(pTHX_ HV **stash, const char *name, STRLEN len, const U32 is_utf8, const I32 add, svtype sv_type)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_FIND_DEFAULT_STASH    \
+       assert(stash); 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        \
        assert(gv)
 
+STATIC bool    S_gv_is_in_main(pTHX_ const char *name, STRLEN len, const U32 is_utf8)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_GV_IS_IN_MAIN \
+       assert(name)
+
+STATIC bool    S_gv_magicalize(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len, bool addmg, svtype sv_type)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3);
+#define PERL_ARGS_ASSERT_GV_MAGICALIZE \
+       assert(gv); assert(stash); assert(name)
+
 STATIC void    S_gv_magicalize_isa(pTHX_ GV *gv)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_GV_MAGICALIZE_ISA     \
        assert(gv)
 
+STATIC void    S_maybe_multimagic_gv(pTHX_ GV *gv, const char *name, const svtype sv_type)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_MAYBE_MULTIMAGIC_GV   \
+       assert(gv); assert(name)
+
+STATIC bool    S_parse_gv_stash_name(pTHX_ HV **stash, GV **gv, const char **name, STRLEN *len, const char *nambeg, STRLEN full_len, const U32 is_utf8, const I32 add)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3)
+                       __attribute__nonnull__(pTHX_4)
+                       __attribute__nonnull__(pTHX_5);
+#define PERL_ARGS_ASSERT_PARSE_GV_STASH_NAME   \
+       assert(stash); assert(gv); assert(name); assert(len); assert(nambeg)
+
 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)
@@ -5765,6 +5932,11 @@ STATIC struct xpvhv_aux* S_hv_auxinit(pTHX_ HV *hv)
 #define PERL_ARGS_ASSERT_HV_AUXINIT    \
        assert(hv)
 
+STATIC struct xpvhv_aux*       S_hv_auxinit_internal(struct xpvhv_aux *iter)
+                       __attribute__nonnull__(1);
+#define PERL_ARGS_ASSERT_HV_AUXINIT_INTERNAL   \
+       assert(iter)
+
 STATIC SV*     S_hv_delete_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen, int k_flags, I32 d_flags, U32 hash);
 STATIC SV*     S_hv_free_ent_ret(pTHX_ HV *hv, HE *entry)
                        __attribute__nonnull__(pTHX_1)
@@ -5826,14 +5998,6 @@ PERL_CALLCONV SV*        Perl_hfree_next_entry(pTHX_ HV *hv, STRLEN *indexp)
        assert(hv); assert(indexp)
 
 #endif
-#if defined(PERL_IN_LOCALE_C) && defined(USE_LOCALE)
-STATIC bool    S_is_cur_LC_category_utf8(pTHX_ int category);
-STATIC char*   S_stdize_locale(pTHX_ char* locs)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_STDIZE_LOCALE \
-       assert(locs)
-
-#endif
 #if defined(PERL_IN_MALLOC_C)
 STATIC int     S_adjust_size_and_find_bucket(size_t *nbytes_p)
                        __attribute__nonnull__(1);
@@ -5842,6 +6006,11 @@ STATIC int       S_adjust_size_and_find_bucket(size_t *nbytes_p)
 
 #endif
 #if defined(PERL_IN_MG_C)
+STATIC void    S_fixup_errno_string(pTHX_ SV* sv)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_FIXUP_ERRNO_STRING    \
+       assert(sv)
+
 STATIC SV*     S_magic_methcall1(pTHX_ SV *sv, const MAGIC *mg, SV *meth, U32 flags, int n, SV *val)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
@@ -5873,7 +6042,7 @@ PERL_CALLCONV bool        Perl_translate_substr_offsets(pTHX_ STRLEN curlen, IV pos1_iv
 
 #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)
+STATIC void    S_mro_clean_isarev(pTHX_ HV * const isa, const char * const name, const STRLEN len, HV * const exceptions, U32 hash, U32 flags)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT_MRO_CLEAN_ISAREV      \
@@ -5982,6 +6151,13 @@ STATIC bool      S_looks_like_bool(pTHX_ const OP* o)
        assert(o)
 
 STATIC OP*     S_modkids(pTHX_ OP *o, I32 type);
+STATIC void    S_move_proto_attr(pTHX_ OP **proto, OP **attrs, const GV *name)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3);
+#define PERL_ARGS_ASSERT_MOVE_PROTO_ATTR       \
+       assert(proto); assert(attrs); assert(name)
+
 STATIC OP *    S_my_kid(pTHX_ OP *o, OP *attrs, OP **imopsp)
                        __attribute__nonnull__(pTHX_3);
 #define PERL_ARGS_ASSERT_MY_KID        \
@@ -6013,6 +6189,11 @@ STATIC OP*       S_no_fh_allowed(pTHX_ OP *o)
 #define PERL_ARGS_ASSERT_NO_FH_ALLOWED \
        assert(o)
 
+STATIC void    S_null_listop_in_list_context(pTHX_ OP* o)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_NULL_LISTOP_IN_LIST_CONTEXT   \
+       assert(o)
+
 PERL_STATIC_INLINE OP* S_op_integerize(pTHX_ OP *o)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_OP_INTEGERIZE \
@@ -6197,7 +6378,7 @@ PERL_CALLCONV GV* Perl_softref2xv(pTHX_ SV *const sv, const char *const what, co
 
 #endif
 #if defined(PERL_IN_PP_CTL_C)
-STATIC SV **   S_adjust_stack_on_leave(pTHX_ SV **newsp, SV **sp, SV **mark, I32 gimme, U32 flags)
+STATIC SV **   S_adjust_stack_on_leave(pTHX_ SV **newsp, SV **sp, SV **mark, I32 gimme, U32 flags, bool lvalue)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
@@ -6407,12 +6588,6 @@ STATIC I32       S_amagic_cmp(pTHX_ SV *const str1, SV *const str2)
 #define PERL_ARGS_ASSERT_AMAGIC_CMP    \
        assert(str1); assert(str2)
 
-STATIC I32     S_amagic_cmp_locale(pTHX_ SV *const str1, SV *const str2)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
-#define PERL_ARGS_ASSERT_AMAGIC_CMP_LOCALE     \
-       assert(str1); assert(str2)
-
 STATIC I32     S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
@@ -6460,14 +6635,21 @@ STATIC I32      S_sv_ncmp(pTHX_ SV *const a, SV *const b)
 #define PERL_ARGS_ASSERT_SV_NCMP       \
        assert(a); assert(b)
 
+#  if defined(USE_LOCALE_COLLATE)
+STATIC I32     S_amagic_cmp_locale(pTHX_ SV *const str1, SV *const str2)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_AMAGIC_CMP_LOCALE     \
+       assert(str1); assert(str2)
+
+#  endif
 #endif
 #if defined(PERL_IN_PP_SYS_C)
 STATIC OP*     S_doform(pTHX_ CV *cv, GV *gv, OP *retop)
                        __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3);
+                       __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT_DOFORM        \
-       assert(cv); assert(gv); assert(retop)
+       assert(cv); assert(gv)
 
 STATIC SV *    S_space_join_names_mortal(pTHX_ char *const *array)
                        __attribute__nonnull__(pTHX_1);
@@ -6481,104 +6663,85 @@ STATIC void    S__append_range_to_invlist(pTHX_ SV* const invlist, const UV start,
 #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)
+PERL_STATIC_INLINE UV* S__invlist_array_init(SV* const invlist, const bool will_have_0)
                        __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
+                       __attribute__nonnull__(1);
 #define PERL_ARGS_ASSERT__INVLIST_ARRAY_INIT   \
        assert(invlist)
 
-STATIC SV*     S__new_invlist_C_array(pTHX_ const UV* const list)
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT__NEW_INVLIST_C_ARRAY  \
-       assert(list)
+STATIC void    S_add_above_Latin1_folds(pTHX_ RExC_state_t *pRExC_state, const U8 cp, SV** invlist)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_3);
+#define PERL_ARGS_ASSERT_ADD_ABOVE_LATIN1_FOLDS        \
+       assert(pRExC_state); assert(invlist)
 
 PERL_STATIC_INLINE SV* S_add_cp_to_invlist(pTHX_ SV* invlist, const UV cp)
                        __attribute__warn_unused_result__;
 
-STATIC U32     S_add_data(struct RExC_state_t *pRExC_state, U32 n, const char *s)
+STATIC U32     S_add_data(RExC_state_t* const pRExC_state, const char* const s, const U32 n)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(1)
-                       __attribute__nonnull__(3);
+                       __attribute__nonnull__(2);
 #define PERL_ARGS_ASSERT_ADD_DATA      \
        assert(pRExC_state); assert(s)
 
-PERL_STATIC_INLINE void        S_alloc_maybe_populate_EXACT(pTHX_ struct RExC_state_t *pRExC_state, regnode *node, I32 *flagp, STRLEN len, UV code_point)
+PERL_STATIC_INLINE void        S_alloc_maybe_populate_EXACT(pTHX_ RExC_state_t *pRExC_state, regnode *node, I32 *flagp, STRLEN len, UV code_point, bool downgradable)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
 #define PERL_ARGS_ASSERT_ALLOC_MAYBE_POPULATE_EXACT    \
        assert(pRExC_state); assert(node); assert(flagp)
 
-STATIC void    S_cl_and(struct regnode_charclass_class *cl, const struct regnode_charclass_class *and_with)
-                       __attribute__nonnull__(1)
-                       __attribute__nonnull__(2);
-#define PERL_ARGS_ASSERT_CL_AND        \
-       assert(cl); assert(and_with)
-
-STATIC void    S_cl_anything(const struct RExC_state_t *pRExC_state, struct regnode_charclass_class *cl)
-                       __attribute__nonnull__(1)
-                       __attribute__nonnull__(2);
-#define PERL_ARGS_ASSERT_CL_ANYTHING   \
-       assert(pRExC_state); assert(cl)
-
-STATIC void    S_cl_init(const struct RExC_state_t *pRExC_state, struct regnode_charclass_class *cl)
-                       __attribute__nonnull__(1)
-                       __attribute__nonnull__(2);
-#define PERL_ARGS_ASSERT_CL_INIT       \
-       assert(pRExC_state); assert(cl)
-
-STATIC int     S_cl_is_anything(const struct regnode_charclass_class *cl)
-                       __attribute__warn_unused_result__
+PERL_STATIC_INLINE U8  S_compute_EXACTish(RExC_state_t *pRExC_state)
                        __attribute__nonnull__(1);
-#define PERL_ARGS_ASSERT_CL_IS_ANYTHING        \
-       assert(cl)
-
-STATIC void    S_cl_or(const struct RExC_state_t *pRExC_state, struct regnode_charclass_class *cl, const struct regnode_charclass_class *or_with)
-                       __attribute__nonnull__(1)
-                       __attribute__nonnull__(2)
-                       __attribute__nonnull__(3);
-#define PERL_ARGS_ASSERT_CL_OR \
-       assert(pRExC_state); assert(cl); assert(or_with)
-
-PERL_STATIC_INLINE U8  S_compute_EXACTish(pTHX_ struct RExC_state_t *pRExC_state)
-                       __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_COMPUTE_EXACTISH      \
        assert(pRExC_state)
 
-STATIC bool    S_could_it_be_a_POSIX_class(pTHX_ struct RExC_state_t *pRExC_state)
-                       __attribute__nonnull__(pTHX_1);
+STATIC regnode *       S_construct_ahocorasick_from_trie(pTHX_ RExC_state_t *pRExC_state, regnode *source, U32 depth)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_CONSTRUCT_AHOCORASICK_FROM_TRIE       \
+       assert(pRExC_state); assert(source)
+
+STATIC bool    S_could_it_be_a_POSIX_class(RExC_state_t *pRExC_state)
+                       __attribute__nonnull__(1);
 #define PERL_ARGS_ASSERT_COULD_IT_BE_A_POSIX_CLASS     \
        assert(pRExC_state)
 
-PERL_STATIC_INLINE STRLEN*     S_get_invlist_iter_addr(pTHX_ SV* invlist)
+STATIC SV*     S_get_ANYOF_cp_list_for_ssc(pTHX_ const RExC_state_t *pRExC_state, const regnode_charclass* const node)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_GET_ANYOF_CP_LIST_FOR_SSC     \
+       assert(pRExC_state); assert(node)
+
+PERL_STATIC_INLINE STRLEN*     S_get_invlist_iter_addr(SV* invlist)
                        __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
+                       __attribute__nonnull__(1);
 #define PERL_ARGS_ASSERT_GET_INVLIST_ITER_ADDR \
        assert(invlist)
 
-PERL_STATIC_INLINE IV* S_get_invlist_previous_index_addr(pTHX_ SV* invlist)
+PERL_STATIC_INLINE IV* S_get_invlist_previous_index_addr(SV* invlist)
                        __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
+                       __attribute__nonnull__(1);
 #define PERL_ARGS_ASSERT_GET_INVLIST_PREVIOUS_INDEX_ADDR       \
        assert(invlist)
 
-STATIC bool    S_grok_bslash_N(pTHX_ struct RExC_state_t *pRExC_state, regnode** nodep, UV *valuep, I32 *flagp, U32 depth, bool in_char_class, const bool strict)
+STATIC bool    S_grok_bslash_N(pTHX_ RExC_state_t *pRExC_state, regnode** nodep, UV *valuep, I32 *flagp, U32 depth, bool in_char_class, const bool strict)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_4);
 #define PERL_ARGS_ASSERT_GROK_BSLASH_N \
        assert(pRExC_state); assert(flagp)
 
-STATIC regnode*        S_handle_regex_sets(pTHX_ struct RExC_state_t *pRExC_state, SV ** return_invlist, I32 *flagp, U32 depth, char * const oregcomp_parse)
+STATIC regnode*        S_handle_regex_sets(pTHX_ RExC_state_t *pRExC_state, SV ** return_invlist, I32 *flagp, U32 depth, char * const oregcomp_parse)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_3)
                        __attribute__nonnull__(pTHX_5);
 #define PERL_ARGS_ASSERT_HANDLE_REGEX_SETS     \
        assert(pRExC_state); assert(flagp); assert(oregcomp_parse)
 
-PERL_STATIC_INLINE UV* S_invlist_array(pTHX_ SV* const invlist)
+PERL_STATIC_INLINE UV* S_invlist_array(SV* const invlist)
                        __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
+                       __attribute__nonnull__(1);
 #define PERL_ARGS_ASSERT_INVLIST_ARRAY \
        assert(invlist)
 
@@ -6593,45 +6756,45 @@ STATIC void     S_invlist_extend(pTHX_ SV* const invlist, const UV len)
 #define PERL_ARGS_ASSERT_INVLIST_EXTEND        \
        assert(invlist)
 
-PERL_STATIC_INLINE UV  S_invlist_highest(pTHX_ SV* const invlist)
+PERL_STATIC_INLINE UV  S_invlist_highest(SV* const invlist)
                        __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
+                       __attribute__nonnull__(1);
 #define PERL_ARGS_ASSERT_INVLIST_HIGHEST       \
        assert(invlist)
 
-PERL_STATIC_INLINE bool        S_invlist_is_iterating(pTHX_ SV* const invlist)
+PERL_STATIC_INLINE bool        S_invlist_is_iterating(SV* const invlist)
                        __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
+                       __attribute__nonnull__(1);
 #define PERL_ARGS_ASSERT_INVLIST_IS_ITERATING  \
        assert(invlist)
 
-PERL_STATIC_INLINE void        S_invlist_iterfinish(pTHX_ SV* invlist)
-                       __attribute__nonnull__(pTHX_1);
+PERL_STATIC_INLINE void        S_invlist_iterfinish(SV* invlist)
+                       __attribute__nonnull__(1);
 #define PERL_ARGS_ASSERT_INVLIST_ITERFINISH    \
        assert(invlist)
 
-PERL_STATIC_INLINE void        S_invlist_iterinit(pTHX_ SV* invlist)
-                       __attribute__nonnull__(pTHX_1);
+PERL_STATIC_INLINE void        S_invlist_iterinit(SV* invlist)
+                       __attribute__nonnull__(1);
 #define PERL_ARGS_ASSERT_INVLIST_ITERINIT      \
        assert(invlist)
 
-STATIC bool    S_invlist_iternext(pTHX_ SV* invlist, UV* start, UV* end)
+STATIC bool    S_invlist_iternext(SV* invlist, UV* start, UV* end)
                        __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3);
+                       __attribute__nonnull__(1)
+                       __attribute__nonnull__(2)
+                       __attribute__nonnull__(3);
 #define PERL_ARGS_ASSERT_INVLIST_ITERNEXT      \
        assert(invlist); assert(start); assert(end)
 
-PERL_STATIC_INLINE UV  S_invlist_max(pTHX_ SV* const invlist)
+PERL_STATIC_INLINE UV  S_invlist_max(SV* const invlist)
                        __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
+                       __attribute__nonnull__(1);
 #define PERL_ARGS_ASSERT_INVLIST_MAX   \
        assert(invlist)
 
-PERL_STATIC_INLINE IV  S_invlist_previous_index(pTHX_ SV* const invlist)
+PERL_STATIC_INLINE IV  S_invlist_previous_index(SV* const invlist)
                        __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
+                       __attribute__nonnull__(1);
 #define PERL_ARGS_ASSERT_INVLIST_PREVIOUS_INDEX        \
        assert(invlist)
 
@@ -6640,25 +6803,25 @@ PERL_STATIC_INLINE void S_invlist_set_len(pTHX_ SV* const invlist, const UV len,
 #define PERL_ARGS_ASSERT_INVLIST_SET_LEN       \
        assert(invlist)
 
-PERL_STATIC_INLINE void        S_invlist_set_previous_index(pTHX_ SV* const invlist, const IV index)
-                       __attribute__nonnull__(pTHX_1);
+PERL_STATIC_INLINE void        S_invlist_set_previous_index(SV* const invlist, const IV index)
+                       __attribute__nonnull__(1);
 #define PERL_ARGS_ASSERT_INVLIST_SET_PREVIOUS_INDEX    \
        assert(invlist)
 
-PERL_STATIC_INLINE void        S_invlist_trim(pTHX_ SV* const invlist)
-                       __attribute__nonnull__(pTHX_1);
+PERL_STATIC_INLINE void        S_invlist_trim(SV* const invlist)
+                       __attribute__nonnull__(1);
 #define PERL_ARGS_ASSERT_INVLIST_TRIM  \
        assert(invlist)
 
-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)
+STATIC U32     S_join_exact(pTHX_ RExC_state_t *pRExC_state, regnode *scan, UV *min_subtract, bool *unfolded_multi_char, U32 flags, regnode *val, U32 depth)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3)
                        __attribute__nonnull__(pTHX_4);
 #define PERL_ARGS_ASSERT_JOIN_EXACT    \
-       assert(pRExC_state); assert(scan); assert(min_subtract); assert(has_exactf_sharp_s)
+       assert(pRExC_state); assert(scan); assert(min_subtract); assert(unfolded_multi_char)
 
-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)
+STATIC I32     S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *first, regnode *last, regnode *tail, U32 word_count, U32 flags, U32 depth)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3)
@@ -6667,37 +6830,36 @@ STATIC I32      S_make_trie(pTHX_ struct RExC_state_t *pRExC_state, regnode *startbra
 #define PERL_ARGS_ASSERT_MAKE_TRIE     \
        assert(pRExC_state); assert(startbranch); assert(first); assert(last); assert(tail)
 
-STATIC void    S_make_trie_failtable(pTHX_ struct RExC_state_t *pRExC_state, regnode *source, regnode *stclass, U32 depth)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3);
-#define PERL_ARGS_ASSERT_MAKE_TRIE_FAILTABLE   \
-       assert(pRExC_state); assert(source); assert(stclass)
-
-STATIC char *  S_nextchar(pTHX_ struct RExC_state_t *pRExC_state)
+STATIC char *  S_nextchar(pTHX_ RExC_state_t *pRExC_state)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_NEXTCHAR      \
        assert(pRExC_state)
 
-STATIC void    S_parse_lparen_question_flags(pTHX_ struct RExC_state_t *pRExC_state)
+STATIC void    S_parse_lparen_question_flags(pTHX_ RExC_state_t *pRExC_state)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_PARSE_LPAREN_QUESTION_FLAGS   \
        assert(pRExC_state)
 
-PERL_STATIC_NO_RET void        S_re_croak2(pTHX_ const char* pat1, const char* pat2, ...)
-                       __attribute__noreturn__
+STATIC void    S_populate_ANYOF_from_invlist(pTHX_ regnode *node, SV** invlist_ptr)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_POPULATE_ANYOF_FROM_INVLIST   \
+       assert(node); assert(invlist_ptr)
+
+PERL_STATIC_NO_RET void        S_re_croak2(pTHX_ bool utf8, const char* pat1, const char* pat2, ...)
+                       __attribute__noreturn__
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3);
 #define PERL_ARGS_ASSERT_RE_CROAK2     \
        assert(pat1); assert(pat2)
 
-STATIC regnode*        S_reg(pTHX_ struct RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
+STATIC regnode*        S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_3);
 #define PERL_ARGS_ASSERT_REG   \
        assert(pRExC_state); assert(flagp)
 
-STATIC regnode*        S_reg_node(pTHX_ struct RExC_state_t *pRExC_state, U8 op)
+STATIC regnode*        S_reg_node(pTHX_ RExC_state_t *pRExC_state, U8 op)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_REG_NODE      \
        assert(pRExC_state)
@@ -6707,91 +6869,162 @@ STATIC UV      S_reg_recode(pTHX_ const char value, SV **encp)
 #define PERL_ARGS_ASSERT_REG_RECODE    \
        assert(encp)
 
-STATIC SV *    S_reg_scan_name(pTHX_ struct RExC_state_t *pRExC_state, U32 flags)
+STATIC SV *    S_reg_scan_name(pTHX_ RExC_state_t *pRExC_state, U32 flags)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_REG_SCAN_NAME \
        assert(pRExC_state)
 
-STATIC bool    S_reg_skipcomment(pTHX_ struct RExC_state_t *pRExC_state)
-                       __attribute__nonnull__(pTHX_1);
+PERL_STATIC_INLINE char *      S_reg_skipcomment(RExC_state_t *pRExC_state, char * p)
+                       __attribute__nonnull__(1)
+                       __attribute__nonnull__(2);
 #define PERL_ARGS_ASSERT_REG_SKIPCOMMENT       \
-       assert(pRExC_state)
+       assert(pRExC_state); assert(p)
 
-STATIC regnode*        S_reganode(pTHX_ struct RExC_state_t *pRExC_state, U8 op, U32 arg)
+STATIC regnode*        S_reganode(pTHX_ RExC_state_t *pRExC_state, U8 op, U32 arg)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_REGANODE      \
        assert(pRExC_state)
 
-STATIC regnode*        S_regatom(pTHX_ struct RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
+STATIC regnode*        S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT_REGATOM       \
        assert(pRExC_state); assert(flagp)
 
-STATIC regnode*        S_regbranch(pTHX_ struct RExC_state_t *pRExC_state, I32 *flagp, I32 first, U32 depth)
+STATIC regnode*        S_regbranch(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, I32 first, U32 depth)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT_REGBRANCH     \
        assert(pRExC_state); assert(flagp)
 
-STATIC regnode*        S_regclass(pTHX_ struct RExC_state_t *pRExC_state, I32 *flagp, U32 depth, const bool stop_at_1, bool allow_multi_fold, const bool silence_non_portable, SV** ret_invlist)
+STATIC regnode*        S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth, const bool stop_at_1, bool allow_multi_fold, const bool silence_non_portable, SV** ret_invlist)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT_REGCLASS      \
        assert(pRExC_state); assert(flagp)
 
-STATIC void    S_reginsert(pTHX_ struct RExC_state_t *pRExC_state, U8 op, regnode *opnd, U32 depth)
+STATIC void    S_reginsert(pTHX_ RExC_state_t *pRExC_state, U8 op, regnode *opnd, U32 depth)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_3);
 #define PERL_ARGS_ASSERT_REGINSERT     \
        assert(pRExC_state); assert(opnd)
 
-STATIC char *  S_regpatws(struct RExC_state_t *pRExC_state, char *p, const bool recognize_comment)
+STATIC char *  S_regpatws(RExC_state_t *pRExC_state, char *p, const bool recognize_comment)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(1)
                        __attribute__nonnull__(2);
 #define PERL_ARGS_ASSERT_REGPATWS      \
        assert(pRExC_state); assert(p)
 
-STATIC regnode*        S_regpiece(pTHX_ struct RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
+STATIC regnode*        S_regpiece(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT_REGPIECE      \
        assert(pRExC_state); assert(flagp)
 
-PERL_STATIC_INLINE I32 S_regpposixcc(pTHX_ struct RExC_state_t *pRExC_state, I32 value, const bool strict)
+PERL_STATIC_INLINE I32 S_regpposixcc(pTHX_ RExC_state_t *pRExC_state, I32 value, const bool strict)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_REGPPOSIXCC   \
        assert(pRExC_state)
 
-STATIC void    S_regtail(pTHX_ struct RExC_state_t *pRExC_state, regnode *p, const regnode *val, U32 depth)
+STATIC void    S_regtail(pTHX_ RExC_state_t *pRExC_state, regnode *p, const regnode *val, U32 depth)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
 #define PERL_ARGS_ASSERT_REGTAIL       \
        assert(pRExC_state); assert(p); assert(val)
 
-STATIC STRLEN  S_reguni(pTHX_ const struct RExC_state_t *pRExC_state, UV uv, char *s)
+PERL_STATIC_INLINE STRLEN      S_reguni(pTHX_ const RExC_state_t *pRExC_state, UV uv, char *s)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_3);
 #define PERL_ARGS_ASSERT_REGUNI        \
        assert(pRExC_state); assert(s)
 
-STATIC char *  S_regwhite(struct RExC_state_t *pRExC_state, char *p)
+STATIC void    S_scan_commit(pTHX_ const RExC_state_t *pRExC_state, struct scan_data_t *data, SSize_t *minlenp, int is_inf)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3);
+#define PERL_ARGS_ASSERT_SCAN_COMMIT   \
+       assert(pRExC_state); assert(data); assert(minlenp)
+
+STATIC void    S_set_ANYOF_arg(pTHX_ RExC_state_t* const pRExC_state, regnode* const node, SV* const cp_list, SV* const runtime_defns, SV* const only_utf8_locale_list, SV* const swash, const bool has_user_defined_property)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_SET_ANYOF_ARG \
+       assert(pRExC_state); assert(node)
+
+PERL_STATIC_INLINE void        S_ssc_add_range(pTHX_ regnode_ssc *ssc, UV const start, UV const end)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_SSC_ADD_RANGE \
+       assert(ssc)
+
+STATIC void    S_ssc_and(pTHX_ const RExC_state_t *pRExC_state, regnode_ssc *ssc, const regnode_charclass *and_with)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3);
+#define PERL_ARGS_ASSERT_SSC_AND       \
+       assert(pRExC_state); assert(ssc); assert(and_with)
+
+STATIC void    S_ssc_anything(pTHX_ regnode_ssc *ssc)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_SSC_ANYTHING  \
+       assert(ssc)
+
+PERL_STATIC_INLINE void        S_ssc_clear_locale(regnode_ssc *ssc)
+                       __attribute__nonnull__(1);
+#define PERL_ARGS_ASSERT_SSC_CLEAR_LOCALE      \
+       assert(ssc)
+
+PERL_STATIC_INLINE void        S_ssc_cp_and(pTHX_ regnode_ssc *ssc, UV const cp)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_SSC_CP_AND    \
+       assert(ssc)
+
+STATIC void    S_ssc_finalize(pTHX_ RExC_state_t *pRExC_state, regnode_ssc *ssc)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_SSC_FINALIZE  \
+       assert(pRExC_state); assert(ssc)
+
+STATIC void    S_ssc_init(pTHX_ const RExC_state_t *pRExC_state, regnode_ssc *ssc)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_SSC_INIT      \
+       assert(pRExC_state); assert(ssc)
+
+PERL_STATIC_INLINE void        S_ssc_intersection(pTHX_ regnode_ssc *ssc, SV* const invlist, const bool invert_2nd)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_SSC_INTERSECTION      \
+       assert(ssc); assert(invlist)
+
+STATIC int     S_ssc_is_anything(const regnode_ssc *ssc)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(1);
+#define PERL_ARGS_ASSERT_SSC_IS_ANYTHING       \
+       assert(ssc)
+
+STATIC int     S_ssc_is_cp_posixl_init(const RExC_state_t *pRExC_state, const regnode_ssc *ssc)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(1)
                        __attribute__nonnull__(2);
-#define PERL_ARGS_ASSERT_REGWHITE      \
-       assert(pRExC_state); assert(p)
+#define PERL_ARGS_ASSERT_SSC_IS_CP_POSIXL_INIT \
+       assert(pRExC_state); assert(ssc)
 
-STATIC void    S_scan_commit(pTHX_ const struct RExC_state_t *pRExC_state, struct scan_data_t *data, SSize_t *minlenp, int is_inf)
+STATIC void    S_ssc_or(pTHX_ const RExC_state_t *pRExC_state, regnode_ssc *ssc, const regnode_charclass *or_with)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
-#define PERL_ARGS_ASSERT_SCAN_COMMIT   \
-       assert(pRExC_state); assert(data); assert(minlenp)
+#define PERL_ARGS_ASSERT_SSC_OR        \
+       assert(pRExC_state); assert(ssc); assert(or_with)
 
-STATIC SSize_t S_study_chunk(pTHX_ struct RExC_state_t *pRExC_state, regnode **scanp, SSize_t *minlenp, SSize_t *deltap, regnode *last, struct scan_data_t *data, I32 stopparen, U8* recursed, struct regnode_charclass_class *and_withp, U32 flags, U32 depth)
+PERL_STATIC_INLINE void        S_ssc_union(pTHX_ regnode_ssc *ssc, SV* const invlist, const bool invert_2nd)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_SSC_UNION     \
+       assert(ssc); assert(invlist)
+
+STATIC SSize_t S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, SSize_t *minlenp, SSize_t *deltap, regnode *last, struct scan_data_t *data, I32 stopparen, U32 recursed_depth, regnode_ssc *and_withp, U32 flags, U32 depth)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3)
@@ -6810,6 +7043,22 @@ PERL_CALLCONV void       Perl__invlist_dump(pTHX_ PerlIO *file, I32 level, const char*
        assert(file); assert(indent); assert(invlist)
 
 #endif
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_PERL_C) || defined(PERL_IN_UTF8_C)
+PERL_CALLCONV SV*      Perl__new_invlist_C_array(pTHX_ const UV* const list)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT__NEW_INVLIST_C_ARRAY  \
+       assert(list)
+
+#endif
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C)
+PERL_CALLCONV SV*      Perl__get_regclass_nonbitmap_data(pTHX_ const regexp *prog, const struct regnode *node, bool doinit, SV **listsvp, SV **lonly_utf8_locale)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT__GET_REGCLASS_NONBITMAP_DATA  \
+       assert(node)
+
+PERL_CALLCONV void     Perl__load_PL_utf8_foldclosures(pTHX);
+#endif
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C)
 PERL_CALLCONV SV*      Perl__get_swash_invlist(pTHX_ SV* const swash)
                        __attribute__warn_unused_result__
@@ -6817,9 +7066,9 @@ PERL_CALLCONV SV* Perl__get_swash_invlist(pTHX_ SV* const swash)
 #define PERL_ARGS_ASSERT__GET_SWASH_INVLIST    \
        assert(swash)
 
-PERL_STATIC_INLINE bool        S__invlist_contains_cp(pTHX_ SV* const invlist, const UV cp)
+PERL_STATIC_INLINE bool        S__invlist_contains_cp(SV* const invlist, const UV cp)
                        __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
+                       __attribute__nonnull__(1);
 #define PERL_ARGS_ASSERT__INVLIST_CONTAINS_CP  \
        assert(invlist)
 
@@ -6829,15 +7078,15 @@ PERL_CALLCONV SV*       Perl__invlist_contents(pTHX_ SV* const invlist)
 #define PERL_ARGS_ASSERT__INVLIST_CONTENTS     \
        assert(invlist)
 
-PERL_STATIC_INLINE UV  S__invlist_len(pTHX_ SV* const invlist)
+PERL_STATIC_INLINE UV  S__invlist_len(SV* const invlist)
                        __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
+                       __attribute__nonnull__(1);
 #define PERL_ARGS_ASSERT__INVLIST_LEN  \
        assert(invlist)
 
-PERL_CALLCONV IV       Perl__invlist_search(pTHX_ SV* const invlist, const UV cp)
+PERL_CALLCONV IV       Perl__invlist_search(SV* const invlist, const UV cp)
                        __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
+                       __attribute__nonnull__(1);
 #define PERL_ARGS_ASSERT__INVLIST_SEARCH       \
        assert(invlist)
 
@@ -6847,9 +7096,9 @@ PERL_CALLCONV HV* Perl__swash_inversion_hash(pTHX_ SV* const swash)
 #define PERL_ARGS_ASSERT__SWASH_INVERSION_HASH \
        assert(swash)
 
-PERL_STATIC_INLINE bool*       S_get_invlist_offset_addr(pTHX_ SV* invlist)
+PERL_STATIC_INLINE bool*       S_get_invlist_offset_addr(SV* invlist)
                        __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
+                       __attribute__nonnull__(1);
 #define PERL_ARGS_ASSERT_GET_INVLIST_OFFSET_ADDR       \
        assert(invlist)
 
@@ -6871,7 +7120,7 @@ STATIC char*      S_form_short_octal_warning(pTHX_ const char * const s, const STRLEN
 #define PERL_ARGS_ASSERT_FORM_SHORT_OCTAL_WARNING      \
        assert(s)
 
-STATIC char    S_grok_bslash_c(pTHX_ const char source, const bool utf8, const bool output_warning)
+STATIC char    S_grok_bslash_c(pTHX_ const char source, const bool output_warning)
                        __attribute__warn_unused_result__;
 
 STATIC bool    S_grok_bslash_o(pTHX_ char** s, UV* uv, const char** error_msg, const bool output_warning, const bool strict, const bool silence_non_portable, const bool utf8)
@@ -6890,7 +7139,7 @@ PERL_STATIC_INLINE bool   S_grok_bslash_x(pTHX_ char** s, UV* uv, const char** err
 #define PERL_ARGS_ASSERT_GROK_BSLASH_X \
        assert(s); assert(uv); assert(error_msg)
 
-PERL_STATIC_INLINE I32 S_regcurly(pTHX_ const char *s, const bool rbrace_must_be_escaped)
+PERL_STATIC_INLINE I32 S_regcurly(pTHX_ const char *s)
                        __attribute__warn_unused_result__
                        __attribute__pure__
                        __attribute__nonnull__(pTHX_1);
@@ -6918,14 +7167,9 @@ PERL_CALLCONV void       Perl__invlist_invert(pTHX_ SV* const invlist)
 #define PERL_ARGS_ASSERT__INVLIST_INVERT       \
        assert(invlist)
 
-PERL_CALLCONV void     Perl__invlist_invert_prop(pTHX_ SV* const invlist)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT__INVLIST_INVERT_PROP  \
-       assert(invlist)
-
-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_4);
+PERL_CALLCONV void     Perl__invlist_populate_swatch(SV* const invlist, const UV start, const UV end, U8* swatch)
+                       __attribute__nonnull__(1)
+                       __attribute__nonnull__(4);
 #define PERL_ARGS_ASSERT__INVLIST_POPULATE_SWATCH      \
        assert(invlist); assert(swatch)
 
@@ -6947,6 +7191,12 @@ 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 SV*      Perl__setup_canned_invlist(pTHX_ const STRLEN size, const UV element0, UV** other_elements_ptr)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_3);
+#define PERL_ARGS_ASSERT__SETUP_CANNED_INVLIST \
+       assert(other_elements_ptr)
+
 PERL_CALLCONV SV*      Perl__swash_to_invlist(pTHX_ SV* const swash)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -6955,12 +7205,6 @@ 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)
-                       __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)
@@ -6979,10 +7223,10 @@ STATIC bool     S_isFOO_utf8_lc(pTHX_ const U8 classnum, const U8* character)
 #define PERL_ARGS_ASSERT_ISFOO_UTF8_LC \
        assert(character)
 
-STATIC I32     S_reg_check_named_buff_matched(pTHX_ const regexp *rex, const regnode *scan)
+STATIC I32     S_reg_check_named_buff_matched(const regexp *rex, const regnode *scan)
                        __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
+                       __attribute__nonnull__(1)
+                       __attribute__nonnull__(2);
 #define PERL_ARGS_ASSERT_REG_CHECK_NAMED_BUFF_MATCHED  \
        assert(rex); assert(scan)
 
@@ -7004,6 +7248,14 @@ STATIC U8*       S_reghop3(U8 *s, SSize_t off, const U8 *lim)
 #define PERL_ARGS_ASSERT_REGHOP3       \
        assert(s); assert(lim)
 
+STATIC U8*     S_reghop4(U8 *s, SSize_t off, const U8 *llim, const U8 *rlim)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(1)
+                       __attribute__nonnull__(3)
+                       __attribute__nonnull__(4);
+#define PERL_ARGS_ASSERT_REGHOP4       \
+       assert(s); assert(llim); assert(rlim)
+
 STATIC U8*     S_reghopmaybe3(U8 *s, SSize_t off, const U8 *lim)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(1)
@@ -7011,12 +7263,13 @@ STATIC U8*      S_reghopmaybe3(U8 *s, SSize_t off, const U8 *lim)
 #define PERL_ARGS_ASSERT_REGHOPMAYBE3  \
        assert(s); assert(lim)
 
-STATIC bool    S_reginclass(pTHX_ regexp * const prog, const regnode * const n, const U8 * const p, bool const utf8_target)
+STATIC bool    S_reginclass(pTHX_ regexp * const prog, const regnode * const n, const U8 * const p, const U8 * const p_end, bool const utf8_target)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3);
+                       __attribute__nonnull__(pTHX_3)
+                       __attribute__nonnull__(pTHX_4);
 #define PERL_ARGS_ASSERT_REGINCLASS    \
-       assert(n); assert(p)
+       assert(n); assert(p); assert(p_end)
 
 STATIC SSize_t S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog)
                        __attribute__warn_unused_result__
@@ -7052,16 +7305,6 @@ STATIC void      S_to_utf8_substr(pTHX_ regexp * prog)
 #define PERL_ARGS_ASSERT_TO_UTF8_SUBSTR        \
        assert(prog)
 
-#  if defined(XXX_dmq)
-STATIC U8*     S_reghop4(U8 *s, SSize_t off, const U8 *llim, const U8 *rlim)
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(1)
-                       __attribute__nonnull__(3)
-                       __attribute__nonnull__(4);
-#define PERL_ARGS_ASSERT_REGHOP4       \
-       assert(s); assert(llim); assert(rlim)
-
-#  endif
 #endif
 #if defined(PERL_IN_SCOPE_C)
 STATIC void    S_save_pushptri32ptr(pTHX_ void *const ptr1, const I32 i, void *const ptr2, const int type);
@@ -7135,11 +7378,6 @@ STATIC void      S_not_a_number(pTHX_ SV *const sv)
 #define PERL_ARGS_ASSERT_NOT_A_NUMBER  \
        assert(sv)
 
-STATIC void    S_not_incrementable(pTHX_ SV *const sv)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_NOT_INCREMENTABLE     \
-       assert(sv)
-
 STATIC PTR_TBL_ENT_t * S_ptr_table_find(PTR_TBL_t *const tbl, const void *const sv)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(1);
@@ -7156,12 +7394,6 @@ STATIC void      S_sv_add_arena(pTHX_ char *const ptr, const U32 size, const U32 flag
 #define PERL_ARGS_ASSERT_SV_ADD_ARENA  \
        assert(ptr)
 
-STATIC const char *    S_sv_display(pTHX_ SV *const sv, char *tmpbuf, STRLEN tmpbuf_size)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
-#define PERL_ARGS_ASSERT_SV_DISPLAY    \
-       assert(sv); assert(tmpbuf)
-
 STATIC STRLEN  S_sv_pos_b2u_midway(pTHX_ const U8 *const s, const U8 *const target, const U8 *end, STRLEN endu)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
@@ -7350,7 +7582,6 @@ STATIC void       S_parse_ident(pTHX_ char **s, char **d, char * const e, int allow_pa
        assert(s); assert(d); assert(e)
 
 STATIC int     S_pending_ident(pTHX);
-STATIC void    S_readpipe_override(pTHX);
 STATIC char*   S_scan_const(pTHX_ char *start)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -7369,12 +7600,11 @@ STATIC char*    S_scan_heredoc(pTHX_ char *s)
 #define PERL_ARGS_ASSERT_SCAN_HEREDOC  \
        assert(s)
 
-STATIC char*   S_scan_ident(pTHX_ char *s, const char *send, char *dest, STRLEN destlen, I32 ck_uni)
+STATIC char*   S_scan_ident(pTHX_ char *s, char *dest, STRLEN destlen, I32 ck_uni)
                        __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3);
+                       __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT_SCAN_IDENT    \
-       assert(s); assert(send); assert(dest)
+       assert(s); assert(dest)
 
 STATIC char*   S_scan_inputsymbol(pTHX_ char *start)
                        __attribute__warn_unused_result__
@@ -7388,7 +7618,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, int re_reparse, bool deprecate_escaped_matching)
+STATIC char*   S_scan_str(pTHX_ char *start, int keep_quoted, int keep_delims, int re_reparse, char **delimp)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_SCAN_STR      \
@@ -7451,25 +7681,6 @@ STATIC int       S_yywarn(pTHX_ const char *const s, U32 flags)
 #define PERL_ARGS_ASSERT_YYWARN        \
        assert(s)
 
-#  if defined(PERL_MAD)
-STATIC void    S_curmad(pTHX_ char slot, SV *sv);
-STATIC char*   S_skipspace0(pTHX_ char *s)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_SKIPSPACE0    \
-       assert(s)
-
-STATIC char*   S_skipspace1(pTHX_ char *s)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_SKIPSPACE1    \
-       assert(s)
-
-STATIC char*   S_skipspace2(pTHX_ char *s, SV **sv)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_SKIPSPACE2    \
-       assert(s)
-
-STATIC void    S_start_force(pTHX_ int where);
-#  endif
 #endif
 #if defined(PERL_IN_UNIVERSAL_C)
 STATIC bool    S_isa_lookup(pTHX_ HV *stash, const char * const name, STRLEN len, U32 flags)
@@ -7488,13 +7699,7 @@ STATIC UV        S_check_locale_boundary_crossing(pTHX_ const U8* const p, const UV res
 #define PERL_ARGS_ASSERT_CHECK_LOCALE_BOUNDARY_CROSSING        \
        assert(p); assert(ustrp); assert(lenp)
 
-PERL_STATIC_INLINE STRLEN      S_is_utf8_char_slow(const U8 *s, const STRLEN len)
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(1);
-#define PERL_ARGS_ASSERT_IS_UTF8_CHAR_SLOW     \
-       assert(s)
-
-PERL_STATIC_INLINE bool        S_is_utf8_common(pTHX_ const U8 *const p, SV **swash, const char * const swashname)
+PERL_STATIC_INLINE bool        S_is_utf8_common(pTHX_ const U8 *const p, SV **swash, const char * const swashname, SV* const invlist)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
@@ -7502,6 +7707,17 @@ PERL_STATIC_INLINE bool  S_is_utf8_common(pTHX_ const U8 *const p, SV **swash, co
 #define PERL_ARGS_ASSERT_IS_UTF8_COMMON        \
        assert(p); assert(swash); assert(swashname)
 
+STATIC U8*     S_swash_scan_list_line(pTHX_ U8* l, U8* const lend, UV* min, UV* max, UV* val, const bool wants_value, const U8* const typestr)
+                       __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_7);
+#define PERL_ARGS_ASSERT_SWASH_SCAN_LIST_LINE  \
+       assert(l); assert(lend); assert(min); assert(max); assert(val); assert(typestr)
+
 STATIC SV*     S_swatch_get(pTHX_ SV* swash, UV start, UV span)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -7547,129 +7763,6 @@ STATIC void     S_mem_log_common(enum mem_log_type mlt, const UV n, const UV typesiz
 
 #  endif
 #endif
-#if defined(PERL_MAD)
-PERL_CALLCONV void     Perl_addmad(pTHX_ MADPROP* tm, MADPROP** root, char slot);
-PERL_CALLCONV void     Perl_append_madprops(pTHX_ MADPROP* tm, OP* o, char slot);
-PERL_CALLCONV void     Perl_do_op_xmldump(pTHX_ I32 level, PerlIO *file, const OP *o)
-                       __attribute__nonnull__(pTHX_2);
-#define PERL_ARGS_ASSERT_DO_OP_XMLDUMP \
-       assert(file)
-
-PERL_CALLCONV void     Perl_do_pmop_xmldump(pTHX_ I32 level, PerlIO *file, const PMOP *pm)
-                       __attribute__nonnull__(pTHX_2);
-#define PERL_ARGS_ASSERT_DO_PMOP_XMLDUMP       \
-       assert(file)
-
-PERL_CALLCONV void     Perl_mad_free(pTHX_ MADPROP* mp);
-PERL_CALLCONV int      Perl_madlex(pTHX);
-PERL_CALLCONV int      Perl_madparse(pTHX_ int gramtype);
-PERL_CALLCONV OP*      Perl_newFORM(pTHX_ I32 floor, OP* o, OP* block);
-PERL_CALLCONV MADPROP* Perl_newMADPROP(pTHX_ char key, char type, void* val, I32 vlen);
-PERL_CALLCONV MADPROP* Perl_newMADsv(pTHX_ char key, SV* sv)
-                       __attribute__nonnull__(pTHX_2);
-#define PERL_ARGS_ASSERT_NEWMADSV      \
-       assert(sv)
-
-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);
-PERL_CALLCONV void     Perl_op_xmldump(pTHX_ const OP *o)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_OP_XMLDUMP    \
-       assert(o)
-
-PERL_CALLCONV OP*      Perl_package(pTHX_ OP* o)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_PACKAGE       \
-       assert(o)
-
-PERL_CALLCONV void     Perl_pad_peg(const char* s)
-                       __attribute__nonnull__(1);
-#define PERL_ARGS_ASSERT_PAD_PEG       \
-       assert(s)
-
-PERL_CALLCONV void     Perl_pmop_xmldump(pTHX_ const PMOP* pm);
-PERL_CALLCONV void     Perl_prepend_madprops(pTHX_ MADPROP* mp, OP* o, char slot);
-PERL_CALLCONV char*    Perl_sv_catxmlpv(pTHX_ SV *dsv, const char *pv, int utf8)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
-#define PERL_ARGS_ASSERT_SV_CATXMLPV   \
-       assert(dsv); assert(pv)
-
-PERL_CALLCONV char*    Perl_sv_catxmlpvn(pTHX_ SV *dsv, const char *pv, STRLEN len, int utf8)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
-#define PERL_ARGS_ASSERT_SV_CATXMLPVN  \
-       assert(dsv); assert(pv)
-
-PERL_CALLCONV char*    Perl_sv_catxmlsv(pTHX_ SV *dsv, SV *ssv)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
-#define PERL_ARGS_ASSERT_SV_CATXMLSV   \
-       assert(dsv); assert(ssv)
-
-PERL_CALLCONV char*    Perl_sv_xmlpeek(pTHX_ SV* sv)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_SV_XMLPEEK    \
-       assert(sv)
-
-PERL_CALLCONV void     Perl_token_free(pTHX_ TOKEN *tk)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_TOKEN_FREE    \
-       assert(tk)
-
-PERL_CALLCONV void     Perl_token_getmad(pTHX_ TOKEN *tk, OP *o, char slot)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_TOKEN_GETMAD  \
-       assert(tk)
-
-PERL_CALLCONV OP *     Perl_utilize(pTHX_ int aver, I32 floor, OP* version, OP* idop, OP* arg)
-                       __attribute__nonnull__(pTHX_4);
-#define PERL_ARGS_ASSERT_UTILIZE       \
-       assert(idop)
-
-PERL_CALLCONV void     Perl_xmldump_all(pTHX);
-PERL_CALLCONV void     Perl_xmldump_all_perl(pTHX_ bool justperl);
-PERL_CALLCONV void     Perl_xmldump_eval(pTHX);
-PERL_CALLCONV void     Perl_xmldump_form(pTHX_ const GV* gv)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_XMLDUMP_FORM  \
-       assert(gv)
-
-PERL_CALLCONV void     Perl_xmldump_indent(pTHX_ I32 level, PerlIO *file, const char* pat, ...)
-                       __attribute__format__(__printf__,pTHX_3,pTHX_4)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3);
-#define PERL_ARGS_ASSERT_XMLDUMP_INDENT        \
-       assert(file); assert(pat)
-
-PERL_CALLCONV void     Perl_xmldump_packsubs(pTHX_ const HV* stash)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_XMLDUMP_PACKSUBS      \
-       assert(stash)
-
-PERL_CALLCONV void     Perl_xmldump_packsubs_perl(pTHX_ const HV* stash, bool justperl)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_XMLDUMP_PACKSUBS_PERL \
-       assert(stash)
-
-PERL_CALLCONV void     Perl_xmldump_sub(pTHX_ const GV* gv)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_XMLDUMP_SUB   \
-       assert(gv)
-
-PERL_CALLCONV void     Perl_xmldump_sub_perl(pTHX_ const GV* gv, bool justperl)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_XMLDUMP_SUB_PERL      \
-       assert(gv)
-
-PERL_CALLCONV void     Perl_xmldump_vindent(pTHX_ I32 level, PerlIO *file, const char* pat, va_list *args)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3);
-#define PERL_ARGS_ASSERT_XMLDUMP_VINDENT       \
-       assert(file); assert(pat)
-
-#endif
 #if defined(PERL_USES_PL_PIDSTATUS) && defined(PERL_IN_UTIL_C)
 STATIC void    S_pidgone(pTHX_ Pid_t pid, int status);
 #endif
@@ -7680,6 +7773,18 @@ PERL_CALLCONV I32        Perl_unlnk(pTHX_ const char* f)
        assert(f)
 
 #endif
+#if defined(USE_C_BACKTRACE)
+PERL_CALLCONV bool     Perl_dump_c_backtrace(pTHX_ PerlIO* fp, int max_depth, int skip)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_DUMP_C_BACKTRACE      \
+       assert(fp)
+
+/* PERL_CALLCONV void  free_c_backtrace(pTHX_ Perl_c_backtrace* bt)
+                       __attribute__nonnull__(pTHX_1); */
+
+PERL_CALLCONV Perl_c_backtrace*        Perl_get_c_backtrace(pTHX_ int max_depth, int skip);
+PERL_CALLCONV SV*      Perl_get_c_backtrace_dump(pTHX_ int max_depth, int skip);
+#endif
 #if defined(USE_ITHREADS)
 PERL_CALLCONV PADOFFSET        Perl_alloccopstash(pTHX_ HV *hv)
                        __attribute__nonnull__(pTHX_1);
@@ -7822,6 +7927,14 @@ PERL_CALLCONV SV*        Perl_sv_dup_inc(pTHX_ const SV *const sstr, CLONE_PARAMS *cons
        assert(param)
 
 #endif
+#if defined(USE_LOCALE)     && (defined(PERL_IN_LOCALE_C) || defined (PERL_EXT_POSIX))
+PERL_CALLCONV bool     Perl__is_cur_LC_category_utf8(pTHX_ int category);
+STATIC char*   S_stdize_locale(pTHX_ char* locs)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_STDIZE_LOCALE \
+       assert(locs)
+
+#endif
 #if defined(USE_LOCALE_COLLATE)
 PERL_CALLCONV int      Perl_magic_setcollxfrm(pTHX_ SV* sv, MAGIC* mg)
                        __attribute__nonnull__(pTHX_1)
@@ -7846,7 +7959,7 @@ PERL_CALLCONV char*       Perl_sv_collxfrm_flags(pTHX_ SV *const sv, STRLEN *const nxp
        assert(sv); assert(nxp)
 
 #endif
-#if defined(USE_PERLIO) && !defined(USE_SFIO)
+#if defined(USE_PERLIO)
 PERL_CALLCONV void     Perl_PerlIO_clearerr(pTHX_ PerlIO *f);
 PERL_CALLCONV int      Perl_PerlIO_close(pTHX_ PerlIO *f);
 PERL_CALLCONV int      Perl_PerlIO_eof(pTHX_ PerlIO *f);
@@ -7893,6 +8006,9 @@ PERL_CALLCONV SSize_t     Perl_PerlIO_write(pTHX_ PerlIO *f, const void *vbuf, Size_
 
 #endif
 #if defined(WIN32)
+PERL_CALLCONV char*    Perl_my_setlocale(pTHX_ int category, const char* locale)
+                       __attribute__pure__;
+
 PERL_CALLCONV_NO_RET void      win32_croak_not_implemented(const char * fname)
                        __attribute__noreturn__
                        __attribute__nonnull__(1);
@@ -7919,12 +8035,27 @@ PERL_CALLCONV int       Perl_do_spawn_nowait(pTHX_ char* cmd)
 
 #endif
 #if defined(_MSC_VER)
+PERL_CALLCONV OP*      Perl_die(pTHX_ const char* pat, ...)
+                       __attribute__format__null_ok__(__printf__,pTHX_1,pTHX_2);
+
+PERL_CALLCONV OP*      Perl_die_sv(pTHX_ SV *baseex)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_DIE_SV        \
+       assert(baseex)
+
 PERL_CALLCONV int      Perl_magic_regdatum_set(pTHX_ SV* sv, MAGIC* mg)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT_MAGIC_REGDATUM_SET    \
        assert(sv); assert(mg)
 
+PERL_CALLCONV char*    Perl_screaminstr(pTHX_ SV *bigstr, SV *littlestr, I32 start_shift, I32 end_shift, I32 *old_posp, I32 last)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_5);
+#define PERL_ARGS_ASSERT_SCREAMINSTR   \
+       assert(bigstr); assert(littlestr); assert(old_posp)
+
 #endif
 #ifdef PERL_CORE
 #  include "pp_proto.h"