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 2faf6d5..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);
@@ -4219,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)
@@ -4259,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)
@@ -4676,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)
@@ -5310,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)
@@ -5355,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)
@@ -5611,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       \
@@ -5705,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)
@@ -5960,6 +5977,9 @@ STATIC void       S_add_alternate(pTHX_ AV** alternate_ptr, U8* string, STRLEN len)
 #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)
@@ -5993,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);
@@ -6047,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       \
@@ -6116,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)
@@ -6207,19 +6215,21 @@ 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** nonbitmap_ptr)
+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_4)
+                       __attribute__nonnull__(pTHX_5);
 #define PERL_ARGS_ASSERT_SET_REGCLASS_BIT      \
-       assert(pRExC_state); assert(node); assert(nonbitmap_ptr)
+       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** nonbitmap_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_4)
+                       __attribute__nonnull__(pTHX_5);
 #define PERL_ARGS_ASSERT_SET_REGCLASS_BIT_FOLD \
-       assert(pRExC_state); assert(node); assert(nonbitmap_ptr)
+       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)