This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Split function into two functions
[perl5.git] / embed.fnc
index 220acd7..162caf2 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
 :
 :         proto.h: add __attribute__malloc__
 :
-:   b  Binary backward compatibility; function is a macro
-:      but has also Perl_ implementation (which is exported); must be
-:      implemented in mathoms.c (whose compilation can be suppressed; see
-:      INSTALL) as commit 075eb5c9b6:
+:   b  Binary backward compatibility; has an exported Perl_ implementation
+:      but function is also normally a macro (i.e. has the "m" flag as well).
+:      Backcompat functions ("b") can be anywhere, but if they are also
+:      macros ("m") then they have no proto.h entries so must either be in
+:      mathoms.c to get marked EXTERN_C (and skipped for -DNO_MATHOMS builds)
+:      or else will require special attention to ensure they are marked
+:      EXTERN_C (and then won't be automatically skipped for -DNO_MATHOMS
+:      builds).
 :
 :         add entry to the list of exported symbols;
 :         don't define PERL_ARGS_ASSERT_FOO
@@ -67,7 +71,8 @@
 :
 :   M  May change:
 :
-:         any doc entry is marked that function may change
+:         any doc entry is marked that function may change.  Also used to
+:        suppress making a doc entry if it would just be a placeholder.
 :
 :   m  Implemented as a macro:
 :
@@ -313,7 +318,7 @@ pRn |SV*    |cv_const_sv_or_av|NULLOK const CV *const cv
 Apd    |SV *   |cv_name        |NN CV *cv|NULLOK SV *sv|U32 flags
 Apd    |void   |cv_undef       |NN CV* cv
 p      |void   |cv_undef_flags |NN CV* cv|U32 flags
-p      |void   |cv_forget_slab |NN CV *cv
+p      |void   |cv_forget_slab |NULLOK CV *cv
 Ap     |void   |cx_dump        |NN PERL_CONTEXT* cx
 Ap     |SV*    |filter_add     |NULLOK filter_t funcp|NULLOK SV* datasv
 Ap     |void   |filter_del     |NN filter_t funcp
@@ -330,7 +335,7 @@ ApR |I32    |cxinc
 Afp    |void   |deb            |NN const char* pat|...
 Ap     |void   |vdeb           |NN const char* pat|NULLOK va_list* args
 Ap     |void   |debprofdump
-EXp    |SV*    |multideref_stringify   |NN const OP* o|NN CV *cv
+EXp    |SV*    |multideref_stringify   |NN const OP* o|NULLOK CV *cv
 Ap     |I32    |debop          |NN const OP* o
 Ap     |I32    |debstack
 Ap     |I32    |debstackptrs
@@ -345,9 +350,9 @@ Afrpd   |OP*    |die            |NULLOK const char* pat|...
 pr     |void   |die_unwind     |NN SV* msv
 Ap     |void   |dounwind       |I32 cxix
 : FIXME
-pmb    |bool   |do_aexec       |NULLOK SV* really|NN SV** mark|NN SV** sp
+pmb    |bool|do_aexec  |NULLOK SV* really|NN SV** mark|NN SV** sp
 : Used in pp_sys.c
-p      |bool   |do_aexec5      |NULLOK SV* really|NN SV** mark|NN SV** sp|int fd|int do_report
+p      |bool|do_aexec5 |NULLOK SV* really|NN SV** mark|NN SV** sp|int fd|int do_report
 Ap     |int    |do_binmode     |NN PerlIO *fp|int iotype|int mode
 : Used in pp.c
 Ap     |bool   |do_close       |NULLOK GV* gv|bool not_implicit
@@ -355,9 +360,9 @@ Ap  |bool   |do_close       |NULLOK GV* gv|bool not_implicit
 p      |bool   |do_eof         |NN GV* gv
 
 #ifdef PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION
-pm     |bool   |do_exec        |NN const char* cmd
+pm     |bool|do_exec   |NN const char* cmd
 #else
-p      |bool   |do_exec        |NN const char* cmd
+p      |bool|do_exec   |NN const char* cmd
 #endif
 
 #if defined(WIN32) || defined(__SYMBIAN32__) || defined(VMS)
@@ -366,7 +371,7 @@ Ap  |int    |do_spawn       |NN char* cmd
 Ap     |int    |do_spawn_nowait|NN char* cmd
 #endif
 #if !defined(WIN32)
