The return value from S_hv_auxinit can be ignored, as it's also stored
[p5sagit/p5-mst-13.2.git] / proto.h
diff --git a/proto.h b/proto.h
index fbf3c86..b2838c2 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -3,7 +3,7 @@
  *    proto.h
  *
  *    Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- *    2000, 2001, 2002, 2003, 2004, 2005, by Larry Wall and others
+ *    2000, 2001, 2002, 2003, 2004, 2005, 2006, by Larry Wall and others
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -123,10 +123,15 @@ PERL_CALLCONV void        Perl_apply_attrs_string(pTHX_ const char *stashpv, CV *cv, co
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
 
-PERL_CALLCONV void     Perl_av_clear(pTHX_ AV* ar);
-PERL_CALLCONV SV*      Perl_av_delete(pTHX_ AV* ar, I32 key, I32 flags);
+PERL_CALLCONV void     Perl_av_clear(pTHX_ AV* ar)
+                       __attribute__nonnull__(pTHX_1);
+
+PERL_CALLCONV SV*      Perl_av_delete(pTHX_ AV* ar, I32 key, I32 flags)
+                       __attribute__nonnull__(pTHX_1);
+
 PERL_CALLCONV bool     Perl_av_exists(pTHX_ AV* ar, I32 key)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
 
 PERL_CALLCONV void     Perl_av_extend(pTHX_ AV* ar, I32 key)
                        __attribute__nonnull__(pTHX_1);
@@ -136,7 +141,8 @@ PERL_CALLCONV AV*   Perl_av_fake(pTHX_ I32 size, SV** svp)
                        __attribute__nonnull__(pTHX_2);
 
 PERL_CALLCONV SV**     Perl_av_fetch(pTHX_ AV* ar, I32 key, I32 lval)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
 
 PERL_CALLCONV void     Perl_av_fill(pTHX_ AV* ar, I32 fill)
                        __attribute__nonnull__(pTHX_1);
@@ -149,19 +155,29 @@ PERL_CALLCONV AV* Perl_av_make(pTHX_ I32 size, SV** svp)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_2);
 
-PERL_CALLCONV SV*      Perl_av_pop(pTHX_ AV* ar);
+PERL_CALLCONV SV*      Perl_av_pop(pTHX_ AV* ar)
+                       __attribute__nonnull__(pTHX_1);
+
 PERL_CALLCONV void     Perl_av_push(pTHX_ AV* ar, SV* val)
+                       __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
 
 PERL_CALLCONV void     Perl_av_reify(pTHX_ AV* ar)
                        __attribute__nonnull__(pTHX_1);
 
 PERL_CALLCONV SV*      Perl_av_shift(pTHX_ AV* ar)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+
+PERL_CALLCONV SV**     Perl_av_store(pTHX_ AV* ar, I32 key, SV* val)
+                       __attribute__nonnull__(pTHX_1);
+
+PERL_CALLCONV void     Perl_av_undef(pTHX_ AV* ar)
+                       __attribute__nonnull__(pTHX_1);
+
+PERL_CALLCONV void     Perl_av_unshift(pTHX_ AV* ar, I32 num)
+                       __attribute__nonnull__(pTHX_1);
 
-PERL_CALLCONV SV**     Perl_av_store(pTHX_ AV* ar, I32 key, SV* val);
-PERL_CALLCONV void     Perl_av_undef(pTHX_ AV* ar);
-PERL_CALLCONV void     Perl_av_unshift(pTHX_ AV* ar, I32 num);
 PERL_CALLCONV SV**     Perl_av_arylen_p(pTHX_ AV* av)
                        __attribute__nonnull__(pTHX_1);
 
@@ -1569,8 +1585,6 @@ PERL_CALLCONV SV* Perl_vnewSVpvf(pTHX_ const char* pat, va_list* args)
                        __attribute__nonnull__(pTHX_1);
 
 PERL_CALLCONV SV*      Perl_newSVrv(pTHX_ SV* rv, const char* classname)
-                       __attribute__malloc__
-                       __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 
 PERL_CALLCONV SV*      Perl_newSVsv(pTHX_ SV* old)
@@ -1956,9 +1970,6 @@ PERL_CALLCONV void        Perl_save_sptr(pTHX_ SV** sptr)
 PERL_CALLCONV SV*      Perl_save_svref(pTHX_ SV** sptr)
                        __attribute__nonnull__(pTHX_1);
 
