This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Teach B::Concise about OPpMAYBE_LVSUB
[perl5.git] / proto.h
diff --git a/proto.h b/proto.h
index bff673e..9d47ba5 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -43,6 +43,18 @@ PERL_CALLCONV HV*    Perl__swash_to_invlist(pTHX_ SV* const swash)
 #define PERL_ARGS_ASSERT__SWASH_TO_INVLIST     \
        assert(swash)
 
+PERL_CALLCONV UV       Perl__to_uni_fold_flags(pTHX_ UV c, U8 *p, STRLEN *lenp, U8 flags)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3);
+#define PERL_ARGS_ASSERT__TO_UNI_FOLD_FLAGS    \
+       assert(p); assert(lenp)
+
+PERL_CALLCONV UV       Perl__to_utf8_fold_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, U8 flags)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT__TO_UTF8_FOLD_FLAGS   \
+       assert(p); assert(ustrp)
+
 PERL_CALLCONV PADOFFSET        Perl_allocmy(pTHX_ const char *const name, const STRLEN len, const U32 flags)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_ALLOCMY       \
@@ -443,12 +455,6 @@ PERL_CALLCONV OP * Perl_ck_open(pTHX_ OP *o)
 #define PERL_ARGS_ASSERT_CK_OPEN       \
        assert(o)
 
-PERL_CALLCONV OP *     Perl_ck_push(pTHX_ OP *o)
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_CK_PUSH       \
-       assert(o)
-
 PERL_CALLCONV OP *     Perl_ck_readline(pTHX_ OP *o)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -994,10 +1000,14 @@ PERL_CALLCONV I32        Perl_foldEQ_locale(const char* a, const char* b, I32 len)
 #define PERL_ARGS_ASSERT_FOLDEQ_LOCALE \
        assert(a); assert(b)
 
-PERL_CALLCONV I32      Perl_foldEQ_utf8(pTHX_ const char *s1, char **pe1, UV l1, bool u1, const char *s2, char **pe2, UV l2, bool u2)
+/* PERL_CALLCONV I32   foldEQ_utf8(pTHX_ const char *s1, char **pe1, UV l1, bool u1, const char *s2, char **pe2, UV l2, bool u2)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_5); */
+
+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)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_5);
-#define PERL_ARGS_ASSERT_FOLDEQ_UTF8   \
+#define PERL_ARGS_ASSERT_FOLDEQ_UTF8_FLAGS     \
        assert(s1); assert(s2)
 
 PERL_CALLCONV char*    Perl_form(pTHX_ const char* pat, ...)
@@ -1082,18 +1092,6 @@ PERL_CALLCONV UV Perl_grok_bin(pTHX_ const char* start, STRLEN* len_p, I32* flag
 #define PERL_ARGS_ASSERT_GROK_BIN      \
        assert(start); assert(len_p); assert(flags)
 
-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_ const char* s, UV* uv, STRLEN* len, const char** error_msg, const bool output_warning)
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3)
-                       __attribute__nonnull__(pTHX_4);
-#define PERL_ARGS_ASSERT_GROK_BSLASH_O \
-       assert(s); assert(uv); assert(len); assert(error_msg)
-
 PERL_CALLCONV UV       Perl_grok_hex(pTHX_ const char* start, STRLEN* len_p, I32* flags, NV *result)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
@@ -1809,6 +1807,18 @@ PERL_CALLCONV bool       Perl_is_utf8_xdigit(pTHX_ const U8 *p)
 #define PERL_ARGS_ASSERT_IS_UTF8_XDIGIT        \
        assert(p)
 
+PERL_CALLCONV bool     Perl_is_utf8_xidcont(pTHX_ const U8 *p)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_IS_UTF8_XIDCONT       \
+       assert(p)
+
+PERL_CALLCONV bool     Perl_is_utf8_xidfirst(pTHX_ const U8 *p)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_IS_UTF8_XIDFIRST      \
+       assert(p)
+
 PERL_CALLCONV OP*      Perl_jmaybe(pTHX_ OP *o)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_JMAYBE        \