-p      |bool   |do_exec3       |NN const char *incmd|int fd|int do_report
+p      |bool|do_exec3  |NN const char *incmd|int fd|int do_report
 #endif
 p      |void   |do_execfree
 #if defined(PERL_IN_DOIO_C)
@@ -441,7 +446,7 @@ Ap  |void   |dump_all
 p      |void   |dump_all_perl  |bool justperl
 Ap     |void   |dump_eval
 Ap     |void   |dump_form      |NN const GV* gv
-Ap     |void   |gv_dump        |NN GV* gv
+Ap     |void   |gv_dump        |NULLOK GV* gv
 Ap     |void   |op_dump        |NN const OP *o
 Ap     |void   |pmop_dump      |NULLOK PMOP* pm
 Ap     |void   |dump_packsubs  |NN const HV* stash
@@ -777,9 +782,11 @@ Apd        |void   |op_null        |NN OP* o
 EXp    |void   |op_clear       |NN OP* o
 Ap     |void   |op_refcnt_lock
 Ap     |void   |op_refcnt_unlock
-Apdn   |OP*    |op_sibling_splice|NN OP *parent|NULLOK OP *start \
+Apdn   |OP*    |op_sibling_splice|NULLOK OP *parent|NULLOK OP *start \
                |int del_count|NULLOK OP* insert
+#ifdef PERL_OP_PARENT
 Apdn   |OP*    |op_parent|NN OP *o
+#endif
 #if defined(PERL_IN_OP_C)
 s      |OP*    |listkids       |NULLOK OP* o
 #endif
@@ -792,29 +799,29 @@ p |OP*    |localize       |NN OP *o|I32 lex
 ApdR   |I32    |looks_like_number|NN SV *const sv
 Apd    |UV     |grok_bin       |NN const char* start|NN STRLEN* len_p|NN I32* flags|NULLOK NV *result
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C)
-EMsR   |char   |grok_bslash_c  |const char source|const bool output_warning
-EMsR   |bool   |grok_bslash_o  |NN char** s|NN UV* uv           \
+EMiR   |bool   |grok_bslash_x  |NN char** s|NN UV* uv           \
                                |NN const char** error_msg       \
                                |const bool output_warning       \
                                |const bool strict               \
                                |const bool silence_non_portable \
                                |const bool utf8
-EMiR   |bool   |grok_bslash_x  |NN char** s|NN UV* uv           \
+#endif
+EMpRX  |char   |grok_bslash_c  |const char source|const bool output_warning
+EMpRX  |bool   |grok_bslash_o  |NN char** s|NN UV* uv           \
                                |NN const char** error_msg       \
                                |const bool output_warning       \
                                |const bool strict               \
                                |const bool silence_non_portable \
                                |const bool utf8
-EMsPR  |char*|form_short_octal_warning|NN const char * const s  \
+EMpPRX |char*|form_short_octal_warning|NN const char * const s  \
                                |const STRLEN len
-#endif
 Apd    |UV     |grok_hex       |NN const char* start|NN STRLEN* len_p|NN I32* flags|NULLOK NV *result
-Apdn   |int    |grok_infnan    |NN const char** sp|NN const char *send
+Apd    |int    |grok_infnan    |NN const char** sp|NN const char *send
 Apd    |int    |grok_number    |NN const char *pv|STRLEN len|NULLOK UV *valuep
 Apd    |int    |grok_number_flags|NN const char *pv|STRLEN len|NULLOK UV *valuep|U32 flags
 ApdR   |bool   |grok_numeric_radix|NN const char **sp|NN const char *send
 Apd    |UV     |grok_oct       |NN const char* start|NN STRLEN* len_p|NN I32* flags|NULLOK NV *result
-Apdn   |UV     |grok_atou      |NN const char* pv|NULLOK const char** endptr
+EXpn   |bool   |grok_atoUV     |NN const char* pv|NN UV* valptr|NULLOK const char** endptr
 : These are all indirectly referenced by globals.c. This is somewhat annoying.
 p      |int    |magic_clearenv |NN SV* sv|NN MAGIC* mg
 p      |int    |magic_clear_all_env|NN SV* sv|NN MAGIC* mg
@@ -956,9 +963,6 @@ ADMnoPR     |UV     |ASCII_TO_NEED  |const UV enc|const UV ch
 Apa    |OP*    |newANONLIST    |NULLOK OP* o
 Apa    |OP*    |newANONHASH    |NULLOK OP* o
 Ap     |OP*    |newANONSUB     |I32 floor|NULLOK OP* proto|NULLOK OP* block