-PERL_CALLCONV SV**     Perl_save_threadsv(pTHX_ PADOFFSET i)
-                       __attribute__noreturn__;
-
 PERL_CALLCONV OP*      Perl_sawparens(pTHX_ OP* o);
 PERL_CALLCONV OP*      Perl_scalar(pTHX_ OP* o);
 PERL_CALLCONV OP*      Perl_scalarkids(pTHX_ OP* o);
@@ -2176,7 +2187,7 @@ PERL_CALLCONV STRLEN      Perl_sv_len_utf8(pTHX_ SV* sv);
 PERL_CALLCONV void     Perl_sv_magic(pTHX_ SV* sv, SV* obj, int how, const char* name, I32 namlen)
                        __attribute__nonnull__(pTHX_1);
 
-PERL_CALLCONV MAGIC *  Perl_sv_magicext(pTHX_ SV* sv, SV* obj, int how, const MGVTBL *vtbl, const char* name, I32 namlen)
+PERL_CALLCONV MAGIC *  Perl_sv_magicext(pTHX_ SV* sv, SV* obj, int how, MGVTBL *vtbl, const char* name, I32 namlen)
                        __attribute__nonnull__(pTHX_1);
 
 PERL_CALLCONV SV*      Perl_sv_mortalcopy(pTHX_ SV* oldsv)
@@ -2695,12 +2706,10 @@ PERL_CALLCONV OP *      Perl_my_attrs(pTHX_ OP *o, OP *attrs)
 PERL_CALLCONV void     Perl_boot_core_xsutils(pTHX);
 #if defined(USE_ITHREADS)
 PERL_CALLCONV PERL_CONTEXT*    Perl_cx_dup(pTHX_ PERL_CONTEXT* cx, I32 ix, I32 max, CLONE_PARAMS* param)
-                       __attribute__malloc__
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_4);
 
 PERL_CALLCONV PERL_SI* Perl_si_dup(pTHX_ PERL_SI* si, CLONE_PARAMS* param)
-                       __attribute__malloc__
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_2);
 
@@ -2711,50 +2720,40 @@ PERL_CALLCONV ANY*      Perl_ss_dup(pTHX_ PerlInterpreter* proto_perl, CLONE_PARAMS*
                        __attribute__nonnull__(pTHX_2);
 
 PERL_CALLCONV void*    Perl_any_dup(pTHX_ void* v, const PerlInterpreter* proto_perl)
-                       __attribute__malloc__
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_2);
 
 PERL_CALLCONV HE*      Perl_he_dup(pTHX_ const HE* e, bool shared, CLONE_PARAMS* param)
-                       __attribute__malloc__
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_3);
 
 PERL_CALLCONV HEK*     Perl_hek_dup(pTHX_ HEK* e, CLONE_PARAMS* param)
-                       __attribute__malloc__
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_2);
 
 PERL_CALLCONV REGEXP*  Perl_re_dup(pTHX_ const REGEXP* r, CLONE_PARAMS* param)
-                       __attribute__malloc__
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_2);
 
 PERL_CALLCONV PerlIO*  Perl_fp_dup(pTHX_ PerlIO* fp, char type, CLONE_PARAMS* param)
-                       __attribute__malloc__
-                       __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_3);
 
 PERL_CALLCONV DIR*     Perl_dirp_dup(pTHX_ DIR* dp)
-                       __attribute__malloc__
                        __attribute__warn_unused_result__;
 
 PERL_CALLCONV GP*      Perl_gp_dup(pTHX_ GP* gp, CLONE_PARAMS* param)
-                       __attribute__malloc__
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_2);
 
 PERL_CALLCONV MAGIC*   Perl_mg_dup(pTHX_ MAGIC* mg, CLONE_PARAMS* param)
-                       __attribute__malloc__
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_2);
 
-PERL_CALLCONV SV*      Perl_sv_dup(pTHX_ SV* sstr, CLONE_PARAMS* param)
-                       __attribute__malloc__
+PERL_CALLCONV SV*      Perl_sv_dup(pTHX_ const SV* sstr, CLONE_PARAMS* param)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_2);
 
