This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Change name of internal function
[perl5.git] / proto.h
diff --git a/proto.h b/proto.h
index 7a74c8f..bc24aee 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -41,6 +41,9 @@ PERL_CALLCONV void*   Perl_Slab_Alloc(pTHX_ size_t sz)
 PERL_CALLCONV void     Perl_Slab_Free(pTHX_ void *op);
 #define PERL_ARGS_ASSERT_SLAB_FREE     \
        assert(op)
+PERL_CALLCONV char *   Perl__byte_dump_string(pTHX_ const U8 * const start, const STRLEN len, const bool format);
+#define PERL_ARGS_ASSERT__BYTE_DUMP_STRING     \
+       assert(start)
 PERL_CALLCONV void     Perl__force_out_malformed_utf8_message(pTHX_ const U8 *const p, const U8 * const e, const U32 flags, const bool die_here);
 #define PERL_ARGS_ASSERT__FORCE_OUT_MALFORMED_UTF8_MESSAGE     \
        assert(p); assert(e)
@@ -64,6 +67,12 @@ PERL_CALLCONV bool   Perl__is_utf8_FOO_with_len(pTHX_ const U8 classnum, const U8
 #define PERL_ARGS_ASSERT__IS_UTF8_FOO_WITH_LEN \
        assert(p); assert(e)
 
+PERL_CALLCONV STRLEN   Perl__is_utf8_char_helper(const U8 * const s, const U8 * e, const U32 flags)
+                       __attribute__warn_unused_result__
+                       __attribute__pure__;
+#define PERL_ARGS_ASSERT__IS_UTF8_CHAR_HELPER  \
+       assert(s); assert(e)
+
 PERL_CALLCONV bool     Perl__is_utf8_idcont(pTHX_ const U8 *p)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT__IS_UTF8_IDCONT       \
@@ -115,9 +124,11 @@ PERL_CALLCONV UV   Perl__to_utf8_upper_flags(pTHX_ const U8 *p, const U8 *e, U8* u
 #define PERL_ARGS_ASSERT__TO_UTF8_UPPER_FLAGS  \
        assert(p); assert(ustrp); assert(file)
 PERL_CALLCONV void     Perl__warn_problematic_locale(void);
-PERL_CALLCONV void     Perl_abort_execution(pTHX_ const char * const msg, const char * const name);
+PERL_CALLCONV_NO_RET void      Perl_abort_execution(pTHX_ const char * const msg, const char * const name)
+                       __attribute__noreturn__;
 #define PERL_ARGS_ASSERT_ABORT_EXECUTION       \
        assert(msg); assert(name)
+
 PERL_CALLCONV LOGOP*   Perl_alloc_LOGOP(pTHX_ I32 type, OP *first, OP *other);
 PERL_CALLCONV PADOFFSET        Perl_allocmy(pTHX_ const char *const name, const STRLEN len, const U32 flags);
 #define PERL_ARGS_ASSERT_ALLOCMY       \
@@ -129,6 +140,11 @@ 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);
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE void        S_append_utf8_from_native_byte(const U8 byte, U8** dest);
+#define PERL_ARGS_ASSERT_APPEND_UTF8_FROM_NATIVE_BYTE  \
+       assert(dest)
+#endif
 PERL_CALLCONV I32      Perl_apply(pTHX_ I32 type, SV** mark, SV** sp);
 #define PERL_ARGS_ASSERT_APPLY \
        assert(mark); assert(sp)
@@ -204,6 +220,13 @@ PERL_CALLCONV SV** Perl_av_store(pTHX_ AV *av, SSize_t key, SV *val);
 /* PERL_CALLCONV SSize_t       Perl_av_tindex(pTHX_ AV *av)
                        __attribute__warn_unused_result__; */
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE SSize_t     S_av_top_index(pTHX_ AV *av)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_AV_TOP_INDEX  \
+       assert(av)
+#endif
+
 PERL_CALLCONV void     Perl_av_undef(pTHX_ AV *av);
 #define PERL_ARGS_ASSERT_AV_UNDEF      \
        assert(av)
@@ -233,12 +256,15 @@ PERL_CALLCONV void        Perl_boot_core_mro(pTHX);
 PERL_CALLCONV int      Perl_bytes_cmp_utf8(pTHX_ const U8 *b, STRLEN blen, const U8 *u, STRLEN ulen);
 #define PERL_ARGS_ASSERT_BYTES_CMP_UTF8        \
        assert(b); assert(u)
-PERL_CALLCONV U8*      Perl_bytes_from_utf8(pTHX_ const U8 *s, STRLEN *len, bool *is_utf8);
+PERL_CALLCONV U8*      Perl_bytes_from_utf8(pTHX_ const U8 *s, STRLEN *lenp, bool *is_utf8p);
 #define PERL_ARGS_ASSERT_BYTES_FROM_UTF8       \
-       assert(s); assert(len)
-PERL_CALLCONV U8*      Perl_bytes_to_utf8(pTHX_ const U8 *s, STRLEN *len);
+       assert(s); assert(lenp); assert(is_utf8p)
+PERL_CALLCONV U8*      Perl_bytes_from_utf8_loc(const U8 *s, STRLEN *lenp, bool *is_utf8p, const U8 ** first_unconverted);
+#define PERL_ARGS_ASSERT_BYTES_FROM_UTF8_LOC   \
+       assert(s); assert(lenp); assert(is_utf8p)
+PERL_CALLCONV U8*      Perl_bytes_to_utf8(pTHX_ const U8 *s, STRLEN *lenp);
 #define PERL_ARGS_ASSERT_BYTES_TO_UTF8 \
-       assert(s); assert(len)
+       assert(s); assert(lenp)
 PERL_CALLCONV I32      Perl_call_argv(pTHX_ const char* sub_name, I32 flags, char** argv);
 #define PERL_ARGS_ASSERT_CALL_ARGV     \
        assert(sub_name); assert(argv)
@@ -252,7 +278,7 @@ PERL_CALLCONV I32   Perl_call_method(pTHX_ const char* methname, I32 flags);
 PERL_CALLCONV I32      Perl_call_pv(pTHX_ const char* sub_name, I32 flags);
 #define PERL_ARGS_ASSERT_CALL_PV       \
        assert(sub_name)
-PERL_CALLCONV I32      Perl_call_sv(pTHX_ SV* sv, VOL I32 flags);
+PERL_CALLCONV I32      Perl_call_sv(pTHX_ SV* sv, volatile I32 flags);
 #define PERL_ARGS_ASSERT_CALL_SV       \
        assert(sv)
 PERL_CALLCONV const PERL_CONTEXT *     Perl_caller_cx(pTHX_ I32 level, const PERL_CONTEXT **dbcxp);
@@ -628,13 +654,16 @@ PERL_CALLCONV void        Perl_cv_forget_slab(pTHX_ CV *cv);
 PERL_CALLCONV void     Perl_cv_get_call_checker(pTHX_ CV *cv, Perl_call_checker *ckfun_p, SV **ckobj_p);
 #define PERL_ARGS_ASSERT_CV_GET_CALL_CHECKER   \
        assert(cv); assert(ckfun_p); assert(ckobj_p)
+PERL_CALLCONV void     Perl_cv_get_call_checker_flags(pTHX_ CV *cv, U32 gflags, Perl_call_checker *ckfun_p, SV **ckobj_p, U32 *ckflags_p);
+#define PERL_ARGS_ASSERT_CV_GET_CALL_CHECKER_FLAGS     \
+       assert(cv); assert(ckfun_p); assert(ckobj_p); assert(ckflags_p)
 PERL_CALLCONV SV *     Perl_cv_name(pTHX_ CV *cv, SV *sv, U32 flags);
 #define PERL_ARGS_ASSERT_CV_NAME       \
        assert(cv)
 PERL_CALLCONV void     Perl_cv_set_call_checker(pTHX_ CV *cv, Perl_call_checker ckfun, SV *ckobj);
 #define PERL_ARGS_ASSERT_CV_SET_CALL_CHECKER   \
        assert(cv); assert(ckfun); assert(ckobj)
-PERL_CALLCONV void     Perl_cv_set_call_checker_flags(pTHX_ CV *cv, Perl_call_checker ckfun, SV *ckobj, U32 flags);
+PERL_CALLCONV void     Perl_cv_set_call_checker_flags(pTHX_ CV *cv, Perl_call_checker ckfun, SV *ckobj, U32 ckflags);
 #define PERL_ARGS_ASSERT_CV_SET_CALL_CHECKER_FLAGS     \
        assert(cv); assert(ckfun); assert(ckobj)
 PERL_CALLCONV void     Perl_cv_undef(pTHX_ CV* cv);
@@ -750,7 +779,7 @@ PERL_CALLCONV bool  Perl_do_open6(pTHX_ GV *gv, const char *oname, STRLEN len, Pe
 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);
 #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);
+PERL_CALLCONV bool     Perl_do_open_raw(pTHX_ GV *gv, const char *oname, STRLEN len, int rawmode, int rawperm, Stat_t *statbufp);
 #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);
@@ -766,7 +795,7 @@ PERL_CALLCONV OP*   Perl_do_readline(pTHX)
                        __attribute__warn_unused_result__;
 
 PERL_CALLCONV bool     Perl_do_seek(pTHX_ GV* gv, Off_t pos, int whence);
-PERL_CALLCONV void     Perl_do_sprintf(pTHX_ SV* sv, I32 len, SV** sarg);
+PERL_CALLCONV void     Perl_do_sprintf(pTHX_ SV* sv, SSize_t len, SV** sarg);
 #define PERL_ARGS_ASSERT_DO_SPRINTF    \
        assert(sv); assert(sarg)
 PERL_CALLCONV void     Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bool dumpops, STRLEN pvlim);
@@ -783,7 +812,7 @@ PERL_CALLCONV Off_t Perl_do_tell(pTHX_ GV* gv)
 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, SSize_t offset, int size);
+PERL_CALLCONV UV       Perl_do_vecget(pTHX_ SV* sv, STRLEN offset, int size);
 #define PERL_ARGS_ASSERT_DO_VECGET     \
        assert(sv)
 PERL_CALLCONV void     Perl_do_vecset(pTHX_ SV* sv);
@@ -883,24 +912,21 @@ PERL_CALLCONV PADOFFSET   Perl_find_rundefsvoffset(pTHX)
 PERL_CALLCONV char*    Perl_find_script(pTHX_ const char *scriptname, bool dosearch, const char *const *const search_ext, I32 flags);
 #define PERL_ARGS_ASSERT_FIND_SCRIPT   \
        assert(scriptname)