-#if defined(PERL_IN_OP_C)
-i      |bool   |aassign_common_vars    |NULLOK OP* o
-#endif
 Apda   |OP*    |newASSIGNOP    |I32 flags|NULLOK OP* left|I32 optype|NULLOK OP* right
 Apda   |OP*    |newCONDOP      |I32 flags|NN OP* first|NULLOK OP* trueop|NULLOK OP* falseop
 Apd    |CV*    |newCONSTSUB    |NULLOK HV* stash|NULLOK const char* name|NULLOK SV* sv
@@ -1130,7 +1134,7 @@ ApOM      |int    |init_i18nl14n  |int printwarn
 ApM    |char*  |my_strerror    |const int errnum
 ApOM   |void   |new_collate    |NULLOK const char* newcoll
 ApOM   |void   |new_ctype      |NN const char* newctype
-ApMn   |void   |_warn_problematic_locale
+EXpMn  |void   |_warn_problematic_locale
 ApOM   |void   |new_numeric    |NULLOK const char* newcoll
 Ap     |void   |set_numeric_local
 Ap     |void   |set_numeric_radix
@@ -1254,7 +1258,6 @@ Ap        |void   |savestack_grow_cnt     |I32 need
 Amp    |void   |save_aelem     |NN AV* av|SSize_t idx|NN SV **sptr
 Ap     |void   |save_aelem_flags|NN AV* av|SSize_t idx|NN SV **sptr \
                                 |const U32 flags
-p      |void   |save_aliased_sv|NN GV* gv
 Ap     |I32    |save_alloc     |I32 size|I32 pad
 Ap     |void   |save_aptr      |NN AV** aptr
 Ap     |AV*    |save_ary       |NN GV* gv
@@ -1371,7 +1374,7 @@ Apd       |I32    |sv_true        |NULLOK SV *const sv
 sd     |void   |sv_add_arena   |NN char *const ptr|const U32 size \
                                |const U32 flags
 #endif
-Apdn   |int    |sv_backoff     |NN SV *const sv
+Apdn   |void   |sv_backoff     |NN SV *const sv
 Apd    |SV*    |sv_bless       |NN SV *const sv|NN HV *const stash
 #if defined(PERL_DEBUG_READONLY_COW)
 p      |void   |sv_buf_to_ro   |NN SV *sv
@@ -1443,6 +1446,7 @@ Apd       |void   |sv_magic       |NN SV *const sv|NULLOK SV *const obj|const int how \
 Apd    |MAGIC *|sv_magicext    |NN SV *const sv|NULLOK SV *const obj|const int how \
                                |NULLOK const MGVTBL *const vtbl|NULLOK const char *const name \
                                |const I32 namlen
+Ein    |bool   |sv_only_taint_gmagic|NN SV *sv
 : exported for re.pm
 EXp    |MAGIC *|sv_magicext_mglob|NN SV *sv
 ApdbamR        |SV*    |sv_mortalcopy  |NULLOK SV *const oldsv
@@ -1765,7 +1769,7 @@ Ap        |void   |do_gvgv_dump   |I32 level|NN PerlIO *file|NN const char *name\
                                |NULLOK GV *sv
 Ap     |void   |do_hv_dump     |I32 level|NN PerlIO *file|NN const char *name\
                                |NULLOK HV *sv
-Ap     |void   |do_magic_dump  |I32 level|NN PerlIO *file|NN const MAGIC *mg|I32 nest \
+Ap     |void   |do_magic_dump  |I32 level|NN PerlIO *file|NULLOK const MAGIC *mg|I32 nest \
                                |I32 maxnest|bool dumpops|STRLEN pvlim
 Ap     |void   |do_op_dump     |I32 level|NN PerlIO *file|NULLOK const OP *o
 Ap     |void   |do_pmop_dump   |I32 level|NN PerlIO *file|NULLOK const PMOP *pm
@@ -1788,7 +1792,7 @@ Apdmb     |void   |sv_force_normal|NN SV *sv
 Apd    |void   |sv_force_normal_flags|NN SV *const sv|const U32 flags
 pX     |SSize_t|tmps_grow_p    |SSize_t ix
 Apd    |SV*    |sv_rvweaken    |NN SV *const sv
-ApPMd  |SV*    |sv_get_backrefs|NN SV *const sv
+AnpPMd |SV*    |sv_get_backrefs|NN SV *const sv
 : This is indirectly referenced by globals.c. This is somewhat annoying.
 p      |int    |magic_killbackrefs|NN SV *sv|NN MAGIC *mg
 Ap     |OP*    |newANONATTRSUB |I32 floor|NULLOK OP *proto|NULLOK OP *attrs|NULLOK OP *block
