performance tweaking op.c
[p5sagit/p5-mst-13.2.git] / proto.h
diff --git a/proto.h b/proto.h
index a47102f..3bd2ced 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);
 
@@ -290,6 +306,10 @@ PERL_CALLCONV void Perl_cv_ckproto(pTHX_ const CV* cv, const GV* gv, const char*
 PERL_CALLCONV CV*      Perl_cv_clone(pTHX_ CV* proto)
                        __attribute__nonnull__(pTHX_1);
 
+PERL_CALLCONV SV*      Perl_gv_const_sv(pTHX_ GV* gv)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+
 PERL_CALLCONV SV*      Perl_cv_const_sv(pTHX_ CV* cv)
                        __attribute__warn_unused_result__;
 
@@ -1246,6 +1266,9 @@ PERL_CALLCONV void        Perl_qerror(pTHX_ SV* err)
 PERL_CALLCONV void     Perl_sortsv(pTHX_ SV** array, size_t num_elts, SVCOMPARE_t cmp)
                        __attribute__nonnull__(pTHX_1);
 
+PERL_CALLCONV void     Perl_sortsv_flags(pTHX_ SV** array, size_t num_elts, SVCOMPARE_t cmp, U32 flags)
+                       __attribute__nonnull__(pTHX_1);
+
 PERL_CALLCONV int      Perl_mg_clear(pTHX_ SV* sv)
                        __attribute__nonnull__(pTHX_1);
 
@@ -1383,6 +1406,12 @@ PERL_CALLCONV OP*        Perl_newFOROP(pTHX_ I32 flags, char* label, line_t forline, OP
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_5);
 
+PERL_CALLCONV OP*      Perl_newGIVENOP(pTHX_ OP* cond, OP* block, PADOFFSET defsv_off)
+                       __attribute__malloc__
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+
 PERL_CALLCONV OP*      Perl_newLOGOP(pTHX_ I32 optype, I32 flags, OP* left, OP* right)
                        __attribute__malloc__
                        __attribute__warn_unused_result__
@@ -1568,6 +1597,11 @@ PERL_CALLCONV OP*        Perl_newUNOP(pTHX_ I32 type, I32 flags, OP* first)
                        __attribute__malloc__
                        __attribute__warn_unused_result__;
 
+PERL_CALLCONV OP*      Perl_newWHENOP(pTHX_ OP* cond, OP* block)
+                       __attribute__malloc__
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_2);
+
 PERL_CALLCONV OP*      Perl_newWHILEOP(pTHX_ I32 flags, I32 debuggable, LOOP* loop, I32 whileline, OP* expr, OP* block, OP* cont, I32 has_my)
                        __attribute__malloc__
                        __attribute__warn_unused_result__;
@@ -2731,12 +2765,12 @@ PERL_CALLCONV MAGIC*    Perl_mg_dup(pTHX_ MAGIC* mg, CLONE_PARAMS* param)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_2);
 
-PERL_CALLCONV SV*      Perl_sv_dup(pTHX_ SV* sstr, CLONE_PARAMS* param)
+PERL_CALLCONV SV*      Perl_sv_dup(pTHX_ const SV* sstr, CLONE_PARAMS* param)
                        __attribute__malloc__
                        __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);
@@ -3016,6 +3050,10 @@ PERL_CALLCONV OP*        Perl_ck_sassign(pTHX_ OP *o)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 
+PERL_CALLCONV OP*      Perl_ck_say(pTHX_ OP *o)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+
 PERL_CALLCONV OP*      Perl_ck_select(pTHX_ OP *o)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -3124,6 +3162,13 @@ STATIC OP*       S_too_many_arguments(pTHX_ OP *o, const char* name)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
 
+STATIC bool    S_looks_like_bool(pTHX_ OP* o)
+                       __attribute__nonnull__(pTHX_1);
+
+STATIC OP*     S_newGIVWHENOP(pTHX_ OP* cond, OP *block, I32 enter_opcode, I32 leave_opcode, PADOFFSET entertarg)
+                       __attribute__nonnull__(pTHX_2);
+
+STATIC OP*     S_ref_array_or_hash(pTHX_ OP* cond);
 #endif
 #if defined(PL_OP_SLAB_ALLOC)
 PERL_CALLCONV void*    Perl_Slab_Alloc(pTHX_ int m, size_t sz)
@@ -3265,6 +3310,9 @@ STATIC bool       S_num_overflow(NV value, I32 fldsize, I32 frcsize)
 STATIC I32     S_dopoptoeval(pTHX_ I32 startingblock)
                        __attribute__warn_unused_result__;
 
+STATIC I32     S_dopoptogiven(pTHX_ I32 startingblock)
+                       __attribute__warn_unused_result__;
+
 STATIC I32     S_dopoptolabel(pTHX_ const char *label)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -3279,12 +3327,20 @@ STATIC I32      S_dopoptosub_at(pTHX_ const PERL_CONTEXT* cxstk, I32 startingblock)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 
