This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Extract code into separate function
[perl5.git] / proto.h
diff --git a/proto.h b/proto.h
index 26b52a3..6f41f4f 100644 (file)
--- a/proto.h
+++ b/proto.h
  */
 
 START_EXTERN_C
+PERL_CALLCONV UV       ASCII_TO_NEED(const UV enc, const UV ch)
+                       __attribute__deprecated__
+                       __attribute__warn_unused_result__
+                       __attribute__pure__;
+
 PERL_CALLCONV int      Perl_Gv_AMupdate(pTHX_ HV* stash, bool destructing)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_GV_AMUPDATE   \
        assert(stash)
 
+PERL_CALLCONV UV       NATIVE_TO_NEED(const UV enc, const UV ch)
+                       __attribute__deprecated__
+                       __attribute__warn_unused_result__
+                       __attribute__pure__;
+
 PERL_CALLCONV const char *     Perl_PerlIO_context_layers(pTHX_ const char *mode);
 PERL_CALLCONV void*    Perl_Slab_Alloc(pTHX_ size_t sz)
                        __attribute__malloc__
@@ -112,6 +122,11 @@ PERL_CALLCONV SV * Perl_amagic_deref_call(pTHX_ SV *ref, int method)
        assert(ref)
 
 PERL_CALLCONV bool     Perl_amagic_is_enabled(pTHX_ int method);
+PERL_STATIC_INLINE void        S_append_utf8_from_native_byte(const U8 byte, U8** dest)
+                       __attribute__nonnull__(2);
+#define PERL_ARGS_ASSERT_APPEND_UTF8_FROM_NATIVE_BYTE  \
+       assert(dest)
+
 PERL_CALLCONV I32      Perl_apply(pTHX_ I32 type, SV** mark, SV** sp)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
@@ -648,6 +663,11 @@ PERL_CALLCONV void Perl_ck_warner_d(pTHX_ U32 err, const char* pat, ...)
 
 PERL_CALLCONV bool     Perl_ckwarn(pTHX_ U32 w);
 PERL_CALLCONV bool     Perl_ckwarn_d(pTHX_ U32 w);
+PERL_CALLCONV const COP*       Perl_closest_cop(pTHX_ const COP *cop, const OP *o, const OP *curop, bool opnext)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_CLOSEST_COP   \
+       assert(cop)
+
 PERL_CALLCONV OP*      Perl_convert(pTHX_ I32 optype, I32 flags, OP* o)
                        __attribute__warn_unused_result__;
 
@@ -1004,6 +1024,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);
@@ -1741,6 +1771,14 @@ 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_ const char *pv, STRLEN len, const char *what, const char *op_name)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_3)
+                       __attribute__nonnull__(pTHX_4);
+#define PERL_ARGS_ASSERT_IS_SAFE_SYSCALL       \
+       assert(pv); assert(what); assert(op_name)
+
 PERL_CALLCONV bool     Perl_is_uni_alnum(pTHX_ UV c)
                        __attribute__deprecated__
                        __attribute__warn_unused_result__
@@ -2860,6 +2898,13 @@ PERL_CALLCONV SV*        Perl_newSV_type(pTHX_ const svtype type)
                        __attribute__malloc__
                        __attribute__warn_unused_result__;
 
+PERL_CALLCONV SV*      Perl_newSVavdefelem(pTHX_ AV *av, SSize_t ix, bool extendible)
+                       __attribute__malloc__
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_NEWSVAVDEFELEM        \
+       assert(av)
+
 PERL_CALLCONV SV*      Perl_newSVhek(pTHX_ const HEK *const hek)
                        __attribute__malloc__
                        __attribute__warn_unused_result__;
@@ -3187,7 +3232,7 @@ PERL_CALLCONV REGEXP*     Perl_pregcomp(pTHX_ SV * const pattern, const U32 flags)
 #define PERL_ARGS_ASSERT_PREGCOMP      \
        assert(pattern)
 
-PERL_CALLCONV I32      Perl_pregexec(pTHX_ REGEXP * const prog, char* stringarg, char* strend, char* strbeg, I32 minend, SV* screamer, U32 nosave)
+PERL_CALLCONV I32      Perl_pregexec(pTHX_ REGEXP * const prog, char* stringarg, char* strend, char* strbeg, SSize_t minend, SV* screamer, U32 nosave)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3)
@@ -3409,7 +3454,7 @@ PERL_CALLCONV void        Perl_regdump(pTHX_ const regexp* r)
 #define PERL_ARGS_ASSERT_REGDUMP       \
        assert(r)
 