-PERL_CALLCONV void     Perl_rvpv_dup(pTHX_ SV* dstr, SV *sstr, CLONE_PARAMS* param)
+PERL_CALLCONV void     Perl_rvpv_dup(pTHX_ SV* dstr, const SV *sstr, CLONE_PARAMS* param)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
@@ -2764,7 +2763,6 @@ PERL_CALLCONV PTR_TBL_t*  Perl_ptr_table_new(pTHX)
                        __attribute__warn_unused_result__;
 
 PERL_CALLCONV void*    Perl_ptr_table_fetch(pTHX_ PTR_TBL_t *tbl, const void *sv)
-                       __attribute__malloc__
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
@@ -2807,7 +2805,11 @@ PERL_CALLCONV int        Perl_sv_release_IVX(pTHX_ SV *sv)
 
 PERL_CALLCONV void     Perl_sv_nosharing(pTHX_ SV *sv);
 /* PERL_CALLCONV void  Perl_sv_nolocking(pTHX_ SV *sv); */
+#ifdef NO_MATHOMS
 /* PERL_CALLCONV void  Perl_sv_nounlocking(pTHX_ SV *sv); */
+#else
+PERL_CALLCONV void     Perl_sv_nounlocking(pTHX_ SV *sv);
+#endif
 PERL_CALLCONV int      Perl_nothreadhook(pTHX);
 
 END_EXTERN_C
@@ -2848,6 +2850,11 @@ STATIC void      S_require_errno(pTHX_ GV *gv)
 
 #endif
 
+PERL_CALLCONV void*    Perl_get_arena(pTHX_ int svtype)
+                       __attribute__malloc__
+                       __attribute__warn_unused_result__;
+
+
 #if defined(PERL_IN_HV_C) || defined(PERL_DECL_PROT)
 STATIC void    S_hsplit(pTHX_ HV *hv)
                        __attribute__nonnull__(pTHX_1);
@@ -2859,15 +2866,15 @@ STATIC HE*      S_new_he(pTHX)
                        __attribute__malloc__
                        __attribute__warn_unused_result__;
 
-STATIC HEK*    S_save_hek_flags(pTHX_ const char *str, I32 len, U32 hash, int flags)
+STATIC HEK*    S_save_hek_flags(const char *str, I32 len, U32 hash, int flags)
                        __attribute__malloc__
                        __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
+                       __attribute__nonnull__(1);
 
-STATIC void    S_hv_magic_check(pTHX_ HV *hv, bool *needs_copy, bool *needs_store)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3);
+STATIC void    S_hv_magic_check(HV *hv, bool *needs_copy, bool *needs_store)
+                       __attribute__nonnull__(1)
+                       __attribute__nonnull__(2)
+                       __attribute__nonnull__(3);
 
 STATIC void    S_unshare_hek_or_pvn(pTHX_ const HEK* hek, const char* str, I32 len, U32 hash);
 STATIC HEK*    S_share_hek_flags(pTHX_ const char* sv, I32 len, U32 hash, int flags)
@@ -2879,8 +2886,8 @@ STATIC void       S_hv_notallowed(pTHX_ int flags, const char *key, I32 klen, const ch
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_4);
 
-STATIC struct xpvhv_aux*       S_hv_auxinit(pTHX_ HV *hv)
-                       __attribute__nonnull__(pTHX_1);
+STATIC struct xpvhv_aux*       S_hv_auxinit(HV *hv)
+                       __attribute__nonnull__(1);
 
 STATIC SV*     S_hv_delete_common(pTHX_ HV* tb, SV* keysv, const char* key, STRLEN klen, int k_flags, I32 d_flags, U32 hash);
 STATIC HE*     S_hv_fetch_common(pTHX_ HV* tb, SV* keysv, const char* key, STRLEN klen, int flags, int action, SV* val, U32 hash);
@@ -3078,9 +3085,9 @@ PERL_CALLCONV OP* Perl_ck_unpack(pTHX_ OP *o)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 
-STATIC bool    S_is_handle_constructor(pTHX_ const OP *o, I32 numargs)
+STATIC bool    S_is_handle_constructor(const OP *o, I32 numargs)
                        __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
+                       __attribute__nonnull__(1);
 
 STATIC I32     S_is_list_assignment(pTHX_ const OP *o)
                        __attribute__warn_unused_result__;
@@ -3106,8 +3113,9 @@ STATIC void       S_simplify_sort(pTHX_ OP *o)
 STATIC const char*     S_gv_ename(pTHX_ GV *gv)
                        __attribute__nonnull__(pTHX_1);
 