@@ -4215,11 +4225,9 @@ PERL_CALLCONV OP *       Perl_tied_method(pTHX_ const char *const methname, SV **sp, S
        assert(methname); assert(sp); assert(sv); assert(mg)
 
 PERL_CALLCONV void     Perl_tmps_grow(pTHX_ I32 n);
-PERL_CALLCONV UV       Perl_to_uni_fold(pTHX_ UV c, U8 *p, STRLEN *lenp)
+/* PERL_CALLCONV UV    Perl_to_uni_fold(pTHX_ UV c, U8 *p, STRLEN *lenp)
                        __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3);
-#define PERL_ARGS_ASSERT_TO_UNI_FOLD   \
-       assert(p); assert(lenp)
+                       __attribute__nonnull__(pTHX_3); */
 
 PERL_CALLCONV UV       Perl_to_uni_lower(pTHX_ UV c, U8 *p, STRLEN *lenp)
                        __attribute__nonnull__(pTHX_2)
@@ -4255,16 +4263,13 @@ PERL_CALLCONV UV        Perl_to_utf8_case(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, S
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_4)
-                       __attribute__nonnull__(pTHX_5)
-                       __attribute__nonnull__(pTHX_6);
+                       __attribute__nonnull__(pTHX_5);
 #define PERL_ARGS_ASSERT_TO_UTF8_CASE  \
-       assert(p); assert(ustrp); assert(swashp); assert(normal); assert(special)
+       assert(p); assert(ustrp); assert(swashp); assert(normal)
 
-PERL_CALLCONV UV       Perl_to_utf8_fold(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp)
+/* PERL_CALLCONV UV    Perl_to_utf8_fold(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp)
                        __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
-#define PERL_ARGS_ASSERT_TO_UTF8_FOLD  \
-       assert(p); assert(ustrp)
+                       __attribute__nonnull__(pTHX_2); */
 
 PERL_CALLCONV UV       Perl_to_utf8_lower(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp)
                        __attribute__nonnull__(pTHX_1)
@@ -4672,6 +4677,17 @@ STATIC PerlIO *  S_doopen_pm(pTHX_ SV *name)
 
 #  endif
 #endif
+#if !defined(PERL_IS_MINIPERL)
+#  if defined(PERL_IN_PERL_C)
+STATIC SV *    S_incpush_if_exists(pTHX_ AV *const av, SV *dir, SV *const stem)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3);
+#define PERL_ARGS_ASSERT_INCPUSH_IF_EXISTS     \
+       assert(av); assert(dir); assert(stem)
+
+#  endif
+#endif
 #if !defined(PERL_NO_UTF16_FILTER)
 #  if defined(PERL_IN_TOKE_C)
 STATIC U8*     S_add_utf16_textfilter(pTHX_ U8 *const s, bool reversed)
@@ -5194,6 +5210,18 @@ STATIC I32       S_do_trans_simple_utf8(pTHX_ SV * const sv)
 
 #endif
 #if defined(PERL_IN_DQUOTE_STATIC_C)
+STATIC char    S_grok_bslash_c(pTHX_ const char source, const bool utf8, const bool output_warning)
+                       __attribute__warn_unused_result__;
+
+STATIC bool    S_grok_bslash_o(pTHX_ const char* s, UV* uv, STRLEN* len, const char** error_msg, const bool output_warning)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3)
+                       __attribute__nonnull__(pTHX_4);
+#define PERL_ARGS_ASSERT_GROK_BSLASH_O \
+       assert(s); assert(uv); assert(len); assert(error_msg)
+
 PERL_STATIC_INLINE I32 S_regcurly(pTHX_ const char *s)
                        __attribute__warn_unused_result__
                        __attribute__pure__
@@ -5294,6 +5322,11 @@ STATIC struct xpvhv_aux* S_hv_auxinit(HV *hv)
        assert(hv)
 
 STATIC SV*     S_hv_delete_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen, int k_flags, I32 d_flags, U32 hash);
+STATIC SV*     S_hv_free_ent_ret(pTHX_ HV *hv, HE *entryK)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_HV_FREE_ENT_RET       \
+       assert(hv)
+
 STATIC void    S_hv_magic_check(HV *hv, bool *needs_copy, bool *needs_store)
                        __attribute__nonnull__(1)
                        __attribute__nonnull__(2)
@@ -5339,6 +5372,14 @@ PERL_CALLCONV void       Perl_sv_kill_backrefs(pTHX_ SV *const sv, AV *const av)
        assert(sv)
 
 #endif
+#if defined(PERL_IN_HV_C) || defined(PERL_IN_SV_C)
+PERL_CALLCONV SV*      Perl_hfree_next_entry(pTHX_ HV *hv, STRLEN *indexp)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_HFREE_NEXT_ENTRY      \
+       assert(hv); assert(indexp)
+
+#endif
 #if defined(PERL_IN_LOCALE_C)
 #  if defined(USE_LOCALE_NUMERIC) || defined(USE_LOCALE_COLLATE)
 STATIC char*   S_stdize_locale(pTHX_ char* locs)
@@ -5595,13 +5636,6 @@ STATIC void      S_incpush(pTHX_ const char *const dir, STRLEN len, U32 flags)
 #define PERL_ARGS_ASSERT_INCPUSH       \
        assert(dir)
 
-STATIC SV *    S_incpush_if_exists(pTHX_ AV *const av, SV *dir, SV *const stem)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3);
-#define PERL_ARGS_ASSERT_INCPUSH_IF_EXISTS     \
-       assert(av); assert(dir); assert(stem)
-
 STATIC void    S_incpush_use_sep(pTHX_ const char *p, STRLEN len, U32 flags)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_INCPUSH_USE_SEP       \