-PERL_CALLCONV I32      Perl_regexec_flags(pTHX_ REGEXP *const rx, char *stringarg, char *strend, char *strbeg, I32 minend, SV *sv, void *data, U32 flags)
+PERL_CALLCONV I32      Perl_regexec_flags(pTHX_ REGEXP *const rx, char *stringarg, char *strend, char *strbeg, SSize_t minend, SV *sv, void *data, U32 flags)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3)
@@ -4159,12 +4204,6 @@ PERL_CALLCONV NV Perl_sv_nv(pTHX_ SV* sv)
 #define PERL_ARGS_ASSERT_SV_NV \
        assert(sv)
 
-PERL_STATIC_INLINE STRLEN      S_sv_or_pv_pos_u2b(pTHX_ SV *sv, const char *pv, STRLEN pos, STRLEN *lenp)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
-#define PERL_ARGS_ASSERT_SV_OR_PV_POS_U2B      \
-       assert(sv); assert(pv)
-
 PERL_CALLCONV char*    Perl_sv_peek(pTHX_ SV* sv);
 PERL_CALLCONV void     Perl_sv_pos_b2u(pTHX_ SV *const sv, I32 *const offsetp)
                        __attribute__nonnull__(pTHX_2);
@@ -4731,11 +4770,9 @@ PERL_CALLCONV UV Perl_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen)
 #define PERL_ARGS_ASSERT_UTF8_TO_UVCHR \
        assert(s)
 
-PERL_CALLCONV UV       Perl_utf8_to_uvchr_buf(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen)
+/* PERL_CALLCONV UV    utf8_to_uvchr_buf(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen)
                        __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
-#define PERL_ARGS_ASSERT_UTF8_TO_UVCHR_BUF     \
-       assert(s); assert(send)
+                       __attribute__nonnull__(pTHX_2); */
 
 PERL_CALLCONV UV       Perl_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen)
                        __attribute__deprecated__
@@ -4744,23 +4781,35 @@ PERL_CALLCONV UV        Perl_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen)
        assert(s)
 
 PERL_CALLCONV UV       Perl_utf8_to_uvuni_buf(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen)
+                       __attribute__deprecated__
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT_UTF8_TO_UVUNI_BUF     \
        assert(s); assert(send)
 
+PERL_CALLCONV UV       Perl_utf8n_to_uvchr(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_UTF8N_TO_UVCHR        \
+       assert(s)
+
 PERL_CALLCONV UV       Perl_utf8n_to_uvuni(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_UTF8N_TO_UVUNI        \
        assert(s)
 
-PERL_CALLCONV U8*      Perl_uvchr_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags)
+/* PERL_CALLCONV U8*   uvchr_to_utf8(pTHX_ U8 *d, UV uv)
+                       __attribute__nonnull__(pTHX_1); */
+
+/* PERL_CALLCONV U8*   uvchr_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags)
+                       __attribute__nonnull__(pTHX_1); */
+
+PERL_CALLCONV U8*      Perl_uvoffuni_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags)
                        __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_UVCHR_TO_UTF8_FLAGS   \
+#define PERL_ARGS_ASSERT_UVOFFUNI_TO_UTF8_FLAGS        \
        assert(d)
 
-/* PERL_CALLCONV U8*   Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv)
-                       __attribute__nonnull__(pTHX_1); */
+PERL_CALLCONV U8*      Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv)
+                       __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_UVUNI_TO_UTF8 \
        assert(d)
 
@@ -4769,7 +4818,13 @@ PERL_CALLCONV U8*        Perl_uvuni_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags)
 #define PERL_ARGS_ASSERT_UVUNI_TO_UTF8_FLAGS   \
        assert(d)
 
+PERL_CALLCONV UV       Perl_valid_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_VALID_UTF8_TO_UVCHR   \
+       assert(s)
+
 PERL_CALLCONV UV       Perl_valid_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen)
+                       __attribute__deprecated__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_VALID_UTF8_TO_UVUNI   \
        assert(s)
@@ -4955,23 +5010,6 @@ STATIC int       S_sv_2iuv_non_preserve(pTHX_ SV *const sv)
 #    endif
 #  endif
 #endif