-STATIC bool    S_scalar_mod_type(pTHX_ const OP *o, I32 type)
-                       __attribute__nonnull__(pTHX_1);
+STATIC bool    S_scalar_mod_type(const OP *o, I32 type)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(1);
 
 STATIC OP *    S_my_kid(pTHX_ OP *o, OP *attrs, OP **imopsp)
                        __attribute__nonnull__(pTHX_3);
@@ -3166,9 +3174,7 @@ PERL_CALLCONV void        Perl_Slab_Free(pTHX_ void *op)
 
 #if defined(PERL_IN_PERL_C) || defined(PERL_DECL_PROT)
 STATIC void    S_find_beginning(pTHX);
-STATIC void    S_forbid_setid(pTHX_ const char * s)
-                       __attribute__nonnull__(pTHX_1);
-
+STATIC void    S_forbid_setid(pTHX_ const char flag, const int suidscript);
 STATIC void    S_incpush(pTHX_ const char *dir, bool addsubdirs, bool addoldvers, bool usesep, bool canrelocate);
 STATIC void    S_init_interp(pTHX);
 STATIC void    S_init_ids(pTHX);
@@ -3183,14 +3189,15 @@ STATIC void     S_my_exit_jump(pTHX)
                        __attribute__noreturn__;
 
 STATIC void    S_nuke_stacks(pTHX);
-STATIC void    S_open_script(pTHX_ const char *scriptname, bool dosearch, SV *sv)
+STATIC int     S_open_script(pTHX_ const char *scriptname, bool dosearch, SV *sv, int *suidscript)
                        __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_3);
+                       __attribute__nonnull__(pTHX_3)
+                       __attribute__nonnull__(pTHX_4);
 
 STATIC void    S_usage(pTHX_ const char *name)
                        __attribute__nonnull__(pTHX_1);
 
-STATIC void    S_validate_suid(pTHX_ const char *validarg, const char *scriptname)
+STATIC void    S_validate_suid(pTHX_ const char *validarg, const char *scriptname, int fdscript, int suidscript)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
 
@@ -3330,9 +3337,9 @@ STATIC PerlIO *   S_doopen_pm(pTHX_ const char *name, const char *mode)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
 
-STATIC bool    S_path_is_absolute(pTHX_ const char *name)
+STATIC bool    S_path_is_absolute(const char *name)
                        __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
+                       __attribute__nonnull__(1);
 
 STATIC I32     S_run_user_filter(pTHX_ int idx, SV *buf_sv, int maxlen)
                        __attribute__warn_unused_result__