@@ -2026,7 +2030,7 @@ sR        |const char *|get_num   |NN const char *patptr|NN I32 *lenptr
 ns     |bool   |need_utf8      |NN const char *pat|NN const char *patend
 ns     |char   |first_symbol   |NN const char *pat|NN const char *patend
 sR     |char * |sv_exp_grow    |NN SV *sv|STRLEN needed
-snR    |char * |bytes_to_uni   |NN const U8 *start|STRLEN len|NN char *dest \
+snR    |char * |my_bytes_to_utf8|NN const U8 *start|STRLEN len|NN char *dest \
                                |const bool needs_swap
 #endif
 
@@ -2127,10 +2131,12 @@ Es      |regnode*|regclass      |NN RExC_state_t *pRExC_state                 \
                                |bool allow_multi_fold                        \
                                |const bool silence_non_portable              \
                                |const bool strict                            \
+                               |bool optimizable                       \
                                |NULLOK SV** ret_invlist
 Es     |void|add_above_Latin1_folds|NN RExC_state_t *pRExC_state|const U8 cp \
                                |NN SV** invlist
 Esn    |bool|could_it_be_a_POSIX_class|NN RExC_state_t *pRExC_state
+EsnP   |unsigned int|regex_set_precedence|const U8 my_operator
 Es     |regnode*|handle_regex_sets|NN RExC_state_t *pRExC_state \
                                |NULLOK SV ** return_invlist            \
                                |NN I32 *flagp|U32 depth                \
@@ -2140,10 +2146,12 @@ Es      |regnode*|reg_node      |NN RExC_state_t *pRExC_state|U8 op
 Es     |UV     |reg_recode     |const char value|NN SV **encp
 Es     |regnode*|regpiece      |NN RExC_state_t *pRExC_state \
                                |NN I32 *flagp|U32 depth
-Es     |STRLEN |grok_bslash_N  |NN RExC_state_t *pRExC_state               \
-                               |NULLOK regnode** nodep|NULLOK UV *valuep   \
-                               |NN I32 *flagp|U32 depth                    \
-                               |NULLOK SV** substitute_parse
+Es     |bool   |grok_bslash_N  |NN RExC_state_t *pRExC_state               \
+                               |NULLOK regnode** nodep                     \
+                               |NULLOK UV *code_point_p                    \
+                               |NULLOK int* cp_count                       \
+                               |NN I32 *flagp                              \
+                               |const U32 depth
 Es     |void   |reginsert      |NN RExC_state_t *pRExC_state \
                                |U8 op|NN regnode *opnd|U32 depth
 Es     |void   |regtail        |NN RExC_state_t *pRExC_state \
@@ -2160,7 +2168,10 @@ Ei       |void   |alloc_maybe_populate_EXACT|NN RExC_state_t *pRExC_state \
                                |NN regnode *node|NN I32 *flagp|STRLEN len \
                                |UV code_point|bool downgradable
 Ein    |U8   |compute_EXACTish|NN RExC_state_t *pRExC_state
-Es     |char * |nextchar       |NN RExC_state_t *pRExC_state
+Es     |void   |nextchar       |NN RExC_state_t *pRExC_state
+Es     |void   |skip_to_be_ignored_text|NN RExC_state_t *pRExC_state  \
+                               |NN char ** p                       \
+                               |const bool force_to_xmod
 Ein    |char * |reg_skipcomment|NN RExC_state_t *pRExC_state|NN char * p
 Es     |void   |scan_commit    |NN const RExC_state_t *pRExC_state \
                                |NN struct scan_data_t *data        \
@@ -2272,6 +2283,33 @@ Es       |void   |to_utf8_substr |NN regexp * prog
 Es     |bool   |to_byte_substr |NN regexp * prog
 ERsn   |I32    |reg_check_named_buff_matched   |NN const regexp *rex \
                                                |NN const regnode *scan