@@ -5689,8 +5723,7 @@ STATIC OP*        S_dofindlabel(pTHX_ OP *o, const char *label, OP **opstack, OP **opli
 #define PERL_ARGS_ASSERT_DOFINDLABEL   \
        assert(o); assert(label); assert(opstack); assert(oplimit)
 
-STATIC OP*     S_doparseform(pTHX_ SV *sv)
-                       __attribute__warn_unused_result__
+STATIC MAGIC * S_doparseform(pTHX_ SV *sv)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_DOPARSEFORM   \
        assert(sv)
@@ -5938,6 +5971,15 @@ STATIC SV *      S_space_join_names_mortal(pTHX_ char *const *array)
 
 #endif
 #if defined(PERL_IN_REGCOMP_C)
+STATIC void    S_add_alternate(pTHX_ AV** alternate_ptr, U8* string, STRLEN len)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_ADD_ALTERNATE \
+       assert(alternate_ptr); assert(string)
+
+PERL_STATIC_INLINE HV* S_add_cp_to_invlist(pTHX_ HV* invlist, const UV cp)
+                       __attribute__warn_unused_result__;
+
 STATIC U32     S_add_data(struct RExC_state_t *pRExC_state, U32 n, const char *s)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(1)
@@ -5945,11 +5987,8 @@ STATIC U32       S_add_data(struct RExC_state_t *pRExC_state, U32 n, const char *s)
 #define PERL_ARGS_ASSERT_ADD_DATA      \
        assert(pRExC_state); assert(s)
 
-STATIC HV*     S_add_range_to_invlist(pTHX_ HV* const invlist, const UV start, const UV end)
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_ADD_RANGE_TO_INVLIST  \
-       assert(invlist)
+STATIC HV*     S_add_range_to_invlist(pTHX_ HV* invlist, const UV start, const UV end)
+                       __attribute__warn_unused_result__;
 
 STATIC void    S_checkposixcc(pTHX_ struct RExC_state_t *pRExC_state)
                        __attribute__nonnull__(pTHX_1);
@@ -5974,12 +6013,6 @@ STATIC void      S_cl_init(const struct RExC_state_t *pRExC_state, struct regnode_cha
 #define PERL_ARGS_ASSERT_CL_INIT       \
        assert(pRExC_state); assert(cl)
 
-STATIC void    S_cl_init_zero(const struct RExC_state_t *pRExC_state, struct regnode_charclass_class *cl)
-                       __attribute__nonnull__(1)
-                       __attribute__nonnull__(2);
-#define PERL_ARGS_ASSERT_CL_INIT_ZERO  \
-       assert(pRExC_state); assert(cl)
-
 STATIC int     S_cl_is_anything(const struct regnode_charclass_class *cl)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(1);
@@ -6028,12 +6061,6 @@ PERL_STATIC_INLINE UV    S_invlist_max(pTHX_ HV* const invlist)
 #define PERL_ARGS_ASSERT_INVLIST_MAX   \
        assert(invlist)
 
-PERL_STATIC_INLINE void        S_invlist_set_array(pTHX_ HV* const invlist, const UV* const array)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
-#define PERL_ARGS_ASSERT_INVLIST_SET_ARRAY     \
-       assert(invlist); assert(array)
-
 PERL_STATIC_INLINE void        S_invlist_set_len(pTHX_ HV* const invlist, const UV len)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_INVLIST_SET_LEN       \
@@ -6097,7 +6124,7 @@ STATIC regnode*   S_reg(pTHX_ struct RExC_state_t *pRExC_state, I32 paren, I32 *fl
 #define PERL_ARGS_ASSERT_REG   \
        assert(pRExC_state); assert(flagp)
 
-STATIC regnode*        S_reg_namedseq(pTHX_ struct RExC_state_t *pRExC_state, UV *valuep, I32 *flagp)
+STATIC regnode*        S_reg_namedseq(pTHX_ struct RExC_state_t *pRExC_state, UV *valuep, I32 *flagp, U32 depth)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_REG_NAMEDSEQ  \
        assert(pRExC_state)
@@ -6188,6 +6215,22 @@ STATIC void      S_scan_commit(pTHX_ const struct RExC_state_t *pRExC_state, struct s
 #define PERL_ARGS_ASSERT_SCAN_COMMIT   \
        assert(pRExC_state); assert(data); assert(minlenp)
 
+PERL_STATIC_INLINE U8  S_set_regclass_bit(pTHX_ struct RExC_state_t* pRExC_state, regnode* node, const U8 value, HV** invlist_ptr, AV** alternate_ptr)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_4)
+                       __attribute__nonnull__(pTHX_5);
+#define PERL_ARGS_ASSERT_SET_REGCLASS_BIT      \
+       assert(pRExC_state); assert(node); assert(invlist_ptr); assert(alternate_ptr)
+
+STATIC U8      S_set_regclass_bit_fold(pTHX_ struct RExC_state_t *pRExC_state, regnode* node, const U8 value, HV** invlist_ptr, AV** alternate_ptr)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_4)
+                       __attribute__nonnull__(pTHX_5);
+#define PERL_ARGS_ASSERT_SET_REGCLASS_BIT_FOLD \
+       assert(pRExC_state); assert(node); assert(invlist_ptr); assert(alternate_ptr)
+
 STATIC I32     S_study_chunk(pTHX_ struct RExC_state_t *pRExC_state, regnode **scanp, I32 *minlenp, I32 *deltap, regnode *last, struct scan_data_t *data, I32 stopparen, U8* recursed, struct regnode_charclass_class *and_withp, U32 flags, U32 depth)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)