@@ -3451,9 +3458,9 @@ STATIC void       S_reguni(pTHX_ const struct RExC_state_t *state, UV uv, char *s, STR
 STATIC regnode*        S_regclass(pTHX_ struct RExC_state_t *state)
                        __attribute__nonnull__(pTHX_1);
 
-STATIC I32     S_regcurly(pTHX_ const char *)
+STATIC I32     S_regcurly(const char *)
                        __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
+                       __attribute__nonnull__(1);
 
 STATIC regnode*        S_reg_node(pTHX_ struct RExC_state_t *state, U8 op)
                        __attribute__nonnull__(pTHX_1);
@@ -3476,9 +3483,10 @@ STATIC void      S_regtail(pTHX_ struct RExC_state_t *state, regnode *p, regnode *val
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
 
-STATIC char*   S_regwhite(pTHX_ char *p, const char *e)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
+STATIC char*   S_regwhite(char *p, const char *e)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(1)
+                       __attribute__nonnull__(2);
 
 STATIC char*   S_nextchar(pTHX_ struct RExC_state_t *state)
                        __attribute__nonnull__(pTHX_1);
@@ -3497,29 +3505,30 @@ STATIC void     S_scan_commit(pTHX_ struct RExC_state_t* state, struct scan_data_t *
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
 
-STATIC void    S_cl_anything(pTHX_ struct RExC_state_t* state, struct regnode_charclass_class *cl)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
+STATIC void    S_cl_anything(struct RExC_state_t* state, struct regnode_charclass_class *cl)
+                       __attribute__nonnull__(1)
+                       __attribute__nonnull__(2);
 
-STATIC int     S_cl_is_anything(pTHX_ const struct regnode_charclass_class *cl)
-                       __attribute__nonnull__(pTHX_1);
+STATIC int     S_cl_is_anything(const struct regnode_charclass_class *cl)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(1);
 
-STATIC void    S_cl_init(pTHX_ struct RExC_state_t* state, struct regnode_charclass_class *cl)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
+STATIC void    S_cl_init(struct RExC_state_t* state, struct regnode_charclass_class *cl)
+                       __attribute__nonnull__(1)
+                       __attribute__nonnull__(2);
 
-STATIC void    S_cl_init_zero(pTHX_ struct RExC_state_t* state, struct regnode_charclass_class *cl)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
+STATIC void    S_cl_init_zero(struct RExC_state_t* state, struct regnode_charclass_class *cl)
+                       __attribute__nonnull__(1)
+                       __attribute__nonnull__(2);
 
-STATIC void    S_cl_and(pTHX_ struct regnode_charclass_class *cl, const struct regnode_charclass_class *and_with)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
+STATIC void    S_cl_and(struct regnode_charclass_class *cl, const struct regnode_charclass_class *and_with)
+                       __attribute__nonnull__(1)
+                       __attribute__nonnull__(2);
 
-STATIC void    S_cl_or(pTHX_ struct RExC_state_t* state, struct regnode_charclass_class *cl, const struct regnode_charclass_class *or_with)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3);
+STATIC void    S_cl_or(struct RExC_state_t* state, struct regnode_charclass_class *cl, const struct regnode_charclass_class *or_with)
+                       __attribute__nonnull__(1)
+                       __attribute__nonnull__(2)
+                       __attribute__nonnull__(3);
 
 STATIC I32     S_study_chunk(pTHX_ struct RExC_state_t* state, regnode **scanp, I32 *deltap, regnode *last, struct scan_data_t *data, U32 flags, U32 depth)
                        __attribute__nonnull__(pTHX_1)
@@ -3527,9 +3536,10 @@ STATIC I32       S_study_chunk(pTHX_ struct RExC_state_t* state, regnode **scanp, I32
                        __attribute__nonnull__(pTHX_3)
                        __attribute__nonnull__(pTHX_4);
 
-STATIC I32     S_add_data(pTHX_ struct RExC_state_t* state, I32 n, const char *s)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_3);
+STATIC I32     S_add_data(struct RExC_state_t* state, I32 n, const char *s)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(1)
+                       __attribute__nonnull__(3);
 
 STATIC void    S_re_croak2(pTHX_ const char* pat1, const char* pat2, ...)
                        __attribute__noreturn__
@@ -3578,7 +3588,6 @@ STATIC bool       S_reginclass(pTHX_ const regnode *n, const U8 *p, STRLEN *lenp, bool
 
 STATIC CHECKPOINT      S_regcppush(pTHX_ I32 parenfloor);
 STATIC char*   S_regcppop(pTHX);
-STATIC char*   S_regcp_set_to(pTHX_ I32 ss);
 STATIC void    S_cache_re(pTHX_ regexp *prog)
                        __attribute__nonnull__(pTHX_1);
 
@@ -3586,19 +3595,19 @@ STATIC U8*      S_reghop(pTHX_ U8 *pos, I32 off)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 
-STATIC U8*     S_reghop3(pTHX_ U8 *pos, I32 off, U8 *lim)
+STATIC U8*     S_reghop3(U8 *pos, I32 off, U8 *lim)
                        __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_3);
+                       __attribute__nonnull__(1)
+                       __attribute__nonnull__(3);
 
 STATIC U8*     S_reghopmaybe(pTHX_ U8 *pos, I32 off)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 
-STATIC U8*     S_reghopmaybe3(pTHX_ U8 *pos, I32 off, U8 *lim)
+STATIC U8*     S_reghopmaybe3(U8 *pos, I32 off, U8 *lim)
                        __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_3);
+                       __attribute__nonnull__(1)
+                       __attribute__nonnull__(3);
 
 STATIC char*   S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, const char *strend, I32 norun)
                        __attribute__warn_unused_result__
@@ -3637,6 +3646,13 @@ PERL_CALLCONV void       Perl_sv_add_backref(pTHX_ SV *tsv, SV *sv)
 
 #endif
 
+#if defined(PERL_IN_HV_C) || defined(PERL_IN_MG_C) || defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT)
+PERL_CALLCONV int      Perl_sv_kill_backrefs(pTHX_ SV *sv, AV *av)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+
+#endif
+
 #if defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT)
 STATIC char *  S_uiv_2buf(char *buf, IV iv, UV uv, int is_uv, char **peob)
                        __attribute__warn_unused_result__