-#if !(defined(EBCDIC))
-/* PERL_CALLCONV UV    Perl_utf8n_to_uvchr(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags)
-                       __attribute__nonnull__(pTHX_1); */
-#define PERL_ARGS_ASSERT_UTF8N_TO_UVCHR        \
-       assert(s)
-
-/* PERL_CALLCONV U8*   Perl_uvchr_to_utf8(pTHX_ U8 *d, UV uv)
-                       __attribute__nonnull__(pTHX_1); */
-#define PERL_ARGS_ASSERT_UVCHR_TO_UTF8 \
-       assert(d)
-
-/* PERL_CALLCONV UV    Perl_valid_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen)
-                       __attribute__nonnull__(pTHX_1); */
-#define PERL_ARGS_ASSERT_VALID_UTF8_TO_UVCHR   \
-       assert(s)
-
-#endif
 #if !(defined(HAS_SIGACTION) && defined(SA_SIGINFO))
 PERL_CALLCONV Signal_t Perl_csighandler(int sig);
 PERL_CALLCONV Signal_t Perl_sighandler(int sig);
@@ -5291,30 +5329,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(EBCDIC)
-PERL_CALLCONV UV       Perl_utf8n_to_uvchr(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_UTF8N_TO_UVCHR        \
-       assert(s)
-
-PERL_CALLCONV U8*      Perl_uvchr_to_utf8(pTHX_ U8 *d, UV uv)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_UVCHR_TO_UTF8 \
-       assert(d)
-
-PERL_CALLCONV UV       Perl_valid_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_VALID_UTF8_TO_UVCHR   \
-       assert(s)
-
-#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)
@@ -5435,6 +5449,14 @@ PERL_CALLCONV void       Perl_Slab_to_rw(pTHX_ OPSLAB *const slab)
 
 #  endif
 #endif
+#if defined(PERL_CORE) || defined (PERL_EXT)
+PERL_STATIC_INLINE STRLEN      S_sv_or_pv_pos_u2b(pTHX_ SV *sv, const char *pv, STRLEN pos, STRLEN *lenp)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_SV_OR_PV_POS_U2B      \
+       assert(sv); assert(pv)
+
+#endif
 #if defined(PERL_CR_FILTER)
 #  if defined(PERL_IN_TOKE_C)
 STATIC I32     S_cr_textfilter(pTHX_ int idx, SV *sv, int maxlen);
@@ -5699,16 +5721,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)
@@ -6458,6 +6513,7 @@ STATIC SV *       S_space_join_names_mortal(pTHX_ char *const *array)
 
 #endif
 #if defined(PERL_IN_REGCOMP_C)
+PERL_CALLCONV int is_inf       (pTHX);
 STATIC void    S__append_range_to_invlist(pTHX_ SV* const invlist, const UV start, const UV end)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT__APPEND_RANGE_TO_INVLIST      \
@@ -6492,31 +6548,31 @@ PERL_STATIC_INLINE void S_alloc_maybe_populate_EXACT(pTHX_ struct RExC_state_t *
 #define PERL_ARGS_ASSERT_ALLOC_MAYBE_POPULATE_EXACT    \
        assert(pRExC_state); assert(node); assert(flagp)
 
-STATIC void    S_cl_and(struct regnode_charclass_class *cl, const struct regnode_charclass_class *and_with)
+STATIC void    S_cl_and(regnode_ssc *cl, const regnode_ssc *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)
+STATIC void    S_cl_anything(const struct RExC_state_t *pRExC_state, regnode_ssc *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)
+STATIC void    S_cl_init(const struct RExC_state_t *pRExC_state, regnode_ssc *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)
+STATIC int     S_cl_is_anything(const regnode_ssc *cl)
                        __attribute__warn_unused_result__
                        __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)
+STATIC void    S_cl_or(const struct RExC_state_t *pRExC_state, regnode_ssc *cl, const regnode_ssc *or_with)
                        __attribute__nonnull__(1)
                        __attribute__nonnull__(2)
                        __attribute__nonnull__(3);