-PERL_CALLCONV I32      Perl_foldEQ(const char* a, const char* b, I32 len)
-                       __attribute__warn_unused_result__
-                       __attribute__pure__;
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE I32 Perl_foldEQ(const char* a, const char* b, I32 len);
 #define PERL_ARGS_ASSERT_FOLDEQ        \
        assert(a); assert(b)
-
-PERL_CALLCONV I32      Perl_foldEQ_latin1(const char* a, const char* b, I32 len)
-                       __attribute__warn_unused_result__
-                       __attribute__pure__;
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE I32 Perl_foldEQ_latin1(const char* a, const char* b, I32 len);
 #define PERL_ARGS_ASSERT_FOLDEQ_LATIN1 \
        assert(a); assert(b)
-
-PERL_CALLCONV I32      Perl_foldEQ_locale(const char* a, const char* b, I32 len)
-                       __attribute__warn_unused_result__
-                       __attribute__pure__;
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE I32 Perl_foldEQ_locale(const char* a, const char* b, I32 len);
 #define PERL_ARGS_ASSERT_FOLDEQ_LOCALE \
        assert(a); assert(b)
-
+#endif
 /* PERL_CALLCONV I32   foldEQ_utf8(pTHX_ const char *s1, char **pe1, UV l1, bool u1, const char *s2, char **pe2, UV l2, bool u2); */
 PERL_CALLCONV I32      Perl_foldEQ_utf8_flags(pTHX_ const char *s1, char **pe1, UV l1, bool u1, const char *s2, char **pe2, UV l2, bool u2, U32 flags);
 #define PERL_ARGS_ASSERT_FOLDEQ_UTF8_FLAGS     \
@@ -1271,6 +1297,9 @@ PERL_CALLCONV SSize_t*    Perl_hv_placeholders_p(pTHX_ HV *hv)
 PERL_CALLCONV void     Perl_hv_placeholders_set(pTHX_ HV *hv, I32 ph);
 #define PERL_ARGS_ASSERT_HV_PLACEHOLDERS_SET   \
        assert(hv)
+PERL_CALLCONV void     Perl_hv_pushkv(pTHX_ HV *hv, U32 flags);
+#define PERL_ARGS_ASSERT_HV_PUSHKV     \
+       assert(hv)
 PERL_CALLCONV void     Perl_hv_rand_set(pTHX_ HV *hv, U32 new_xhv_rand);
 #define PERL_ARGS_ASSERT_HV_RAND_SET   \
        assert(hv)
@@ -1350,15 +1379,19 @@ PERL_CALLCONV bool      Perl_isIDFIRST_lazy(pTHX_ const char* p)
                        __attribute__warn_unused_result__
                        __attribute__pure__; */
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE bool        S_is_c9strict_utf8_string(const U8 *s, const STRLEN len)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_IS_C9STRICT_UTF8_STRING       \
        assert(s)
+#endif
 
 /* PERL_CALLCONV bool  is_c9strict_utf8_string_loc(const U8 *s, const STRLEN len, const U8 **ep); */
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE bool        S_is_c9strict_utf8_string_loclen(const U8 *s, const STRLEN len, const U8 **ep, STRLEN *el);
 #define PERL_ARGS_ASSERT_IS_C9STRICT_UTF8_STRING_LOCLEN        \
        assert(s)
+#endif
 /* PERL_CALLCONV bool  Perl_is_invariant_string(const U8* const s, const STRLEN len)
                        __attribute__warn_unused_result__
                        __attribute__pure__; */