@@ -3698,13 +3714,38 @@ STATIC char *   S_F0convert(NV nv, char *endbuf, STRLEN *len)
                        __attribute__nonnull__(2)
                        __attribute__nonnull__(3);
 
-#if defined(PERL_OLD_COPY_ON_WRITE)
+#  if defined(PERL_OLD_COPY_ON_WRITE)
 STATIC void    S_sv_release_COW(pTHX_ SV *sv, const char *pvx, STRLEN len, SV *after)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_4);
 
-#endif
+#  endif
+STATIC SV *    S_more_sv(pTHX);
+STATIC void *  S_more_bodies(pTHX_ size_t size, svtype sv_type);
+STATIC bool    S_sv_2iuv_common(pTHX_ SV *sv)
+                       __attribute__nonnull__(pTHX_1);
+
+STATIC void    S_glob_assign_glob(pTHX_ SV *dstr, SV *sstr, const int dtype)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+
+STATIC void    S_glob_assign_ref(pTHX_ SV *dstr, SV *sstr)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+
+STATIC PTR_TBL_ENT_t * S_ptr_table_find(PTR_TBL_t *tbl, const void *sv)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(1)
+                       __attribute__nonnull__(2);
+
+STATIC SV *    S_find_hash_subscript(pTHX_ HV *hv, SV *val)
+                       __attribute__nonnull__(pTHX_2);
+
+STATIC I32     S_find_array_subscript(pTHX_ AV *av, SV *val)
+                       __attribute__nonnull__(pTHX_2);
+
+STATIC SV *    S_find_uninit_var(pTHX_ OP *obase, SV *uninit_sv, bool match);
 #endif
 
 #if defined(PERL_IN_TOKE_C) || defined(PERL_DECL_PROT)
@@ -3854,12 +3895,12 @@ STATIC char*    S_stdize_locale(pTHX_ char* locs)
 #endif
 
 #if defined(PERL_IN_UTIL_C) || defined(PERL_DECL_PROT)
-STATIC COP*    S_closest_cop(pTHX_ COP *cop, const OP *o)
+STATIC const COP*      S_closest_cop(pTHX_ const COP *cop, const OP *o)
                        __attribute__nonnull__(pTHX_1);
 
 STATIC SV*     S_mess_alloc(pTHX);
 STATIC const char *    S_vdie_croak_common(pTHX_ const char *pat, va_list *args, STRLEN *msglen, I32* utf8);
-STATIC void    S_vdie_common(pTHX_ const char *message, STRLEN msglen, I32 utf8);
+STATIC bool    S_vdie_common(pTHX_ const char *message, STRLEN msglen, I32 utf8, bool warn);
 STATIC char *  S_write_no_mem(pTHX)
                        __attribute__noreturn__;
 
@@ -3870,8 +3911,9 @@ STATIC NV S_mulexp10(NV value, I32 exponent);
 #endif
 
 #if defined(PERL_IN_UTF8_C) || defined(PERL_DECL_PROT)
-STATIC STRLEN  S_is_utf8_char_slow(pTHX_ const U8 *s, const STRLEN len)
-                       __attribute__nonnull__(pTHX_1);
+STATIC STRLEN  S_is_utf8_char_slow(const U8 *s, const STRLEN len)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(1);
 
 STATIC bool    S_is_utf8_common(pTHX_ const U8 *const p, SV **swash, const char * const swashname)
                        __attribute__warn_unused_result__
@@ -4061,6 +4103,14 @@ PERL_CALLCONV void       Perl_hv_eiter_set(pTHX_ HV* hv, HE* eiter)
 PERL_CALLCONV void     Perl_hv_name_set(pTHX_ HV* hv, const char *name, I32 len, int flags)
                        __attribute__nonnull__(pTHX_1);
 
+PERL_CALLCONV AV**     Perl_hv_backreferences_p(pTHX_ HV* hv)
+                       __attribute__nonnull__(pTHX_1);
+
+#if defined(PERL_IN_DUMP_C) || defined(PERL_IN_HV_C) || defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT)
+PERL_CALLCONV void     Perl_hv_kill_backrefs(pTHX_ HV* hv)
+                       __attribute__nonnull__(pTHX_1);
+
+#endif
 PERL_CALLCONV void     Perl_hv_clear_placeholders(pTHX_ HV* hb)
                        __attribute__nonnull__(pTHX_1);