+EsnR   |bool   |isGCB          |const GCB_enum before|const GCB_enum after
+EsR    |bool   |isSB           |SB_enum before                         \
+                               |SB_enum after                          \
+                               |NN const U8 * const strbeg                     \
+                               |NN const U8 * const curpos                     \
+                               |NN const U8 * const strend                     \
+                               |const bool utf8_target
+EsR    |SB_enum|advance_one_SB |NN U8 ** curpos                                \
+                               |NN const U8 * const strend                     \
+                               |const bool utf8_target
+EsR    |SB_enum|backup_one_SB  |NN const U8 * const strbeg                     \
+                               |NN U8 ** curpos                                \
+                               |const bool utf8_target
+EsR    |bool   |isWB           |WB_enum previous                               \
+                               |WB_enum before                         \
+                               |WB_enum after                          \
+                               |NN const U8 * const strbeg                     \
+                               |NN const U8 * const curpos                     \
+                               |NN const U8 * const strend                     \
+                               |const bool utf8_target
+EsR    |WB_enum|advance_one_WB |NN U8 ** curpos                                \
+                               |NN const U8 * const strend                     \
+                               |const bool utf8_target
+EsR    |WB_enum|backup_one_WB  |NN WB_enum * previous                  \
+                               |NN const U8 * const strbeg                     \
+                               |NN U8 ** curpos                                \
+                               |const bool utf8_target
 #  ifdef DEBUGGING
 Es     |void   |dump_exec_pos  |NN const char *locinput|NN const regnode *scan|NN const char *loc_regeol\
                                |NN const char *loc_bostr|NN const char *loc_reg_starttry|const bool do_utf8
@@ -2282,7 +2320,7 @@ Es        |void   |debug_start_match|NN const REGEXP *prog|const bool do_utf8\
 #endif
 
 #if defined(PERL_IN_DUMP_C)
-s      |CV*    |deb_curcv      |const I32 ix
+s      |CV*    |deb_curcv      |I32 ix
 s      |void   |debprof        |NN const OP *o
 s      |UV     |sequence_num   |NULLOK const OP *o
 s      |SV*    |pm_description |NN const PMOP *pm
@@ -2344,9 +2382,6 @@ s |STRLEN |sv_pos_b2u_midway|NN const U8 *const s|NN const U8 *const target \
 s      |void   |assert_uft8_cache_coherent|NN const char *const func \
                |STRLEN from_cache|STRLEN real|NN SV *const sv
 sn     |char * |F0convert      |NV nv|NN char *const endbuf|NN STRLEN *const len
-#  if defined(PERL_OLD_COPY_ON_WRITE)
-sM     |void   |sv_release_COW |NN SV *sv|NN const char *pvx|NN SV *after
-#  endif
 s      |SV *   |more_sv
 s      |bool   |sv_2iuv_common |NN SV *const sv
 s      |void   |glob_assign_glob|NN SV *const dstr|NN SV *const sstr \
@@ -2440,8 +2475,14 @@ s        |char*  |stdize_locale  |NN char* locs
 #if defined(USE_LOCALE) \
     && (defined(PERL_IN_LOCALE_C) || defined (PERL_EXT_POSIX))
 ApM    |bool   |_is_cur_LC_category_utf8|int category
+#      ifdef DEBUGGING
+AMnPpR |char * |_setlocale_debug_string|const int category                 \
+                                       |NULLOK const char* const locale    \
+                                       |NULLOK const char* const retval
+#      endif
 #endif
 
+
 #if defined(PERL_IN_UTIL_C)
 s      |SV*    |mess_alloc
 s      |SV *   |with_queued_errors|NN SV *ex
@@ -2568,8 +2609,6 @@ Apd       |PADOFFSET|pad_findmy_pv|NN const char* name|U32 flags
 Apd    |PADOFFSET|pad_findmy_sv|NN SV* name|U32 flags
 ApdD   |PADOFFSET|find_rundefsvoffset  |
 Apd    |SV*    |find_rundefsv  |
-: Used in pp.c
-p      |SV*    |find_rundefsv2 |NN CV *cv|U32 seq
 #if defined(PERL_IN_PAD_C)
 sd     |PADOFFSET|pad_findlex  |NN const char *namepv|STRLEN namelen|U32 flags \
                                |NN const CV* cv|U32 seq|int warn \
@@ -2711,7 +2750,7 @@ so        |void   |xs_version_bootcheck|U32 items|U32 ax|NN const char *xs_p \
 #endif
 Xpon   |I32    |xs_handshake   |const U32 key|NN void * v_my_perl\
                                |NN const char * file| ...
-Xp     |void   |xs_boot_epilog |const U32 ax
+Xp     |void   |xs_boot_epilog |const I32 ax
 #ifndef HAS_STRLCAT
 Apnod  |Size_t |my_strlcat     |NULLOK char *dst|NULLOK const char *src|Size_t size
 #endif