@@ -6666,10 +6722,16 @@ STATIC void     S_parse_lparen_question_flags(pTHX_ struct RExC_state_t *pRExC_state
 #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)
 
@@ -6766,14 +6828,21 @@ STATIC char *   S_regwhite(struct RExC_state_t *pRExC_state, char *p)
 #define PERL_ARGS_ASSERT_REGWHITE      \
        assert(pRExC_state); assert(p)
 
-STATIC void    S_scan_commit(pTHX_ const struct RExC_state_t *pRExC_state, struct scan_data_t *data, I32 *minlenp, int is_inf)
+STATIC void    S_scan_commit(pTHX_ const struct 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 SSize_t S_study_chunk(pTHX_ struct RExC_state_t *pRExC_state, regnode **scanp, I32 *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)
+STATIC void    S_set_ANYOF_arg(pTHX_ struct RExC_state_t* const pRExC_state, regnode* const ret, SV* const cp_list, SV* const listsv, const STRLEN initial_listsv_len, SV* const swash, const bool has_user_defined_property)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_4);
+#define PERL_ARGS_ASSERT_SET_ANYOF_ARG \
+       assert(pRExC_state); assert(ret); assert(listsv)
+
+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, regnode_ssc *and_withp, U32 flags, U32 depth)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3)
@@ -6979,14 +7048,14 @@ STATIC CHECKPOINT       S_regcppush(pTHX_ const regexp *rex, I32 parenfloor, U32 maxop
 #define PERL_ARGS_ASSERT_REGCPPUSH     \
        assert(rex)
 
-STATIC U8*     S_reghop3(U8 *s, I32 off, const U8 *lim)
+STATIC U8*     S_reghop3(U8 *s, SSize_t off, const U8 *lim)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(1)
                        __attribute__nonnull__(3);
 #define PERL_ARGS_ASSERT_REGHOP3       \
        assert(s); assert(lim)
 
-STATIC U8*     S_reghopmaybe3(U8 *s, I32 off, const U8 *lim)
+STATIC U8*     S_reghopmaybe3(U8 *s, SSize_t off, const U8 *lim)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(1)
                        __attribute__nonnull__(3);
@@ -7035,7 +7104,7 @@ STATIC void       S_to_utf8_substr(pTHX_ regexp * prog)
        assert(prog)
 
 #  if defined(XXX_dmq)
-STATIC U8*     S_reghop4(U8 *s, I32 off, const U8 *llim, const U8 *rlim)
+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)
@@ -7351,12 +7420,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__
@@ -7512,11 +7580,6 @@ PERL_CALLCONV UV Perl__to_fold_latin1(pTHX_ const U8 c, U8 *p, STRLEN *lenp, con
 #endif
 #if defined(PERL_IN_UTIL_C)
 STATIC bool    S_ckwarn_common(pTHX_ U32 w);
-STATIC const COP*      S_closest_cop(pTHX_ const COP *cop, const OP *o)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_CLOSEST_COP   \
-       assert(cop)
-
 STATIC bool    S_invoke_exception_hook(pTHX_ SV *ex, bool warn);
 STATIC SV*     S_mess_alloc(pTHX);
 STATIC SV *    S_with_queued_errors(pTHX_ SV *ex)
@@ -7842,10 +7905,10 @@ PERL_CALLCONV int       Perl_PerlIO_fileno(pTHX_ PerlIO *f);
 PERL_CALLCONV int      Perl_PerlIO_fill(pTHX_ PerlIO *f);
 PERL_CALLCONV int      Perl_PerlIO_flush(pTHX_ PerlIO *f);
 PERL_CALLCONV STDCHAR *        Perl_PerlIO_get_base(pTHX_ PerlIO *f);
-PERL_CALLCONV int      Perl_PerlIO_get_bufsiz(pTHX_ PerlIO *f)
+PERL_CALLCONV SSize_t  Perl_PerlIO_get_bufsiz(pTHX_ PerlIO *f)
                        __attribute__warn_unused_result__;
 
-PERL_CALLCONV int      Perl_PerlIO_get_cnt(pTHX_ PerlIO *f)
+PERL_CALLCONV SSize_t  Perl_PerlIO_get_cnt(pTHX_ PerlIO *f)
                        __attribute__warn_unused_result__;
 
 PERL_CALLCONV STDCHAR *        Perl_PerlIO_get_ptr(pTHX_ PerlIO *f);
@@ -7855,8 +7918,8 @@ PERL_CALLCONV SSize_t     Perl_PerlIO_read(pTHX_ PerlIO *f, void *vbuf, Size_t count
        assert(vbuf)
 
 PERL_CALLCONV int      Perl_PerlIO_seek(pTHX_ PerlIO *f, Off_t offset, int whence);
-PERL_CALLCONV void     Perl_PerlIO_set_cnt(pTHX_ PerlIO *f, int cnt);
-PERL_CALLCONV void     Perl_PerlIO_set_ptrcnt(pTHX_ PerlIO *f, STDCHAR *ptr, int cnt);
+PERL_CALLCONV void     Perl_PerlIO_set_cnt(pTHX_ PerlIO *f, SSize_t cnt);
+PERL_CALLCONV void     Perl_PerlIO_set_ptrcnt(pTHX_ PerlIO *f, STDCHAR *ptr, SSize_t cnt);
 PERL_CALLCONV void     Perl_PerlIO_setlinebuf(pTHX_ PerlIO *f);
 PERL_CALLCONV PerlIO * Perl_PerlIO_stderr(pTHX)
                        __attribute__warn_unused_result__;