@@ -1366,15 +1399,26 @@ PERL_STATIC_INLINE bool S_is_c9strict_utf8_string_loclen(const U8 *s, const STRL
 PERL_CALLCONV I32      Perl_is_lvalue_sub(pTHX)
                        __attribute__warn_unused_result__;
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
+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__;
+#define PERL_ARGS_ASSERT_IS_SAFE_SYSCALL       \
+       assert(pv); assert(what); assert(op_name)
+#endif
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE bool        S_is_strict_utf8_string(const U8 *s, const STRLEN len)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_IS_STRICT_UTF8_STRING \
        assert(s)
+#endif
 
 /* PERL_CALLCONV bool  is_strict_utf8_string_loc(const U8 *s, const STRLEN len, const U8 **ep); */
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE bool        S_is_strict_utf8_string_loclen(const U8 *s, const STRLEN len, const U8 **ep, STRLEN *el);
 #define PERL_ARGS_ASSERT_IS_STRICT_UTF8_STRING_LOCLEN  \
        assert(s)
+#endif
 PERL_CALLCONV bool     Perl_is_uni_alnum(pTHX_ UV c)
                        __attribute__deprecated__
                        __attribute__warn_unused_result__;
@@ -1559,9 +1603,11 @@ PERL_CALLCONV bool       Perl_is_utf8_digit(pTHX_ const U8 *p)
 
 /* PERL_CALLCONV bool  is_utf8_fixed_width_buf_flags(const U8 * const s, const STRLEN len, const U32 flags); */
 /* PERL_CALLCONV bool  is_utf8_fixed_width_buf_loc_flags(const U8 * const s, const STRLEN len, const U8 **ep, const U32 flags); */
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE bool        S_is_utf8_fixed_width_buf_loclen_flags(const U8 * const s, const STRLEN len, const U8 **ep, STRLEN *el, const U32 flags);
 #define PERL_ARGS_ASSERT_IS_UTF8_FIXED_WIDTH_BUF_LOCLEN_FLAGS  \
        assert(s)
+#endif
 PERL_CALLCONV bool     Perl_is_utf8_graph(pTHX_ const U8 *p)
                        __attribute__deprecated__
                        __attribute__warn_unused_result__;
@@ -1580,10 +1626,15 @@ PERL_CALLCONV bool      Perl_is_utf8_idfirst(pTHX_ const U8 *p)
 #define PERL_ARGS_ASSERT_IS_UTF8_IDFIRST       \
        assert(p)
 
-PERL_STATIC_INLINE bool        S_is_utf8_invariant_string(const U8* const s, STRLEN const len)
+/* PERL_CALLCONV bool  is_utf8_invariant_string(const U8* const s, STRLEN const len)
+                       __attribute__warn_unused_result__; */
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE bool        S_is_utf8_invariant_string_loc(const U8* const s, STRLEN const len, const U8 ** ep)
                        __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_IS_UTF8_INVARIANT_STRING      \
+#define PERL_ARGS_ASSERT_IS_UTF8_INVARIANT_STRING_LOC  \
        assert(s)
+#endif
 
 PERL_CALLCONV bool     Perl_is_utf8_lower(pTHX_ const U8 *p)
                        __attribute__deprecated__
@@ -1633,15 +1684,19 @@ PERL_CALLCONV bool      Perl_is_utf8_space(pTHX_ const U8 *p)
 #define PERL_ARGS_ASSERT_IS_UTF8_SPACE \
        assert(p)
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE bool        Perl_is_utf8_string(const U8 *s, const STRLEN len)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_IS_UTF8_STRING        \
        assert(s)
+#endif
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE bool        S_is_utf8_string_flags(const U8 *s, const STRLEN len, const U32 flags)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_IS_UTF8_STRING_FLAGS  \
        assert(s)
+#endif
 
 #ifndef NO_MATHOMS
 PERL_CALLCONV bool     Perl_is_utf8_string_loc(const U8 *s, const STRLEN len, const U8 **ep);
@@ -1649,12 +1704,16 @@ PERL_CALLCONV bool      Perl_is_utf8_string_loc(const U8 *s, const STRLEN len, const
        assert(s); assert(ep)
 #endif
 /* PERL_CALLCONV bool  is_utf8_string_loc_flags(const U8 *s, const STRLEN len, const U8 **ep, const U32 flags); */
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE bool        Perl_is_utf8_string_loclen(const U8 *s, const STRLEN len, const U8 **ep, STRLEN *el);
 #define PERL_ARGS_ASSERT_IS_UTF8_STRING_LOCLEN \
        assert(s)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE bool        S_is_utf8_string_loclen_flags(const U8 *s, const STRLEN len, const U8 **ep, STRLEN *el, const U32 flags);
 #define PERL_ARGS_ASSERT_IS_UTF8_STRING_LOCLEN_FLAGS   \
        assert(s)
+#endif
 PERL_CALLCONV bool     Perl_is_utf8_upper(pTHX_ const U8 *p)
                        __attribute__deprecated__
                        __attribute__warn_unused_result__;
@@ -1665,10 +1724,12 @@ PERL_CALLCONV bool      Perl_is_utf8_upper(pTHX_ const U8 *p)
                        __attribute__warn_unused_result__
                        __attribute__pure__; */
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE bool        S_is_utf8_valid_partial_char_flags(const U8 * const s, const U8 * const e, const U32 flags)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_IS_UTF8_VALID_PARTIAL_CHAR_FLAGS      \
        assert(s); assert(e)
+#endif
 
 PERL_CALLCONV bool     Perl_is_utf8_xdigit(pTHX_ const U8 *p)
                        __attribute__deprecated__
@@ -1945,6 +2006,9 @@ PERL_CALLCONV int Perl_mg_free(pTHX_ SV* sv);
 PERL_CALLCONV void     Perl_mg_free_type(pTHX_ SV* sv, int how);
 #define PERL_ARGS_ASSERT_MG_FREE_TYPE  \
        assert(sv)
+PERL_CALLCONV void     Perl_mg_freeext(pTHX_ SV* sv, int how, const MGVTBL *vtbl);
+#define PERL_ARGS_ASSERT_MG_FREEEXT    \
+       assert(sv)
 PERL_CALLCONV int      Perl_mg_get(pTHX_ SV* sv);
 #define PERL_ARGS_ASSERT_MG_GET        \
        assert(sv)
@@ -2003,6 +2067,9 @@ PERL_CALLCONV void        Perl_mro_set_mro(pTHX_ struct mro_meta *const meta, SV *const
 PERL_CALLCONV SV*      Perl_mro_set_private_data(pTHX_ struct mro_meta *const smeta, const struct mro_alg *const which, SV *const data);
 #define PERL_ARGS_ASSERT_MRO_SET_PRIVATE_DATA  \
        assert(smeta); assert(which); assert(data)
+PERL_CALLCONV SV*      Perl_multiconcat_stringify(pTHX_ const OP* o);
+#define PERL_ARGS_ASSERT_MULTICONCAT_STRINGIFY \
+       assert(o)
 PERL_CALLCONV SV*      Perl_multideref_stringify(pTHX_ const OP* o, CV *cv);
 #define PERL_ARGS_ASSERT_MULTIDEREF_STRINGIFY  \
        assert(o)
@@ -2264,7 +2331,7 @@ PERL_CALLCONV SV* Perl_newSVpvf(pTHX_ const char *const pat, ...)
 #define PERL_ARGS_ASSERT_NEWSVPVF      \
        assert(pat)
 
-PERL_CALLCONV SV*      Perl_newSVpvn(pTHX_ const char *const s, const STRLEN len)
+PERL_CALLCONV SV*      Perl_newSVpvn(pTHX_ const char *const buffer, const STRLEN len)
                        __attribute__warn_unused_result__;
 
 PERL_CALLCONV SV*      Perl_newSVpvn_flags(pTHX_ const char *const s, const STRLEN len, const U32 flags)
@@ -2308,10 +2375,6 @@ PERL_CALLCONV CV *       Perl_newXS_flags(pTHX_ const char *name, XSUBADDR_t subaddr,
 PERL_CALLCONV CV *     Perl_newXS_len_flags(pTHX_ const char *name, STRLEN len, XSUBADDR_t subaddr, const char *const filename, const char *const proto, SV **const_svp, U32 flags);
 #define PERL_ARGS_ASSERT_NEWXS_LEN_FLAGS       \
        assert(subaddr)
-PERL_CALLCONV void     Perl_new_collate(pTHX_ const char* newcoll);
-PERL_CALLCONV void     Perl_new_ctype(pTHX_ const char* newctype);
-#define PERL_ARGS_ASSERT_NEW_CTYPE     \
-       assert(newctype)
 PERL_CALLCONV void     Perl_new_numeric(pTHX_ const char* newcoll);
 PERL_CALLCONV PERL_SI* Perl_new_stackinfo(pTHX_ I32 stitems, I32 cxitems)
                        __attribute__warn_unused_result__;
@@ -2375,6 +2438,9 @@ PERL_CALLCONV void        Perl_op_refcnt_unlock(pTHX);
 PERL_CALLCONV OP*      Perl_op_scope(pTHX_ OP* o);
 PERL_CALLCONV OP*      Perl_op_sibling_splice(OP *parent, OP *start, int del_count, OP* insert);
 PERL_CALLCONV OP*      Perl_op_unscope(pTHX_ OP* o);
+PERL_CALLCONV void     Perl_optimize_optree(pTHX_ OP* o);
+#define PERL_ARGS_ASSERT_OPTIMIZE_OPTREE       \
+       assert(o)
 PERL_CALLCONV void     Perl_pack_cat(pTHX_ SV *cat, const char *pat, const char *patend, SV **beglist, SV **endlist, SV ***next_in_list, U32 flags);
 #define PERL_ARGS_ASSERT_PACK_CAT      \
        assert(cat); assert(pat); assert(patend); assert(beglist); assert(endlist); assert(next_in_list)
@@ -2616,9 +2682,9 @@ PERL_CALLCONV void        Perl_reg_numbered_buff_store(pTHX_ REGEXP * const rx, const I
 PERL_CALLCONV SV*      Perl_reg_qr_package(pTHX_ REGEXP * const rx);
 #define PERL_ARGS_ASSERT_REG_QR_PACKAGE        \
        assert(rx)
-PERL_CALLCONV REGEXP*  Perl_reg_temp_copy(pTHX_ REGEXP* ret_x, REGEXP* rx);
+PERL_CALLCONV REGEXP*  Perl_reg_temp_copy(pTHX_ REGEXP* dsv, REGEXP* ssv);
 #define PERL_ARGS_ASSERT_REG_TEMP_COPY \
-       assert(rx)
+       assert(ssv)
 PERL_CALLCONV SV*      Perl_regclass_swash(pTHX_ const regexp *prog, const struct regnode *node, bool doinit, SV **listsvp, SV **altsvp);
 #define PERL_ARGS_ASSERT_REGCLASS_SWASH        \
        assert(node)
@@ -2859,13 +2925,13 @@ PERL_CALLCONV void      Perl_set_caret_X(pTHX);
 PERL_CALLCONV void     Perl_set_context(void *t);
 #define PERL_ARGS_ASSERT_SET_CONTEXT   \
        assert(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_set_numeric_underlying(pTHX);
 PERL_CALLCONV void     Perl_setdefout(pTHX_ GV* gv);
 #define PERL_ARGS_ASSERT_SETDEFOUT     \
        assert(gv)
-PERL_CALLCONV HEK*     Perl_share_hek(pTHX_ const char* str, I32 len, U32 hash);
+PERL_CALLCONV char*    Perl_setlocale(int category, const char* locale);
+PERL_CALLCONV HEK*     Perl_share_hek(pTHX_ const char* str, SSize_t len, U32 hash);
 #define PERL_ARGS_ASSERT_SHARE_HEK     \
        assert(str)
 PERL_CALLCONV void     Perl_sortsv(pTHX_ SV** array, size_t num_elts, SVCOMPARE_t cmp);
@@ -3110,7 +3176,7 @@ PERL_CALLCONV void        Perl_sv_insert(pTHX_ SV *const bigstr, const STRLEN offset, c
 #define PERL_ARGS_ASSERT_SV_INSERT     \
        assert(bigstr); assert(little)
 #endif
-PERL_CALLCONV void     Perl_sv_insert_flags(pTHX_ SV *const bigstr, const STRLEN offset, const STRLEN len, const char *const little, const STRLEN littlelen, const U32 flags);
+PERL_CALLCONV void     Perl_sv_insert_flags(pTHX_ SV *const bigstr, const STRLEN offset, const STRLEN len, const char *little, const STRLEN littlelen, const U32 flags);
 #define PERL_ARGS_ASSERT_SV_INSERT_FLAGS       \
        assert(bigstr); assert(little)
 PERL_CALLCONV int      Perl_sv_isa(pTHX_ SV* sv, const char *const name);
@@ -3156,6 +3222,11 @@ PERL_CALLCONV void       Perl_sv_nounlocking(pTHX_ SV *sv);
 PERL_CALLCONV NV       Perl_sv_nv(pTHX_ SV* sv);
 #define PERL_ARGS_ASSERT_SV_NV \
        assert(sv)
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE bool        S_sv_only_taint_gmagic(SV *sv);
+#define PERL_ARGS_ASSERT_SV_ONLY_TAINT_GMAGIC  \
+       assert(sv)
+#endif
 PERL_CALLCONV char*    Perl_sv_peek(pTHX_ SV* sv);
 PERL_CALLCONV void     Perl_sv_pos_b2u(pTHX_ SV *const sv, I32 *const offsetp);
 #define PERL_ARGS_ASSERT_SV_POS_B2U    \
@@ -3235,6 +3306,9 @@ PERL_CALLCONV void        Perl_sv_reset(pTHX_ const char* s, HV *const stash);
 #define PERL_ARGS_ASSERT_SV_RESET      \
        assert(s)
 PERL_CALLCONV void     Perl_sv_resetpvn(pTHX_ const char* s, STRLEN len, HV *const stash);
+PERL_CALLCONV SV*      Perl_sv_rvunweaken(pTHX_ SV *const sv);
+#define PERL_ARGS_ASSERT_SV_RVUNWEAKEN \
+       assert(sv)
 PERL_CALLCONV SV*      Perl_sv_rvweaken(pTHX_ SV *const sv);
 #define PERL_ARGS_ASSERT_SV_RVWEAKEN   \
        assert(sv)
@@ -3323,6 +3397,7 @@ PERL_CALLCONV void        Perl_sv_setuv(pTHX_ SV *const sv, const UV num);
 PERL_CALLCONV void     Perl_sv_setuv_mg(pTHX_ SV *const sv, const UV u);
 #define PERL_ARGS_ASSERT_SV_SETUV_MG   \
        assert(sv)
+PERL_CALLCONV SV*      Perl_sv_string_from_errnum(pTHX_ int errnum, SV* tgtsv);
 #ifndef NO_MATHOMS
 PERL_CALLCONV void     Perl_sv_taint(pTHX_ SV* sv);
 #define PERL_ARGS_ASSERT_SV_TAINT      \
@@ -3400,10 +3475,10 @@ PERL_CALLCONV void      Perl_sv_vcatpvf(pTHX_ SV *const sv, const char *const pat, va
 PERL_CALLCONV void     Perl_sv_vcatpvf_mg(pTHX_ SV *const sv, const char *const pat, va_list *const args);
 #define PERL_ARGS_ASSERT_SV_VCATPVF_MG \
        assert(sv); assert(pat)
-PERL_CALLCONV void     Perl_sv_vcatpvfn(pTHX_ SV *const sv, const char *const pat, const STRLEN patlen, va_list *const args, SV **const svargs, const I32 svmax, bool *const maybe_tainted);
+PERL_CALLCONV void     Perl_sv_vcatpvfn(pTHX_ SV *const sv, const char *const pat, const STRLEN patlen, va_list *const args, SV **const svargs, const Size_t sv_count, bool *const maybe_tainted);
 #define PERL_ARGS_ASSERT_SV_VCATPVFN   \
        assert(sv); assert(pat)
-PERL_CALLCONV void     Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN patlen, va_list *const args, SV **const svargs, const I32 svmax, bool *const maybe_tainted, const U32 flags);
+PERL_CALLCONV void     Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN patlen, va_list *const args, SV **const svargs, const Size_t sv_count, bool *const maybe_tainted, const U32 flags);
 #define PERL_ARGS_ASSERT_SV_VCATPVFN_FLAGS     \
        assert(sv); assert(pat)
 PERL_CALLCONV void     Perl_sv_vsetpvf(pTHX_ SV *const sv, const char *const pat, va_list *const args);
@@ -3412,7 +3487,7 @@ PERL_CALLCONV void        Perl_sv_vsetpvf(pTHX_ SV *const sv, const char *const pat, va
 PERL_CALLCONV void     Perl_sv_vsetpvf_mg(pTHX_ SV *const sv, const char *const pat, va_list *const args);
 #define PERL_ARGS_ASSERT_SV_VSETPVF_MG \
        assert(sv); assert(pat)
-PERL_CALLCONV void     Perl_sv_vsetpvfn(pTHX_ SV *const sv, const char *const pat, const STRLEN patlen, va_list *const args, SV **const svargs, const I32 svmax, bool *const maybe_tainted);
+PERL_CALLCONV void     Perl_sv_vsetpvfn(pTHX_ SV *const sv, const char *const pat, const STRLEN patlen, va_list *const args, SV **const svargs, const Size_t sv_count, bool *const maybe_tainted);
 #define PERL_ARGS_ASSERT_SV_VSETPVFN   \
        assert(sv); assert(pat)
 PERL_CALLCONV UV       Perl_swash_fetch(pTHX_ SV *swash, const U8 *ptr, bool do_utf8);
@@ -3461,11 +3536,6 @@ PERL_CALLCONV U32        Perl_to_uni_upper_lc(pTHX_ U32 c)
                        __attribute__deprecated__
                        __attribute__warn_unused_result__;
 
-PERL_CALLCONV UV       Perl_to_utf8_case(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, SV **swashp, const char *normal, const char *special)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_TO_UTF8_CASE  \
-       assert(p); assert(ustrp); assert(swashp); assert(normal)
-
 #ifndef NO_MATHOMS
 PERL_CALLCONV UV       Perl_to_utf8_fold(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp)
                        __attribute__deprecated__;
@@ -3513,30 +3583,40 @@ PERL_CALLCONV U8*       Perl_utf16_to_utf8(pTHX_ U8* p, U8 *d, I32 bytelen, I32 *newle
 PERL_CALLCONV U8*      Perl_utf16_to_utf8_reversed(pTHX_ U8* p, U8 *d, I32 bytelen, I32 *newlen);
 #define PERL_ARGS_ASSERT_UTF16_TO_UTF8_REVERSED        \
        assert(p); assert(d); assert(newlen)
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE IV  Perl_utf8_distance(pTHX_ const U8 *a, const U8 *b)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_UTF8_DISTANCE \
        assert(a); assert(b)
+#endif
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE U8* Perl_utf8_hop(const U8 *s, SSize_t off)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_UTF8_HOP      \
        assert(s)
+#endif
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE U8* Perl_utf8_hop_back(const U8 *s, SSize_t off, const U8 *start)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_UTF8_HOP_BACK \
        assert(s); assert(start)
+#endif
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE U8* Perl_utf8_hop_forward(const U8 *s, SSize_t off, const U8 *end)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_UTF8_HOP_FORWARD      \
        assert(s); assert(end)
+#endif
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE U8* Perl_utf8_hop_safe(const U8 *s, SSize_t off, const U8 *start, const U8 *end)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_UTF8_HOP_SAFE \
        assert(s); assert(start); assert(end)
+#endif
 
 PERL_CALLCONV STRLEN   Perl_utf8_length(pTHX_ const U8* s, const U8 *e)
                        __attribute__warn_unused_result__
@@ -3544,9 +3624,9 @@ PERL_CALLCONV STRLEN      Perl_utf8_length(pTHX_ const U8* s, const U8 *e)
 #define PERL_ARGS_ASSERT_UTF8_LENGTH   \
        assert(s); assert(e)
 
-PERL_CALLCONV U8*      Perl_utf8_to_bytes(pTHX_ U8 *s, STRLEN *len);
+PERL_CALLCONV U8*      Perl_utf8_to_bytes(pTHX_ U8 *s, STRLEN *lenp);
 #define PERL_ARGS_ASSERT_UTF8_TO_BYTES \
-       assert(s); assert(len)
+       assert(s); assert(lenp)
 PERL_CALLCONV UV       Perl_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen)
                        __attribute__deprecated__;
 #define PERL_ARGS_ASSERT_UTF8_TO_UVCHR \
@@ -3588,17 +3668,19 @@ PERL_CALLCONV U8*       Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv);
 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)
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE UV  Perl_valid_utf8_to_uvchr(const U8 *s, STRLEN *retlen)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_VALID_UTF8_TO_UVCHR   \
        assert(s)
+#endif
 
 PERL_CALLCONV UV       Perl_valid_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen)
                        __attribute__deprecated__;
 #define PERL_ARGS_ASSERT_VALID_UTF8_TO_UVUNI   \
        assert(s)
 
-PERL_CALLCONV bool     Perl_validate_proto(pTHX_ SV *name, SV *proto, bool warn);
+PERL_CALLCONV bool     Perl_validate_proto(pTHX_ SV *name, SV *proto, bool warn, bool curstash);
 #define PERL_ARGS_ASSERT_VALIDATE_PROTO        \
        assert(name)
 PERL_CALLCONV int      Perl_vcmp(pTHX_ SV *lhv, SV *rhv);
@@ -3699,11 +3781,17 @@ PERL_CALLCONV int       Perl_yyerror_pv(pTHX_ const char *const s, U32 flags);
 #define PERL_ARGS_ASSERT_YYERROR_PV    \
        assert(s)
 PERL_CALLCONV int      Perl_yyerror_pvn(pTHX_ const char *const s, STRLEN len, U32 flags);
-#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_yyquit(pTHX);
 PERL_CALLCONV void     Perl_yyunlex(pTHX);
+#if ! defined(HAS_MEMRCHR) && (defined(PERL_CORE) || defined(PERL_EXT))
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE void *      S_my_memrchr(const char * s, const char c, const STRLEN len);
+#define PERL_ARGS_ASSERT_MY_MEMRCHR    \
+       assert(s)
+#endif
+#endif
 #if !(defined(DEBUGGING))
 #  if !defined(NV_PRESERVES_UV)
 #    if defined(PERL_IN_SV_C)
@@ -3721,6 +3809,14 @@ PERL_CALLCONV char*      Perl_ninstr(const char* big, const char* bigend, const char*
        assert(big); assert(bigend); assert(little); assert(lend)
 
 #endif
+#if !(defined(HAS_NL_LANGINFO) && defined(PERL_LANGINFO_H))
+PERL_CALLCONV const char*      Perl_langinfo(const int item);
+#endif
+#if !(defined(HAS_NL_LANGINFO))
+#  if defined(PERL_IN_LOCALE_C)
+STATIC const char*     S_my_nl_langinfo(const int item, bool toggle);
+#  endif
+#endif
 #if !(defined(HAS_SIGACTION) && defined(SA_SIGINFO))
 PERL_CALLCONV Signal_t Perl_csighandler(int sig);
 PERL_CALLCONV Signal_t Perl_sighandler(int sig);
@@ -3737,9 +3833,6 @@ PERL_CALLCONV void*       Perl_my_cxt_init(pTHX_ int *index, size_t size);
        assert(index)
 #  endif
 #endif
-#if !(defined(WIN32))
-/* PERL_CALLCONV char* my_setlocale(pTHX_ int category, const char* locale); */
-#endif
 #if !(defined(_MSC_VER))
 PERL_CALLCONV_NO_RET int       Perl_magic_regdatum_set(pTHX_ SV* sv, MAGIC* mg)
                        __attribute__noreturn__;
@@ -3747,34 +3840,11 @@ PERL_CALLCONV_NO_RET int        Perl_magic_regdatum_set(pTHX_ SV* sv, MAGIC* mg)
        assert(sv); assert(mg)
 
 #endif
-#if !defined(HAS_BZERO) && !defined(HAS_MEMSET)
-PERL_CALLCONV void*    Perl_my_bzero(void* vloc, size_t len);
-#define PERL_ARGS_ASSERT_MY_BZERO      \
-       assert(vloc)
-#endif
 #if !defined(HAS_GETENV_LEN)
 PERL_CALLCONV char*    Perl_getenv_len(pTHX_ const char *env_elem, unsigned long *len);
 #define PERL_ARGS_ASSERT_GETENV_LEN    \
        assert(env_elem); assert(len)
 #endif
-#if !defined(HAS_MEMCMP) || !defined(HAS_SANE_MEMCMP)
-PERL_CALLCONV int      Perl_my_memcmp(const void* vs1, const void* vs2, size_t len)
-                       __attribute__warn_unused_result__
-                       __attribute__pure__;
-#define PERL_ARGS_ASSERT_MY_MEMCMP     \
-       assert(vs1); assert(vs2)
-
-#endif
-#if !defined(HAS_MEMCPY) || (!defined(HAS_MEMMOVE) && !defined(HAS_SAFE_MEMCPY))
-PERL_CALLCONV void*    Perl_my_bcopy(const void* vfrom, void* vto, size_t len);
-#define PERL_ARGS_ASSERT_MY_BCOPY      \
-       assert(vfrom); assert(vto)
-#endif
-#if !defined(HAS_MEMSET)
-PERL_CALLCONV void*    Perl_my_memset(void* vloc, int ch, size_t len);
-#define PERL_ARGS_ASSERT_MY_MEMSET     \
-       assert(vloc)
-#endif
 #if !defined(HAS_MKDIR) || !defined(HAS_RMDIR)
 #  if defined(PERL_IN_PP_SYS_C)
 STATIC int     S_dooneliner(pTHX_ const char *cmd, const char *filename)
@@ -3784,6 +3854,11 @@ STATIC int       S_dooneliner(pTHX_ const char *cmd, const char *filename)
 
 #  endif
 #endif
+#if !defined(HAS_MKSTEMP)
+PERL_CALLCONV int      Perl_my_mkstemp(char *templte);
+#define PERL_ARGS_ASSERT_MY_MKSTEMP    \
+       assert(templte)
+#endif
 #if !defined(HAS_RENAME)
 PERL_CALLCONV I32      Perl_same_dirent(pTHX_ const char* a, const char* b);
 #define PERL_ARGS_ASSERT_SAME_DIRENT   \
@@ -3801,6 +3876,11 @@ PERL_CALLCONV Size_t     Perl_my_strlcat(char *dst, const char *src, Size_t size);
 #if !defined(HAS_STRLCPY)
 PERL_CALLCONV Size_t   Perl_my_strlcpy(char *dst, const char *src, Size_t size);
 #endif
+#if !defined(HAS_STRNLEN)
+PERL_CALLCONV Size_t   Perl_my_strnlen(const char *str, Size_t maxlen);
+#define PERL_ARGS_ASSERT_MY_STRNLEN    \
+       assert(str)
+#endif
 #if !defined(HAS_TRUNCATE) && !defined(HAS_CHSIZE) && defined(F_FREESP)
 PERL_CALLCONV I32      Perl_my_chsize(pTHX_ int fd, Off_t length)
                        __attribute__warn_unused_result__;
@@ -3829,41 +3909,55 @@ STATIC PerlIO * S_doopen_pm(pTHX_ SV *name)
 STATIC void    S__append_range_to_invlist(pTHX_ SV* const invlist, const UV start, const UV end);
 #define PERL_ARGS_ASSERT__APPEND_RANGE_TO_INVLIST      \
        assert(invlist)
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE UV* S__invlist_array_init(SV* const invlist, const bool will_have_0)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT__INVLIST_ARRAY_INIT   \
        assert(invlist)
+#endif
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE IV* S_get_invlist_previous_index_addr(SV* invlist)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_GET_INVLIST_PREVIOUS_INDEX_ADDR       \
        assert(invlist)
+#endif
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_invlist_clear(pTHX_ SV* invlist);
 #define PERL_ARGS_ASSERT_INVLIST_CLEAR \
        assert(invlist)
+#endif
 STATIC void    S_invlist_extend(pTHX_ SV* const invlist, const UV len);
 #define PERL_ARGS_ASSERT_INVLIST_EXTEND        \
        assert(invlist)
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE UV  S_invlist_max(SV* const invlist)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_INVLIST_MAX   \
        assert(invlist)
+#endif
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE IV  S_invlist_previous_index(SV* const invlist)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_INVLIST_PREVIOUS_INDEX        \
        assert(invlist)
+#endif
 
 STATIC void    S_invlist_replace_list_destroys_src(pTHX_ SV *dest, SV *src);
 #define PERL_ARGS_ASSERT_INVLIST_REPLACE_LIST_DESTROYS_SRC     \
        assert(dest); assert(src)
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_invlist_set_previous_index(SV* const invlist, const IV index);
 #define PERL_ARGS_ASSERT_INVLIST_SET_PREVIOUS_INDEX    \
        assert(invlist)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_invlist_trim(SV* invlist);
 #define PERL_ARGS_ASSERT_INVLIST_TRIM  \
        assert(invlist)
+#endif
 #  endif
 #endif
 #if !defined(PERL_IMPLICIT_SYS)
@@ -3880,82 +3974,96 @@ STATIC SV *     S_incpush_if_exists(pTHX_ AV *const av, SV *dir, SV *const stem);
 #  endif
 #endif
 #if !defined(PERL_NO_INLINE_FUNCTIONS)
-PERL_CALLCONV STRLEN   Perl__is_utf8_char_helper(const U8 * const s, const U8 * e, const U32 flags)
-                       __attribute__warn_unused_result__
-                       __attribute__pure__;
-#define PERL_ARGS_ASSERT__IS_UTF8_CHAR_HELPER  \
-       assert(s); assert(e)
-
-PERL_STATIC_INLINE void        S_append_utf8_from_native_byte(const U8 byte, U8** dest);
-#define PERL_ARGS_ASSERT_APPEND_UTF8_FROM_NATIVE_BYTE  \
-       assert(dest)
-PERL_STATIC_INLINE SSize_t     S_av_top_index(pTHX_ AV *av)
-                       __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_AV_TOP_INDEX  \
-       assert(av)
-
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_cx_popblock(pTHX_ PERL_CONTEXT *cx);
 #define PERL_ARGS_ASSERT_CX_POPBLOCK   \
        assert(cx)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_cx_popeval(pTHX_ PERL_CONTEXT *cx);
 #define PERL_ARGS_ASSERT_CX_POPEVAL    \
        assert(cx)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_cx_popformat(pTHX_ PERL_CONTEXT *cx);
 #define PERL_ARGS_ASSERT_CX_POPFORMAT  \
        assert(cx)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_cx_popgiven(pTHX_ PERL_CONTEXT *cx);
 #define PERL_ARGS_ASSERT_CX_POPGIVEN   \
        assert(cx)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_cx_poploop(pTHX_ PERL_CONTEXT *cx);
 #define PERL_ARGS_ASSERT_CX_POPLOOP    \
        assert(cx)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_cx_popsub(pTHX_ PERL_CONTEXT *cx);
 #define PERL_ARGS_ASSERT_CX_POPSUB     \
        assert(cx)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_cx_popsub_args(pTHX_ PERL_CONTEXT *cx);
 #define PERL_ARGS_ASSERT_CX_POPSUB_ARGS        \
        assert(cx)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_cx_popsub_common(pTHX_ PERL_CONTEXT *cx);
 #define PERL_ARGS_ASSERT_CX_POPSUB_COMMON      \
        assert(cx)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_cx_popwhen(pTHX_ PERL_CONTEXT *cx);
 #define PERL_ARGS_ASSERT_CX_POPWHEN    \
        assert(cx)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE PERL_CONTEXT *      S_cx_pushblock(pTHX_ U8 type, U8 gimme, SV** sp, I32 saveix);
 #define PERL_ARGS_ASSERT_CX_PUSHBLOCK  \
        assert(sp)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_cx_pusheval(pTHX_ PERL_CONTEXT *cx, OP *retop, SV *namesv);
 #define PERL_ARGS_ASSERT_CX_PUSHEVAL   \
        assert(cx)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_cx_pushformat(pTHX_ PERL_CONTEXT *cx, CV *cv, OP *retop, GV *gv);
 #define PERL_ARGS_ASSERT_CX_PUSHFORMAT \
        assert(cx); assert(cv)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_cx_pushgiven(pTHX_ PERL_CONTEXT *cx, SV *orig_defsv);
 #define PERL_ARGS_ASSERT_CX_PUSHGIVEN  \
        assert(cx)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_cx_pushloop_for(pTHX_ PERL_CONTEXT *cx, void *itervarp, SV *itersave);
 #define PERL_ARGS_ASSERT_CX_PUSHLOOP_FOR       \
        assert(cx); assert(itervarp)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_cx_pushloop_plain(pTHX_ PERL_CONTEXT *cx);
 #define PERL_ARGS_ASSERT_CX_PUSHLOOP_PLAIN     \
        assert(cx)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_cx_pushsub(pTHX_ PERL_CONTEXT *cx, CV *cv, OP *retop, bool hasargs);
 #define PERL_ARGS_ASSERT_CX_PUSHSUB    \
        assert(cx); assert(cv)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_cx_pushwhen(pTHX_ PERL_CONTEXT *cx);
 #define PERL_ARGS_ASSERT_CX_PUSHWHEN   \
        assert(cx)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_cx_topblock(pTHX_ PERL_CONTEXT *cx);
 #define PERL_ARGS_ASSERT_CX_TOPBLOCK   \
        assert(cx)
-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__;
-#define PERL_ARGS_ASSERT_IS_SAFE_SYSCALL       \
-       assert(pv); assert(what); assert(op_name)
-
-PERL_STATIC_INLINE bool        S_sv_only_taint_gmagic(SV *sv);
-#define PERL_ARGS_ASSERT_SV_ONLY_TAINT_GMAGIC  \
-       assert(sv)
+#endif
 #endif
 #if !defined(PERL_NO_UTF16_FILTER)
 #  if defined(PERL_IN_TOKE_C)
@@ -3974,16 +4082,20 @@ STATIC void     S_validate_suid(pTHX_ PerlIO *rsfp);
        assert(rsfp)
 #  endif
 #endif
-#if !defined(SPRINTF_RETURNS_STRLEN)
-PERL_CALLCONV int      Perl_my_sprintf(char *buffer, const char *pat, ...);
-#define PERL_ARGS_ASSERT_MY_SPRINTF    \
-       assert(buffer); assert(pat)
-#endif
 #if !defined(USE_QUADMATH)
 #  if defined(PERL_IN_NUMERIC_C)
 STATIC NV      S_mulexp10(NV value, I32 exponent);
 #  endif
 #endif
+#if !defined(UV_IS_QUAD)
+#  if defined(PERL_IN_UTF8_C)
+STATIC int     S_is_utf8_cp_above_31_bits(const U8 * const s, const U8 * const e, const bool consider_overlongs)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_IS_UTF8_CP_ABOVE_31_BITS      \
+       assert(s); assert(e)
+
+#  endif
+#endif
 #if !defined(WIN32)
 PERL_CALLCONV bool     Perl_do_exec3(pTHX_ const char *incmd, int fd, int do_report);
 #define PERL_ARGS_ASSERT_DO_EXEC3      \
@@ -4005,6 +4117,19 @@ PERL_CALLCONV SV*        Perl_pad_sv(pTHX_ PADOFFSET po);
 PERL_CALLCONV void     Perl_set_padlist(CV * cv, PADLIST * padlist);
 #define PERL_ARGS_ASSERT_SET_PADLIST   \
        assert(cv)
+#  if defined(PERL_IN_LOCALE_C)
+#    if defined(USE_LOCALE)
+STATIC void    S_print_bytes_for_locale(pTHX_ const char * const s, const char * const e, const bool is_utf8);
+#define PERL_ARGS_ASSERT_PRINT_BYTES_FOR_LOCALE        \
+       assert(s); assert(e)
+STATIC void    S_print_collxfrm_input_and_return(pTHX_ const char * const s, const char * const e, const STRLEN * const xlen, const bool is_utf8);
+#define PERL_ARGS_ASSERT_PRINT_COLLXFRM_INPUT_AND_RETURN       \
+       assert(s); assert(e)
+STATIC char *  S_setlocale_debug_string(const int category, const char* const locale, const char* const retval)
+                       __attribute__warn_unused_result__;
+
+#    endif
+#  endif
 #  if defined(PERL_IN_PAD_C)
 STATIC void    S_cv_dump(pTHX_ const CV *cv, const char *title);
 #define PERL_ARGS_ASSERT_CV_DUMP       \
@@ -4073,16 +4198,6 @@ STATIC int       S_tokereport(pTHX_ I32 rv, const YYSTYPE* lvalp);
 #define PERL_ARGS_ASSERT_TOKEREPORT    \
        assert(lvalp)
 #  endif
-#  if defined(USE_LOCALE)     && (defined(PERL_IN_LOCALE_C) || defined (PERL_EXT_POSIX))
-PERL_CALLCONV char *   Perl__setlocale_debug_string(const int category, const char* const locale, const char* const retval)
-                       __attribute__warn_unused_result__;
-
-#  endif
-#  if defined(USE_LOCALE) && defined(PERL_IN_LOCALE_C)
-STATIC void    S_print_collxfrm_input_and_return(pTHX_ const char * const s, const char * const e, const STRLEN * const xlen, const bool is_utf8);
-#define PERL_ARGS_ASSERT_PRINT_COLLXFRM_INPUT_AND_RETURN       \
-       assert(s); assert(e)
-#  endif
 #endif
 #if defined(DEBUGGING) && defined(ENABLE_REGEX_SETS_DEBUGGING)
 #  if defined(PERL_IN_REGCOMP_C)
@@ -4124,6 +4239,14 @@ PERL_CALLCONV I32        Perl_do_shmio(pTHX_ I32 optype, SV** mark, SV** sp);
 #define PERL_ARGS_ASSERT_DO_SHMIO      \
        assert(mark); assert(sp)
 #endif
+#if defined(HAS_NL_LANGINFO)
+#  if defined(PERL_IN_LOCALE_C)
+STATIC const char*     S_my_nl_langinfo(const nl_item item, bool toggle);
+#  endif
+#endif
+#if defined(HAS_NL_LANGINFO) && defined(PERL_LANGINFO_H)
+PERL_CALLCONV const char*      Perl_langinfo(const nl_item item);
+#endif
 #if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
 PERL_CALLCONV Signal_t Perl_csighandler(int sig, siginfo_t *info, void *uap);
 PERL_CALLCONV Signal_t Perl_sighandler(int sig, siginfo_t *info, void *uap);
@@ -4171,10 +4294,12 @@ PERL_CALLCONV void      Perl_opslab_free_nopad(pTHX_ OPSLAB *slab);
 PERL_CALLCONV void     Perl_parser_free_nexttoke_ops(pTHX_ yy_parser *parser, OPSLAB *slab);
 #define PERL_ARGS_ASSERT_PARSER_FREE_NEXTTOKE_OPS      \
        assert(parser); assert(slab)
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE bool        S_should_warn_nl(const char *pv)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_SHOULD_WARN_NL        \
        assert(pv)
+#endif
 
 #  if defined(PERL_DEBUG_READONLY_OPS)
 PERL_CALLCONV void     Perl_Slab_to_ro(pTHX_ OPSLAB *slab);
@@ -4186,10 +4311,12 @@ PERL_CALLCONV void      Perl_Slab_to_rw(pTHX_ OPSLAB *const slab);
 #  endif
 #endif
 #if defined(PERL_CORE) || defined (PERL_EXT)
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE STRLEN      S_sv_or_pv_pos_u2b(pTHX_ SV *sv, const char *pv, STRLEN pos, STRLEN *lenp);
 #define PERL_ARGS_ASSERT_SV_OR_PV_POS_U2B      \
        assert(sv); assert(pv)
 #endif
+#endif
 #if defined(PERL_CR_FILTER)
 #  if defined(PERL_IN_TOKE_C)
 STATIC I32     S_cr_textfilter(pTHX_ int idx, SV *sv, int maxlen);
@@ -4339,7 +4466,7 @@ 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);
+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, Stat_t *statbufp);
 #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);
@@ -4397,7 +4524,9 @@ PERL_CALLCONV void        Perl_hv_kill_backrefs(pTHX_ HV *hv);
 STATIC bool    S_find_default_stash(pTHX_ HV **stash, const char *name, STRLEN len, const U32 is_utf8, const I32 add, const svtype sv_type);
 #define PERL_ARGS_ASSERT_FIND_DEFAULT_STASH    \
        assert(stash); assert(name)
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE GV* S_gv_fetchmeth_internal(pTHX_ HV* stash, SV* meth, const char* name, STRLEN len, I32 level, U32 flags);
+#endif
 STATIC void    S_gv_init_svtype(pTHX_ GV *gv, const svtype sv_type);
 #define PERL_ARGS_ASSERT_GV_INIT_SVTYPE        \
        assert(gv)
@@ -4410,10 +4539,14 @@ STATIC bool     S_gv_magicalize(pTHX_ GV *gv, HV *stash, const char *name, STRLEN le
 STATIC void    S_gv_magicalize_isa(pTHX_ GV *gv);
 #define PERL_ARGS_ASSERT_GV_MAGICALIZE_ISA     \
        assert(gv)
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE HV* S_gv_stashpvn_internal(pTHX_ const char* name, U32 namelen, I32 flags);
 #define PERL_ARGS_ASSERT_GV_STASHPVN_INTERNAL  \
        assert(name)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE HV* S_gv_stashsvpvn_cached(pTHX_ SV *namesv, const char* name, U32 namelen, I32 flags);
+#endif
 STATIC void    S_maybe_multimagic_gv(pTHX_ GV *gv, const char *name, const svtype sv_type);
 #define PERL_ARGS_ASSERT_MAYBE_MULTIMAGIC_GV   \
        assert(gv); assert(name)
@@ -4433,9 +4566,6 @@ PERL_CALLCONV void        Perl_sv_add_backref(pTHX_ SV *const tsv, SV *const sv);
 STATIC void    S_clear_placeholders(pTHX_ HV *hv, U32 items);
 #define PERL_ARGS_ASSERT_CLEAR_PLACEHOLDERS    \
        assert(hv)
-STATIC void    S_hfreeentries(pTHX_ HV *hv);
-#define PERL_ARGS_ASSERT_HFREEENTRIES  \
-       assert(hv)
 STATIC void    S_hsplit(pTHX_ HV *hv, STRLEN const oldsize, STRLEN newsize);
 #define PERL_ARGS_ASSERT_HSPLIT        \
        assert(hv)
@@ -4449,6 +4579,9 @@ STATIC SV*        S_hv_delete_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN k
 STATIC SV*     S_hv_free_ent_ret(pTHX_ HV *hv, HE *entry);
 #define PERL_ARGS_ASSERT_HV_FREE_ENT_RET       \
        assert(hv); assert(entry)
+STATIC void    S_hv_free_entries(pTHX_ HV *hv);
+#define PERL_ARGS_ASSERT_HV_FREE_ENTRIES       \
+       assert(hv)
 STATIC void    S_hv_magic_check(HV *hv, bool *needs_copy, bool *needs_store);
 #define PERL_ARGS_ASSERT_HV_MAGIC_CHECK        \
        assert(hv); assert(needs_copy); assert(needs_store)
@@ -4460,7 +4593,9 @@ PERL_STATIC_NO_RET void   S_hv_notallowed(pTHX_ int flags, const char *key, I32 kl
 STATIC HE*     S_new_he(pTHX)
                        __attribute__warn_unused_result__;
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE U32 S_ptr_hash(PTRV u);
+#endif
 STATIC SV *    S_refcounted_he_value(pTHX_ const struct refcounted_he *he);
 #define PERL_ARGS_ASSERT_REFCOUNTED_HE_VALUE   \
        assert(he)
@@ -4470,7 +4605,7 @@ STATIC HEK*       S_save_hek_flags(const char *str, I32 len, U32 hash, int flags)
 #define PERL_ARGS_ASSERT_SAVE_HEK_FLAGS        \
        assert(str)
 
-STATIC HEK*    S_share_hek_flags(pTHX_ const char *str, I32 len, U32 hash, int flags)
+STATIC HEK*    S_share_hek_flags(pTHX_ const char *str, STRLEN len, U32 hash, int flags)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_SHARE_HEK_FLAGS       \
        assert(str)
@@ -4487,6 +4622,26 @@ PERL_CALLCONV SV*        Perl_hfree_next_entry(pTHX_ HV *hv, STRLEN *indexp);
 #define PERL_ARGS_ASSERT_HFREE_NEXT_ENTRY      \
        assert(hv); assert(indexp)
 #endif
+#if defined(PERL_IN_LOCALE_C)
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE const char *        S_save_to_buffer(const char * string, char **buf, Size_t *buf_size, const Size_t offset);
+#define PERL_ARGS_ASSERT_SAVE_TO_BUFFER        \
+       assert(string); assert(buf_size)
+#endif
+#  if defined(USE_LOCALE)
+STATIC void    S_new_collate(pTHX_ const char* newcoll);
+STATIC void    S_new_ctype(pTHX_ const char* newctype);
+#define PERL_ARGS_ASSERT_NEW_CTYPE     \
+       assert(newctype)
+STATIC void    S_set_numeric_radix(pTHX_ const bool use_locale);
+STATIC char*   S_stdize_locale(pTHX_ char* locs);
+#define PERL_ARGS_ASSERT_STDIZE_LOCALE \
+       assert(locs)
+#    if defined(WIN32)
+STATIC char*   S_win32_setlocale(pTHX_ int category, const char* locale);
+#    endif
+#  endif
+#endif
 #if defined(PERL_IN_LOCALE_C) || defined(PERL_IN_SV_C) || defined(PERL_IN_MATHOMS_C)
 #  if defined(USE_LOCALE_COLLATE)
 PERL_CALLCONV char*    Perl__mem_collxfrm(pTHX_ const char* input_string, STRLEN len, STRLEN* xlen, bool utf8);
@@ -4583,7 +4738,7 @@ STATIC bool       S_looks_like_bool(pTHX_ const OP* o);
 #define PERL_ARGS_ASSERT_LOOKS_LIKE_BOOL       \
        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);
+STATIC void    S_move_proto_attr(pTHX_ OP **proto, OP **attrs, const GV *name, bool curstash);
 #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);
@@ -4592,7 +4747,9 @@ STATIC OP *       S_my_kid(pTHX_ OP *o, OP *attrs, OP **imopsp);
 STATIC OP*     S_newGIVWHENOP(pTHX_ OP* cond, OP *block, I32 enter_opcode, I32 leave_opcode, PADOFFSET entertarg);
 #define PERL_ARGS_ASSERT_NEWGIVWHENOP  \
        assert(block)
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE OP* S_newMETHOP_internal(pTHX_ I32 type, I32 flags, OP* dynamic_meth, SV* const_meth);
+#endif
 STATIC OP*     S_new_logop(pTHX_ I32 type, I32 flags, OP **firstp, OP **otherp)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_NEW_LOGOP     \
@@ -4606,12 +4763,19 @@ STATIC OP*      S_no_fh_allowed(pTHX_ OP *o)
 #define PERL_ARGS_ASSERT_NO_FH_ALLOWED \
        assert(o)
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE OP* S_op_integerize(pTHX_ OP *o);
 #define PERL_ARGS_ASSERT_OP_INTEGERIZE \
        assert(o)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE OP* S_op_std_init(pTHX_ OP *o);
 #define PERL_ARGS_ASSERT_OP_STD_INIT   \
        assert(o)
+#endif
+STATIC void    S_optimize_op(pTHX_ OP* o);
+#define PERL_ARGS_ASSERT_OPTIMIZE_OP   \
+       assert(o)
 STATIC OP*     S_pmtrans(pTHX_ OP* o, OP* expr, OP* repl);
 #define PERL_ARGS_ASSERT_PMTRANS       \
        assert(o); assert(expr); assert(repl)
@@ -4645,9 +4809,11 @@ STATIC OP*       S_too_many_arguments_pv(pTHX_ OP *o, const char* name, U32 flags);
 #define PERL_ARGS_ASSERT_TOO_MANY_ARGUMENTS_PV \
        assert(o); assert(name)
 #  if defined(USE_ITHREADS)
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_op_relocate_sv(pTHX_ SV** svp, PADOFFSET* targp);
 #define PERL_ARGS_ASSERT_OP_RELOCATE_SV        \
        assert(svp); assert(targp)
+#endif
 #  endif
 #endif
 #if defined(PERL_IN_OP_C) || defined(PERL_IN_SV_C)
@@ -4735,7 +4901,7 @@ STATIC void       S_destroy_matcher(pTHX_ PMOP* matcher);
 #define PERL_ARGS_ASSERT_DESTROY_MATCHER       \
        assert(matcher)
 STATIC OP*     S_do_smartmatch(pTHX_ HV* seen_this, HV* seen_other, const bool copied);
-STATIC OP*     S_docatch(pTHX_ OP *o)
+STATIC OP*     S_docatch(pTHX_ Perl_ppaddr_t firstpp)
                        __attribute__warn_unused_result__;
 
 STATIC bool    S_doeval_compile(pTHX_ U8 gimme, CV* outside, U32 seq, HV* hh);
@@ -4782,10 +4948,12 @@ STATIC bool     S_matcher_matches_sv(pTHX_ PMOP* matcher, SV* sv)
 STATIC bool    S_num_overflow(NV value, I32 fldsize, I32 frcsize)
                        __attribute__warn_unused_result__;
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE bool        S_path_is_searchable(const char *name)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_PATH_IS_SEARCHABLE    \
        assert(name)
+#endif
 
 STATIC I32     S_run_user_filter(pTHX_ int idx, SV *buf_sv, int maxlen)
                        __attribute__warn_unused_result__;
@@ -4806,10 +4974,12 @@ STATIC void     S_save_lines(pTHX_ AV *array, SV *sv);
 STATIC void    S_do_oddball(pTHX_ SV **oddkey, SV **firstkey);
 #define PERL_ARGS_ASSERT_DO_ODDBALL    \
        assert(oddkey); assert(firstkey)
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE HV* S_opmethod_stash(pTHX_ SV* meth);
 #define PERL_ARGS_ASSERT_OPMETHOD_STASH        \
        assert(meth)
 #endif
+#endif
 #if defined(PERL_IN_PP_PACK_C)
 STATIC int     S_div128(pTHX_ SV *pnum, bool *done);
 #define PERL_ARGS_ASSERT_DIV128        \
@@ -4908,8 +5078,10 @@ STATIC SV*       S__make_exactf_invlist(pTHX_ RExC_state_t *pRExC_state, regnode *node
 STATIC void    S_add_above_Latin1_folds(pTHX_ RExC_state_t *pRExC_state, const U8 cp, SV** invlist);
 #define PERL_ARGS_ASSERT_ADD_ABOVE_LATIN1_FOLDS        \
        assert(pRExC_state); assert(invlist)
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE SV* S_add_cp_to_invlist(pTHX_ SV* invlist, const UV cp)
                        __attribute__warn_unused_result__;
+#endif
 
 STATIC U32     S_add_data(RExC_state_t* const pRExC_state, const char* const s, const U32 n)
                        __attribute__warn_unused_result__;
@@ -4919,15 +5091,19 @@ STATIC U32      S_add_data(RExC_state_t* const pRExC_state, const char* const s, cons
 STATIC AV*     S_add_multi_match(pTHX_ AV* multi_char_matches, SV* multi_string, const STRLEN cp_count);
 #define PERL_ARGS_ASSERT_ADD_MULTI_MATCH       \
        assert(multi_string)
+#ifndef PERL_NO_INLINE_FUNCTIONS
 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);
 #define PERL_ARGS_ASSERT_ALLOC_MAYBE_POPULATE_EXACT    \
        assert(pRExC_state); assert(node); assert(flagp)
+#endif
 STATIC const char *    S_cntrl_to_mnemonic(const U8 c)
                        __attribute__warn_unused_result__;
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE U8  S_compute_EXACTish(RExC_state_t *pRExC_state);
 #define PERL_ARGS_ASSERT_COMPUTE_EXACTISH      \
        assert(pRExC_state)
+#endif
 STATIC regnode *       S_construct_ahocorasick_from_trie(pTHX_ RExC_state_t *pRExC_state, regnode *source, U32 depth);
 #define PERL_ARGS_ASSERT_CONSTRUCT_AHOCORASICK_FROM_TRIE       \
        assert(pRExC_state); assert(source)
@@ -4939,57 +5115,73 @@ STATIC int      S_edit_distance(const UV *src, const UV *tgt, const STRLEN x, const S
 STATIC SV*     S_get_ANYOF_cp_list_for_ssc(pTHX_ const RExC_state_t *pRExC_state, const regnode_charclass* const node);
 #define PERL_ARGS_ASSERT_GET_ANYOF_CP_LIST_FOR_SSC     \
        assert(pRExC_state); assert(node)
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE STRLEN*     S_get_invlist_iter_addr(SV* invlist)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_GET_INVLIST_ITER_ADDR \
        assert(invlist)
+#endif
 
 STATIC bool    S_grok_bslash_N(pTHX_ RExC_state_t *pRExC_state, regnode** nodep, UV *code_point_p, int* cp_count, I32 *flagp, const bool strict, const U32 depth);
 #define PERL_ARGS_ASSERT_GROK_BSLASH_N \
        assert(pRExC_state); assert(flagp)
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE regnode*    S_handle_named_backref(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, char * parse_start, char ch);
 #define PERL_ARGS_ASSERT_HANDLE_NAMED_BACKREF  \
        assert(pRExC_state); assert(flagp); assert(parse_start)
+#endif
 STATIC int     S_handle_possible_posix(pTHX_ RExC_state_t *pRExC_state, const char* const s, char ** updated_parse_ptr, AV** posix_warnings, const bool check_only);
 #define PERL_ARGS_ASSERT_HANDLE_POSSIBLE_POSIX \
        assert(pRExC_state); assert(s)
 STATIC regnode*        S_handle_regex_sets(pTHX_ RExC_state_t *pRExC_state, SV ** return_invlist, I32 *flagp, U32 depth, char * const oregcomp_parse);
 #define PERL_ARGS_ASSERT_HANDLE_REGEX_SETS     \
        assert(pRExC_state); assert(flagp); assert(oregcomp_parse)
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE SV* S_invlist_clone(pTHX_ SV* const invlist)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_INVLIST_CLONE \
        assert(invlist)
+#endif
 
 STATIC SV*     S_invlist_contents(pTHX_ SV* const invlist, const bool traditional_style)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_INVLIST_CONTENTS      \
        assert(invlist)
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE UV  S_invlist_highest(SV* const invlist)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_INVLIST_HIGHEST       \
        assert(invlist)
+#endif
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE bool        S_invlist_is_iterating(SV* const invlist)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_INVLIST_IS_ITERATING  \
        assert(invlist)
+#endif
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_invlist_iterfinish(SV* invlist);
 #define PERL_ARGS_ASSERT_INVLIST_ITERFINISH    \
        assert(invlist)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_invlist_iterinit(SV* invlist);
 #define PERL_ARGS_ASSERT_INVLIST_ITERINIT      \
        assert(invlist)
+#endif
 STATIC bool    S_invlist_iternext(SV* invlist, UV* start, UV* end)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_INVLIST_ITERNEXT      \
        assert(invlist); assert(start); assert(end)
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_invlist_set_len(pTHX_ SV* const invlist, const UV len, const bool offset);
 #define PERL_ARGS_ASSERT_INVLIST_SET_LEN       \
        assert(invlist)
+#endif
 STATIC bool    S_is_ssc_worth_it(const RExC_state_t * pRExC_state, const regnode_ssc * ssc);
 #define PERL_ARGS_ASSERT_IS_SSC_WORTH_IT       \
        assert(pRExC_state); assert(ssc)
@@ -4999,6 +5191,11 @@ STATIC U32       S_join_exact(pTHX_ RExC_state_t *pRExC_state, regnode *scan, UV *min_
 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);
 #define PERL_ARGS_ASSERT_MAKE_TRIE     \
        assert(pRExC_state); assert(startbranch); assert(first); assert(last); assert(tail)
+STATIC bool    S_new_regcurly(const char *s, const char *e)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_NEW_REGCURLY  \
+       assert(s); assert(e)
+
 STATIC void    S_nextchar(pTHX_ RExC_state_t *pRExC_state);
 #define PERL_ARGS_ASSERT_NEXTCHAR      \
        assert(pRExC_state)
@@ -5028,9 +5225,11 @@ STATIC regnode*  S_reg_node(pTHX_ RExC_state_t *pRExC_state, U8 op);
 STATIC SV *    S_reg_scan_name(pTHX_ RExC_state_t *pRExC_state, U32 flags);
 #define PERL_ARGS_ASSERT_REG_SCAN_NAME \
        assert(pRExC_state)
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE char *      S_reg_skipcomment(RExC_state_t *pRExC_state, char * p);
 #define PERL_ARGS_ASSERT_REG_SKIPCOMMENT       \
        assert(pRExC_state); assert(p)
+#endif
 STATIC regnode*        S_reganode(pTHX_ RExC_state_t *pRExC_state, U8 op, U32 arg);
 #define PERL_ARGS_ASSERT_REGANODE      \
        assert(pRExC_state)
@@ -5067,30 +5266,38 @@ STATIC void     S_set_ANYOF_arg(pTHX_ RExC_state_t* const pRExC_state, regnode* cons
 STATIC void    S_skip_to_be_ignored_text(pTHX_ RExC_state_t *pRExC_state, char ** p, const bool force_to_xmod);
 #define PERL_ARGS_ASSERT_SKIP_TO_BE_IGNORED_TEXT       \
        assert(pRExC_state); assert(p)
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_ssc_add_range(pTHX_ regnode_ssc *ssc, UV const start, UV const end);
 #define PERL_ARGS_ASSERT_SSC_ADD_RANGE \
        assert(ssc)
+#endif
 STATIC void    S_ssc_and(pTHX_ const RExC_state_t *pRExC_state, regnode_ssc *ssc, const regnode_charclass *and_with);
 #define PERL_ARGS_ASSERT_SSC_AND       \
        assert(pRExC_state); assert(ssc); assert(and_with)
 STATIC void    S_ssc_anything(pTHX_ regnode_ssc *ssc);
 #define PERL_ARGS_ASSERT_SSC_ANYTHING  \
        assert(ssc)
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_ssc_clear_locale(regnode_ssc *ssc);
 #define PERL_ARGS_ASSERT_SSC_CLEAR_LOCALE      \
        assert(ssc)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_ssc_cp_and(pTHX_ regnode_ssc *ssc, UV const cp);
 #define PERL_ARGS_ASSERT_SSC_CP_AND    \
        assert(ssc)
+#endif
 STATIC void    S_ssc_finalize(pTHX_ RExC_state_t *pRExC_state, regnode_ssc *ssc);
 #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);
 #define PERL_ARGS_ASSERT_SSC_INIT      \
        assert(pRExC_state); assert(ssc)
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_ssc_intersection(pTHX_ regnode_ssc *ssc, SV* const invlist, const bool invert_2nd);
 #define PERL_ARGS_ASSERT_SSC_INTERSECTION      \
        assert(ssc); assert(invlist)
+#endif
 STATIC int     S_ssc_is_anything(const regnode_ssc *ssc)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_SSC_IS_ANYTHING       \
@@ -5104,9 +5311,11 @@ STATIC int       S_ssc_is_cp_posixl_init(const RExC_state_t *pRExC_state, const regnod
 STATIC void    S_ssc_or(pTHX_ const RExC_state_t *pRExC_state, regnode_ssc *ssc, const regnode_charclass *or_with);
 #define PERL_ARGS_ASSERT_SSC_OR        \
        assert(pRExC_state); assert(ssc); assert(or_with)
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_ssc_union(pTHX_ regnode_ssc *ssc, SV* const invlist, const bool invert_2nd);
 #define PERL_ARGS_ASSERT_SSC_UNION     \
        assert(ssc); assert(invlist)
+#endif
 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);
 #define PERL_ARGS_ASSERT_STUDY_CHUNK   \
        assert(pRExC_state); assert(scanp); assert(minlenp); assert(deltap); assert(last)
@@ -5144,15 +5353,19 @@ PERL_CALLCONV SV*       Perl__get_swash_invlist(pTHX_ SV* const swash)
 #define PERL_ARGS_ASSERT__GET_SWASH_INVLIST    \
        assert(swash)
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE bool        S__invlist_contains_cp(SV* const invlist, const UV cp)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT__INVLIST_CONTAINS_CP  \
        assert(invlist)
+#endif
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE UV  S__invlist_len(SV* const invlist)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT__INVLIST_LEN  \
        assert(invlist)
+#endif
 
 PERL_CALLCONV SSize_t  Perl__invlist_search(SV* const invlist, const UV cp)
                        __attribute__warn_unused_result__;
@@ -5164,15 +5377,19 @@ PERL_CALLCONV HV*       Perl__swash_inversion_hash(pTHX_ SV* const swash)
 #define PERL_ARGS_ASSERT__SWASH_INVERSION_HASH \
        assert(swash)
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE bool*       S_get_invlist_offset_addr(SV* invlist)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_GET_INVLIST_OFFSET_ADDR       \
        assert(invlist)
+#endif
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE UV* S_invlist_array(SV* const invlist)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_INVLIST_ARRAY \
        assert(invlist)
+#endif
 
 #endif
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C) || defined(PERL_IN_TOKE_C)
@@ -5181,28 +5398,32 @@ PERL_CALLCONV SV*       Perl__core_swash_init(pTHX_ const char* pkg, const char* name,
        assert(pkg); assert(name); assert(listsv)
 #endif
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C) || defined(PERL_IN_DQUOTE_C)
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE char*       S_form_short_octal_warning(pTHX_ const char * const s, const STRLEN len)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_FORM_SHORT_OCTAL_WARNING      \
        assert(s)
+#endif
 
 PERL_CALLCONV char     Perl_grok_bslash_c(pTHX_ const char source, const bool output_warning)
                        __attribute__warn_unused_result__;
 
-PERL_CALLCONV bool     Perl_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)
+PERL_CALLCONV bool     Perl_grok_bslash_o(pTHX_ char** s, const char* const send, UV* uv, const char** error_msg, const bool output_warning, const bool strict, const bool silence_non_portable, const bool utf8)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_GROK_BSLASH_O \
-       assert(s); assert(uv); assert(error_msg)
+       assert(s); assert(send); assert(uv); assert(error_msg)
 
-PERL_CALLCONV bool     Perl_grok_bslash_x(pTHX_ char** s, UV* uv, const char** error_msg, const bool output_warning, const bool strict, const bool silence_non_portable, const bool utf8)
+PERL_CALLCONV bool     Perl_grok_bslash_x(pTHX_ char** s, const char* const send, UV* uv, const char** error_msg, const bool output_warning, const bool strict, const bool silence_non_portable, const bool utf8)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_GROK_BSLASH_X \
-       assert(s); assert(uv); assert(error_msg)
+       assert(s); assert(send); assert(uv); assert(error_msg)
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE I32 S_regcurly(const char *s)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_REGCURLY      \
        assert(s)
+#endif
 
 #endif
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_UTF8_C)
@@ -5391,7 +5612,7 @@ STATIC void       S_assert_uft8_cache_coherent(pTHX_ const char *const func, STRLEN fr
 STATIC bool    S_curse(pTHX_ SV * const sv, const bool check_refcnt);
 #define PERL_ARGS_ASSERT_CURSE \
        assert(sv)
-STATIC I32     S_expect_number(pTHX_ char **const pattern)
+STATIC STRLEN  S_expect_number(pTHX_ const char **const pattern)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_EXPECT_NUMBER \
        assert(pattern)
@@ -5444,9 +5665,11 @@ STATIC STRLEN    S_sv_pos_u2b_forwards(const U8 *const start, const U8 *const send,
 STATIC STRLEN  S_sv_pos_u2b_midway(const U8 *const start, const U8 *send, STRLEN uoffset, const STRLEN uend);
 #define PERL_ARGS_ASSERT_SV_POS_U2B_MIDWAY     \
        assert(start); assert(send)
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        S_sv_unglob(pTHX_ SV *const sv, U32 flags);
 #define PERL_ARGS_ASSERT_SV_UNGLOB     \
        assert(sv)
+#endif
 STATIC char *  S_uiv_2buf(char *const buf, const IV iv, UV uv, const int is_uv, char **const peob)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_UIV_2BUF      \
@@ -5486,7 +5709,6 @@ STATIC void       S_check_uni(pTHX);
 STATIC void    S_checkcomma(pTHX_ const char *s, const char *name, const char *what);
 #define PERL_ARGS_ASSERT_CHECKCOMMA    \
        assert(s); assert(name); assert(what)
-STATIC int     S_deprecate_commaless_var_list(pTHX);
 STATIC char *  S_filter_gets(pTHX_ SV *sv, STRLEN append)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_FILTER_GETS   \
@@ -5516,19 +5738,19 @@ STATIC SV*      S_get_and_check_backslash_N_name(pTHX_ const char* s, const char* con
 #define PERL_ARGS_ASSERT_GET_AND_CHECK_BACKSLASH_N_NAME        \
        assert(s); assert(e)
 
-STATIC void    S_incline(pTHX_ const char *s);
+STATIC void    S_incline(pTHX_ const char *s, const char *end);
 #define PERL_ARGS_ASSERT_INCLINE       \
-       assert(s)
+       assert(s); assert(end)
 STATIC int     S_intuit_method(pTHX_ char *s, SV *ioname, CV *cv);
 #define PERL_ARGS_ASSERT_INTUIT_METHOD \
        assert(s)
-STATIC int     S_intuit_more(pTHX_ char *s);
+STATIC int     S_intuit_more(pTHX_ char *s, char *e);
 #define PERL_ARGS_ASSERT_INTUIT_MORE   \
-       assert(s)
+       assert(s); assert(e)
 STATIC I32     S_lop(pTHX_ I32 f, U8 x, char *s);
 #define PERL_ARGS_ASSERT_LOP   \
        assert(s)
-PERL_STATIC_NO_RET void        S_missingterm(pTHX_ char *s)
+PERL_STATIC_NO_RET void        S_missingterm(pTHX_ char *s, const STRLEN len)
                        __attribute__noreturn__;
 
 STATIC SV*     S_new_constant(pTHX_ const char *s, STRLEN len, const char *key, STRLEN keylen, SV *sv, SV *pv, const char *type, STRLEN typelen);
@@ -5625,9 +5847,6 @@ STATIC bool       S_isa_lookup(pTHX_ HV *stash, const char * const name, STRLEN len, U
        assert(stash); assert(name)
 #endif
 #if defined(PERL_IN_UTF8_C)
-STATIC char *  S__byte_dump_string(pTHX_ const U8 * s, const STRLEN len);
-#define PERL_ARGS_ASSERT__BYTE_DUMP_STRING     \
-       assert(s)
 STATIC UV      S__to_utf8_case(pTHX_ const UV uv1, const U8 *p, U8* ustrp, STRLEN *lenp, SV **swashp, const char *normal, const char *special);
 #define PERL_ARGS_ASSERT__TO_UTF8_CASE \
        assert(p); assert(ustrp); assert(swashp); assert(normal)
@@ -5639,35 +5858,40 @@ 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 bool        S_does_utf8_overflow(const U8 * const s, const U8 * e)
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE int S_does_utf8_overflow(const U8 * const s, const U8 * e, const bool consider_overlongs)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_DOES_UTF8_OVERFLOW    \
        assert(s); assert(e)
+#endif
 
-PERL_STATIC_INLINE bool        S_isFF_OVERLONG(const U8 * const s, const STRLEN len)
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE int S_isFF_OVERLONG(const U8 * const s, const STRLEN len)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_ISFF_OVERLONG \
        assert(s)
+#endif
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 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__;
 #define PERL_ARGS_ASSERT_IS_UTF8_COMMON        \
        assert(p); assert(swash); assert(swashname)
+#endif
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE bool        S_is_utf8_common_with_len(pTHX_ const U8 *const p, const U8 *const e, SV **swash, const char * const swashname, SV* const invlist)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_IS_UTF8_COMMON_WITH_LEN       \
        assert(p); assert(e); assert(swash); assert(swashname)
+#endif
 
-PERL_STATIC_INLINE bool        S_is_utf8_cp_above_31_bits(const U8 * const s, const U8 * const e)
-                       __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_IS_UTF8_CP_ABOVE_31_BITS      \
-       assert(s); assert(e)
-
-PERL_STATIC_INLINE bool        S_is_utf8_overlong_given_start_byte_ok(const U8 * const s, const STRLEN len)
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE int S_is_utf8_overlong_given_start_byte_ok(const U8 * const s, const STRLEN len)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_IS_UTF8_OVERLONG_GIVEN_START_BYTE_OK  \
        assert(s)
+#endif
 
 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__;
@@ -5870,14 +6094,9 @@ 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))
+#if defined(USE_LOCALE)                    && (   defined(PERL_IN_LOCALE_C)            || defined(PERL_IN_MG_C)                || defined (PERL_EXT_POSIX))
 PERL_CALLCONV bool     Perl__is_cur_LC_category_utf8(pTHX_ int category);
 #endif
-#if defined(USE_LOCALE) && defined(PERL_IN_LOCALE_C)
-STATIC char*   S_stdize_locale(pTHX_ char* locs);
-#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);
 #define PERL_ARGS_ASSERT_MAGIC_SETCOLLXFRM     \
@@ -5943,7 +6162,6 @@ PERL_CALLCONV const char* Perl_quadmath_format_single(const char* format);
        assert(format)
 #endif
 #if defined(WIN32)
-PERL_CALLCONV char*    Perl_my_setlocale(pTHX_ int category, const char* locale);
 PERL_CALLCONV_NO_RET void      win32_croak_not_implemented(const char * fname)
                        __attribute__noreturn__;
 #define PERL_ARGS_ASSERT_WIN32_CROAK_NOT_IMPLEMENTED   \