+STATIC I32     S_dopoptowhen(pTHX_ I32 startingblock)
+                       __attribute__warn_unused_result__;
+
 STATIC void    S_save_lines(pTHX_ AV *array, SV *sv)
                        __attribute__nonnull__(pTHX_2);
 
 STATIC OP*     S_doeval(pTHX_ int gimme, OP** startop, CV* outside, U32 seq)
                        __attribute__warn_unused_result__;
 
+STATIC PerlIO *        S_check_type_and_open(pTHX_ const char *name, const char *mode)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+
 STATIC PerlIO *        S_doopen_pm(pTHX_ const char *name, const char *mode)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1)
@@ -3298,6 +3354,19 @@ STATIC I32       S_run_user_filter(pTHX_ int idx, SV *buf_sv, int maxlen)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_2);
 
+STATIC PMOP*   S_make_matcher(pTHX_ regexp* re)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+
+STATIC bool    S_matcher_matches_sv(pTHX_ PMOP* matcher, SV* sv)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+
+STATIC void    S_destroy_matcher(pTHX_ PMOP* matcher)
+                       __attribute__nonnull__(pTHX_1);
+
+STATIC OP*     S_do_smartmatch(pTHX_ HV* seen_this, HV* seen_other);
 #endif
 
 #if defined(PERL_IN_PP_HOT_C) || defined(PERL_DECL_PROT)
@@ -3584,20 +3653,19 @@ 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__
                        __attribute__nonnull__(1)
                        __attribute__nonnull__(5);
 
-STATIC IV      S_asIV(pTHX_ SV* sv)
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
-
-STATIC UV      S_asUV(pTHX_ SV* sv)
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
-
 STATIC void    S_sv_unglob(pTHX_ SV* sv)
                        __attribute__nonnull__(pTHX_1);
 
@@ -3645,6 +3713,14 @@ STATIC bool      S_utf8_mg_pos_init(pTHX_ SV *sv, MAGIC **mgp, STRLEN **cachep, I32 i
                        __attribute__nonnull__(pTHX_6)
                        __attribute__nonnull__(pTHX_7);
 
+STATIC char *  S_stringify_regexp(pTHX_ SV *sv, MAGIC *mg, STRLEN *lp)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+
+STATIC char *  S_F0convert(NV nv, char *endbuf, STRLEN *len)
+                       __attribute__nonnull__(2)
+                       __attribute__nonnull__(3);
+
 #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)
@@ -3722,13 +3798,16 @@ STATIC void     S_checkcomma(pTHX_ char *s, const char *name, const char *what)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
 
+STATIC bool    S_feature_is_enabled(pTHX_ char* name, STRLEN namelen)
+                       __attribute__nonnull__(pTHX_1);
+
 STATIC void    S_force_ident(pTHX_ const char *s, int kind)
                        __attribute__nonnull__(pTHX_1);
 
 STATIC void    S_incline(pTHX_ char *s)
                        __attribute__nonnull__(pTHX_1);
 
-STATIC int     S_intuit_method(pTHX_ char *s, GV *gv)
+STATIC int     S_intuit_method(pTHX_ char *s, GV *gv, CV *cv)
                        __attribute__nonnull__(pTHX_1);
 
 STATIC int     S_intuit_more(pTHX_ char *s)
@@ -3770,11 +3849,7 @@ STATIC SV*       S_new_constant(pTHX_ const char *s, STRLEN len, const char *key, SV *
                        __attribute__nonnull__(pTHX_3)
                        __attribute__nonnull__(pTHX_4);
 
-#  if defined(DEBUGGING)
-STATIC int     S_tokereport(pTHX_ I32 rv);
-#  endif
 STATIC int     S_ao(pTHX_ int toketype);
-STATIC void    S_depcom(pTHX);
 STATIC const char*     S_incl_perldb(pTHX);
 #  if defined(PERL_CR_FILTER)
 STATIC I32     S_cr_textfilter(pTHX_ int idx, SV *sv, int maxlen);
@@ -3782,6 +3857,9 @@ STATIC void       S_strip_return(pTHX_ SV *sv)
                        __attribute__nonnull__(pTHX_1);
 
 #  endif
+#  if defined(DEBUGGING)
+STATIC int     S_tokereport(pTHX_ I32 rv);
+#  endif
 #endif
 
 #if defined(PERL_IN_UNIVERSAL_C) || defined(PERL_DECL_PROT)
@@ -4006,6 +4084,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);
 
@@ -4151,6 +4237,13 @@ PERL_CALLCONV int        Perl_my_sprintf(char *buffer, const char *pat, ...)
 
 PERL_CALLCONV void     Perl_my_clearenv(pTHX);
 
+#ifdef PERL_IMPLICIT_CONTEXT
+PERL_CALLCONV void*    Perl_my_cxt_init(pTHX_ int *index, size_t size)
+                       __attribute__nonnull__(pTHX_1);
+
+#endif
+
+
 END_EXTERN_C
 /*
  * ex: set ts=8 sts=4 sw=4 noet: