In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/a5d565cd966ec58e5f3ca05b219fe919086f43b1?hp=95e62f9f8dd60dc0c6b50e144c90d1640f899cd9>
- Log ----------------------------------------------------------------- commit a5d565cd966ec58e5f3ca05b219fe919086f43b1 Author: Jarkko Hietaniemi <[email protected]> Date: Thu Feb 23 09:51:42 2017 -0500 Followup on a4570f51 for t/porting/extrefs.t More functions have appeared that are PERL_STATIC_INLINE, but the porting/extrefs.t compiles with -DPERL_NO_INLINE_FUNCTIONS, which means no bodies are visible, but the Tru64 cc takes static inline seriously, requiring the bodies. Instead of the manual tweak of adding #ifndef PERL_NO_INLINE_FUNCTIONS to embed.fnc, fix the problem in embed.pl so that 'i' type inserts the required ifndef. Remove the manual PERL_NO_INLINE_FUNCTIONS insertions made in a4570f51 (note that the types of some have diverged). Now the extrefs.t again works in Tru64 (and no other compiler has ever tripped on this). ----------------------------------------------------------------------- Summary of changes: embed.fnc | 10 --- embed.h | 12 ++- proto.h | 226 +++++++++++++++++++++++++++++++++++++++++++++++++++------ regen/embed.pl | 4 + 4 files changed, 213 insertions(+), 39 deletions(-) diff --git a/embed.fnc b/embed.fnc index 25bf824f26..0a63f4756f 100644 --- a/embed.fnc +++ b/embed.fnc @@ -283,9 +283,7 @@ Apd |void |av_push |NN AV *av|NN SV *val EXp |void |av_reify |NN AV *av ApdR |SV* |av_shift |NN AV *av Apd |SV** |av_store |NN AV *av|SSize_t key|NULLOK SV *val -#ifndef PERL_NO_INLINE_FUNCTIONS AidR |SSize_t|av_top_index |NN AV *av -#endif AmpdR |SSize_t|av_tindex |NN AV *av Apd |void |av_undef |NN AV *av ApdoxM |SV** |av_create_and_unshift_one|NN AV **const avp|NN SV *const val @@ -713,9 +711,7 @@ pR |OP* |invert |NULLOK OP* cmd ApR |I32 |is_lvalue_sub : Used in cop.h XopR |I32 |was_lvalue_sub -#ifndef PERL_NO_INLINE_FUNCTIONS ApMRnP |STRLEN |_is_utf8_char_helper|NN const U8 * const s|NN const U8 * e|const U32 flags -#endif ADMpR |U32 |to_uni_upper_lc|U32 c ADMpR |U32 |to_uni_title_lc|U32 c ADMpR |U32 |to_uni_lower_lc|U32 c @@ -1564,9 +1560,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 -#ifndef PERL_NO_INLINE_FUNCTIONS Ein |bool |sv_only_taint_gmagic|NN SV *sv -#endif : exported for re.pm EXp |MAGIC *|sv_magicext_mglob|NN SV *sv ApdbmR |SV* |sv_mortalcopy |NULLOK SV *const oldsv @@ -1869,10 +1863,8 @@ Am |I32 |whichsig |NN const char* sig Ap |I32 |whichsig_sv |NN SV* sigsv Ap |I32 |whichsig_pv |NN const char* sig Ap |I32 |whichsig_pvn |NN const char* sig|STRLEN len -#ifndef PERL_NO_INLINE_FUNCTIONS : used to check for NULs in pathnames and other names AiR |bool |is_safe_syscall|NN const char *pv|STRLEN len|NN const char *what|NN const char *op_name -#endif #ifdef PERL_CORE inR |bool |should_warn_nl|NN const char *pv #endif @@ -2780,9 +2772,7 @@ sRM |U8* |swash_scan_list_line|NN U8* l|NN U8* const lend|NN UV* min \ |NN const U8* const typestr #endif -#ifndef PERL_NO_INLINE_FUNCTIONS EXiMn |void |append_utf8_from_native_byte|const U8 byte|NN U8** dest -#endif Apd |void |sv_set_undef |NN SV *sv Apd |void |sv_setsv_flags |NN SV *dstr|NULLOK SV *sstr|const I32 flags diff --git a/embed.h b/embed.h index 5b9c46c578..587444f0a1 100644 --- a/embed.h +++ b/embed.h @@ -35,6 +35,7 @@ #define _is_uni_perl_idstart(a) Perl__is_uni_perl_idstart(aTHX_ a) #define _is_utf8_FOO(a,b,c,d,e,f,g,h) Perl__is_utf8_FOO(aTHX_ a,b,c,d,e,f,g,h) #define _is_utf8_FOO_with_len(a,b,c) Perl__is_utf8_FOO_with_len(aTHX_ a,b,c) +#define _is_utf8_char_helper Perl__is_utf8_char_helper #define _is_utf8_idcont(a) Perl__is_utf8_idcont(aTHX_ a) #define _is_utf8_idstart(a) Perl__is_utf8_idstart(aTHX_ a) #define _is_utf8_mark(a) Perl__is_utf8_mark(aTHX_ a) @@ -64,6 +65,7 @@ #define av_push(a,b) Perl_av_push(aTHX_ a,b) #define av_shift(a) Perl_av_shift(aTHX_ a) #define av_store(a,b,c) Perl_av_store(aTHX_ a,b,c) +#define av_top_index(a) S_av_top_index(aTHX_ a) #define av_undef(a) Perl_av_undef(aTHX_ a) #define av_unshift(a,b) Perl_av_unshift(aTHX_ a,b) #define block_end(a,b) Perl_block_end(aTHX_ a,b) @@ -248,6 +250,7 @@ #define is_c9strict_utf8_string S_is_c9strict_utf8_string #define is_c9strict_utf8_string_loclen S_is_c9strict_utf8_string_loclen #define is_lvalue_sub() Perl_is_lvalue_sub(aTHX) +#define is_safe_syscall(a,b,c,d) S_is_safe_syscall(aTHX_ a,b,c,d) #define is_strict_utf8_string S_is_strict_utf8_string #define is_strict_utf8_string_loclen S_is_strict_utf8_string_loclen #define is_uni_alnum(a) Perl_is_uni_alnum(aTHX_ a) @@ -801,8 +804,6 @@ #define my_popen(a,b) Perl_my_popen(aTHX_ a,b) #endif #if !defined(PERL_NO_INLINE_FUNCTIONS) -#define _is_utf8_char_helper Perl__is_utf8_char_helper -#define av_top_index(a) S_av_top_index(aTHX_ a) #define cx_popblock(a) S_cx_popblock(aTHX_ a) #define cx_popeval(a) S_cx_popeval(aTHX_ a) #define cx_popformat(a) S_cx_popformat(aTHX_ a) @@ -821,7 +822,6 @@ #define cx_pushsub(a,b,c,d) S_cx_pushsub(aTHX_ a,b,c,d) #define cx_pushwhen(a) S_cx_pushwhen(aTHX_ a) #define cx_topblock(a) S_cx_topblock(aTHX_ a) -#define is_safe_syscall(a,b,c,d) S_is_safe_syscall(aTHX_ a,b,c,d) #endif #if defined(DEBUGGING) #define pad_setsv(a,b) Perl_pad_setsv(aTHX_ a,b) @@ -940,6 +940,7 @@ #endif #if defined(PERL_CORE) || defined(PERL_EXT) #define _warn_problematic_locale Perl__warn_problematic_locale +#define append_utf8_from_native_byte S_append_utf8_from_native_byte #define av_reify(a) Perl_av_reify(aTHX_ a) #define current_re_engine() Perl_current_re_engine(aTHX) #define cv_ckproto_len_flags(a,b,c,d,e) Perl_cv_ckproto_len_flags(aTHX_ a,b,c,d,e) @@ -957,6 +958,7 @@ #define reg_temp_copy(a,b) Perl_reg_temp_copy(aTHX_ a,b) #define report_uninit(a) Perl_report_uninit(aTHX_ a) #define sv_magicext_mglob(a) Perl_sv_magicext_mglob(aTHX_ a) +#define sv_only_taint_gmagic S_sv_only_taint_gmagic #define swash_fetch(a,b,c) Perl_swash_fetch(aTHX_ a,b,c) #define swash_init(a,b,c,d,e) Perl_swash_init(aTHX_ a,b,c,d,e) #define validate_proto(a,b,c) Perl_validate_proto(aTHX_ a,b,c) @@ -976,10 +978,6 @@ #define invlist_trim S_invlist_trim # endif # endif -# if !defined(PERL_NO_INLINE_FUNCTIONS) -#define append_utf8_from_native_byte S_append_utf8_from_native_byte -#define sv_only_taint_gmagic S_sv_only_taint_gmagic -# endif # if defined(DEBUGGING) # if defined(PERL_IN_REGCOMP_C) #define dump_trie(a,b,c,d) S_dump_trie(aTHX_ a,b,c,d) diff --git a/proto.h b/proto.h index bb7efa69ff..3e55e21c3b 100644 --- a/proto.h +++ b/proto.h @@ -67,6 +67,12 @@ PERL_CALLCONV bool Perl__is_utf8_FOO_with_len(pTHX_ const U8 classnum, const U8 #define PERL_ARGS_ASSERT__IS_UTF8_FOO_WITH_LEN \ assert(p); assert(e) +PERL_CALLCONV STRLEN Perl__is_utf8_char_helper(const U8 * const s, const U8 * e, const U32 flags) + __attribute__warn_unused_result__ + __attribute__pure__; +#define PERL_ARGS_ASSERT__IS_UTF8_CHAR_HELPER \ + assert(s); assert(e) + PERL_CALLCONV bool Perl__is_utf8_idcont(pTHX_ const U8 *p) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT__IS_UTF8_IDCONT \ @@ -134,6 +140,11 @@ PERL_CALLCONV SV * Perl_amagic_deref_call(pTHX_ SV *ref, int method); #define PERL_ARGS_ASSERT_AMAGIC_DEREF_CALL \ assert(ref) PERL_CALLCONV bool Perl_amagic_is_enabled(pTHX_ int method); +#ifndef PERL_NO_INLINE_FUNCTIONS +PERL_STATIC_INLINE void S_append_utf8_from_native_byte(const U8 byte, U8** dest); +#define PERL_ARGS_ASSERT_APPEND_UTF8_FROM_NATIVE_BYTE \ + assert(dest) +#endif PERL_CALLCONV I32 Perl_apply(pTHX_ I32 type, SV** mark, SV** sp); #define PERL_ARGS_ASSERT_APPLY \ assert(mark); assert(sp) @@ -209,6 +220,13 @@ PERL_CALLCONV SV** Perl_av_store(pTHX_ AV *av, SSize_t key, SV *val); /* PERL_CALLCONV SSize_t Perl_av_tindex(pTHX_ AV *av) __attribute__warn_unused_result__; */ +#ifndef PERL_NO_INLINE_FUNCTIONS +PERL_STATIC_INLINE SSize_t S_av_top_index(pTHX_ AV *av) + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_AV_TOP_INDEX \ + assert(av) +#endif + PERL_CALLCONV void Perl_av_undef(pTHX_ AV *av); #define PERL_ARGS_ASSERT_AV_UNDEF \ assert(av) @@ -888,15 +906,21 @@ PERL_CALLCONV PADOFFSET Perl_find_rundefsvoffset(pTHX) PERL_CALLCONV char* Perl_find_script(pTHX_ const char *scriptname, bool dosearch, const char *const *const search_ext, I32 flags); #define PERL_ARGS_ASSERT_FIND_SCRIPT \ assert(scriptname) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE I32 Perl_foldEQ(const char* a, const char* b, I32 len); #define PERL_ARGS_ASSERT_FOLDEQ \ assert(a); assert(b) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE I32 Perl_foldEQ_latin1(const char* a, const char* b, I32 len); #define PERL_ARGS_ASSERT_FOLDEQ_LATIN1 \ assert(a); assert(b) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE I32 Perl_foldEQ_locale(const char* a, const char* b, I32 len); #define PERL_ARGS_ASSERT_FOLDEQ_LOCALE \ assert(a); assert(b) +#endif /* PERL_CALLCONV I32 foldEQ_utf8(pTHX_ const char *s1, char **pe1, UV l1, bool u1, const char *s2, char **pe2, UV l2, bool u2); */ 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); #define PERL_ARGS_ASSERT_FOLDEQ_UTF8_FLAGS \ @@ -1346,15 +1370,19 @@ PERL_CALLCONV bool Perl_isIDFIRST_lazy(pTHX_ const char* p) __attribute__warn_unused_result__ __attribute__pure__; */ +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE bool S_is_c9strict_utf8_string(const U8 *s, const STRLEN len) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_IS_C9STRICT_UTF8_STRING \ assert(s) +#endif /* PERL_CALLCONV bool is_c9strict_utf8_string_loc(const U8 *s, const STRLEN len, const U8 **ep); */ +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE bool S_is_c9strict_utf8_string_loclen(const U8 *s, const STRLEN len, const U8 **ep, STRLEN *el); #define PERL_ARGS_ASSERT_IS_C9STRICT_UTF8_STRING_LOCLEN \ assert(s) +#endif /* PERL_CALLCONV bool Perl_is_invariant_string(const U8* const s, const STRLEN len) __attribute__warn_unused_result__ __attribute__pure__; */ @@ -1362,15 +1390,26 @@ PERL_STATIC_INLINE bool S_is_c9strict_utf8_string_loclen(const U8 *s, const STRL PERL_CALLCONV I32 Perl_is_lvalue_sub(pTHX) __attribute__warn_unused_result__; +#ifndef PERL_NO_INLINE_FUNCTIONS +PERL_STATIC_INLINE bool S_is_safe_syscall(pTHX_ const char *pv, STRLEN len, const char *what, const char *op_name) + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_IS_SAFE_SYSCALL \ + assert(pv); assert(what); assert(op_name) +#endif + +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE bool S_is_strict_utf8_string(const U8 *s, const STRLEN len) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_IS_STRICT_UTF8_STRING \ assert(s) +#endif /* PERL_CALLCONV bool is_strict_utf8_string_loc(const U8 *s, const STRLEN len, const U8 **ep); */ +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE bool S_is_strict_utf8_string_loclen(const U8 *s, const STRLEN len, const U8 **ep, STRLEN *el); #define PERL_ARGS_ASSERT_IS_STRICT_UTF8_STRING_LOCLEN \ assert(s) +#endif PERL_CALLCONV bool Perl_is_uni_alnum(pTHX_ UV c) __attribute__deprecated__ __attribute__warn_unused_result__; @@ -1555,9 +1594,11 @@ PERL_CALLCONV bool Perl_is_utf8_digit(pTHX_ const U8 *p) /* PERL_CALLCONV bool is_utf8_fixed_width_buf_flags(const U8 * const s, const STRLEN len, const U32 flags); */ /* PERL_CALLCONV bool is_utf8_fixed_width_buf_loc_flags(const U8 * const s, const STRLEN len, const U8 **ep, const U32 flags); */ +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE bool S_is_utf8_fixed_width_buf_loclen_flags(const U8 * const s, const STRLEN len, const U8 **ep, STRLEN *el, const U32 flags); #define PERL_ARGS_ASSERT_IS_UTF8_FIXED_WIDTH_BUF_LOCLEN_FLAGS \ assert(s) +#endif PERL_CALLCONV bool Perl_is_utf8_graph(pTHX_ const U8 *p) __attribute__deprecated__ __attribute__warn_unused_result__; @@ -1576,10 +1617,12 @@ PERL_CALLCONV bool Perl_is_utf8_idfirst(pTHX_ const U8 *p) #define PERL_ARGS_ASSERT_IS_UTF8_IDFIRST \ assert(p) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE bool S_is_utf8_invariant_string(const U8* const s, STRLEN const len) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_IS_UTF8_INVARIANT_STRING \ assert(s) +#endif PERL_CALLCONV bool Perl_is_utf8_lower(pTHX_ const U8 *p) __attribute__deprecated__ @@ -1629,15 +1672,19 @@ PERL_CALLCONV bool Perl_is_utf8_space(pTHX_ const U8 *p) #define PERL_ARGS_ASSERT_IS_UTF8_SPACE \ assert(p) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE bool Perl_is_utf8_string(const U8 *s, const STRLEN len) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_IS_UTF8_STRING \ assert(s) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE bool S_is_utf8_string_flags(const U8 *s, const STRLEN len, const U32 flags) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_IS_UTF8_STRING_FLAGS \ assert(s) +#endif #ifndef NO_MATHOMS PERL_CALLCONV bool Perl_is_utf8_string_loc(const U8 *s, const STRLEN len, const U8 **ep); @@ -1645,12 +1692,16 @@ PERL_CALLCONV bool Perl_is_utf8_string_loc(const U8 *s, const STRLEN len, const assert(s); assert(ep) #endif /* PERL_CALLCONV bool is_utf8_string_loc_flags(const U8 *s, const STRLEN len, const U8 **ep, const U32 flags); */ +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE bool Perl_is_utf8_string_loclen(const U8 *s, const STRLEN len, const U8 **ep, STRLEN *el); #define PERL_ARGS_ASSERT_IS_UTF8_STRING_LOCLEN \ assert(s) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE bool S_is_utf8_string_loclen_flags(const U8 *s, const STRLEN len, const U8 **ep, STRLEN *el, const U32 flags); #define PERL_ARGS_ASSERT_IS_UTF8_STRING_LOCLEN_FLAGS \ assert(s) +#endif PERL_CALLCONV bool Perl_is_utf8_upper(pTHX_ const U8 *p) __attribute__deprecated__ __attribute__warn_unused_result__; @@ -1661,10 +1712,12 @@ PERL_CALLCONV bool Perl_is_utf8_upper(pTHX_ const U8 *p) __attribute__warn_unused_result__ __attribute__pure__; */ +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE bool S_is_utf8_valid_partial_char_flags(const U8 * const s, const U8 * const e, const U32 flags) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_IS_UTF8_VALID_PARTIAL_CHAR_FLAGS \ assert(s); assert(e) +#endif PERL_CALLCONV bool Perl_is_utf8_xdigit(pTHX_ const U8 *p) __attribute__deprecated__ @@ -3152,6 +3205,11 @@ PERL_CALLCONV void Perl_sv_nounlocking(pTHX_ SV *sv); PERL_CALLCONV NV Perl_sv_nv(pTHX_ SV* sv); #define PERL_ARGS_ASSERT_SV_NV \ assert(sv) +#ifndef PERL_NO_INLINE_FUNCTIONS +PERL_STATIC_INLINE bool S_sv_only_taint_gmagic(SV *sv); +#define PERL_ARGS_ASSERT_SV_ONLY_TAINT_GMAGIC \ + assert(sv) +#endif PERL_CALLCONV char* Perl_sv_peek(pTHX_ SV* sv); PERL_CALLCONV void Perl_sv_pos_b2u(pTHX_ SV *const sv, I32 *const offsetp); #define PERL_ARGS_ASSERT_SV_POS_B2U \ @@ -3509,30 +3567,40 @@ PERL_CALLCONV U8* Perl_utf16_to_utf8(pTHX_ U8* p, U8 *d, I32 bytelen, I32 *newle PERL_CALLCONV U8* Perl_utf16_to_utf8_reversed(pTHX_ U8* p, U8 *d, I32 bytelen, I32 *newlen); #define PERL_ARGS_ASSERT_UTF16_TO_UTF8_REVERSED \ assert(p); assert(d); assert(newlen) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE IV Perl_utf8_distance(pTHX_ const U8 *a, const U8 *b) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_UTF8_DISTANCE \ assert(a); assert(b) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE U8* Perl_utf8_hop(const U8 *s, SSize_t off) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_UTF8_HOP \ assert(s) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE U8* Perl_utf8_hop_back(const U8 *s, SSize_t off, const U8 *start) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_UTF8_HOP_BACK \ assert(s); assert(start) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE U8* Perl_utf8_hop_forward(const U8 *s, SSize_t off, const U8 *end) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_UTF8_HOP_FORWARD \ assert(s); assert(end) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE U8* Perl_utf8_hop_safe(const U8 *s, SSize_t off, const U8 *start, const U8 *end) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_UTF8_HOP_SAFE \ assert(s); assert(start); assert(end) +#endif PERL_CALLCONV STRLEN Perl_utf8_length(pTHX_ const U8* s, const U8 *e) __attribute__warn_unused_result__ @@ -3584,10 +3652,12 @@ PERL_CALLCONV U8* Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv); PERL_CALLCONV U8* Perl_uvuni_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags); #define PERL_ARGS_ASSERT_UVUNI_TO_UTF8_FLAGS \ assert(d) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE UV Perl_valid_utf8_to_uvchr(const U8 *s, STRLEN *retlen) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_VALID_UTF8_TO_UVCHR \ assert(s) +#endif PERL_CALLCONV UV Perl_valid_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen) __attribute__deprecated__; @@ -3824,41 +3894,55 @@ STATIC PerlIO * S_doopen_pm(pTHX_ SV *name) STATIC void S__append_range_to_invlist(pTHX_ SV* const invlist, const UV start, const UV end); #define PERL_ARGS_ASSERT__APPEND_RANGE_TO_INVLIST \ assert(invlist) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE UV* S__invlist_array_init(SV* const invlist, const bool will_have_0) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT__INVLIST_ARRAY_INIT \ assert(invlist) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE IV* S_get_invlist_previous_index_addr(SV* invlist) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_GET_INVLIST_PREVIOUS_INDEX_ADDR \ assert(invlist) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_invlist_clear(pTHX_ SV* invlist); #define PERL_ARGS_ASSERT_INVLIST_CLEAR \ assert(invlist) +#endif STATIC void S_invlist_extend(pTHX_ SV* const invlist, const UV len); #define PERL_ARGS_ASSERT_INVLIST_EXTEND \ assert(invlist) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE UV S_invlist_max(SV* const invlist) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_INVLIST_MAX \ assert(invlist) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE IV S_invlist_previous_index(SV* const invlist) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_INVLIST_PREVIOUS_INDEX \ assert(invlist) +#endif STATIC void S_invlist_replace_list_destroys_src(pTHX_ SV *dest, SV *src); #define PERL_ARGS_ASSERT_INVLIST_REPLACE_LIST_DESTROYS_SRC \ assert(dest); assert(src) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_invlist_set_previous_index(SV* const invlist, const IV index); #define PERL_ARGS_ASSERT_INVLIST_SET_PREVIOUS_INDEX \ assert(invlist) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_invlist_trim(SV* invlist); #define PERL_ARGS_ASSERT_INVLIST_TRIM \ assert(invlist) +#endif # endif #endif #if !defined(PERL_IMPLICIT_SYS) @@ -3875,82 +3959,96 @@ STATIC SV * S_incpush_if_exists(pTHX_ AV *const av, SV *dir, SV *const stem); # endif #endif #if !defined(PERL_NO_INLINE_FUNCTIONS) -PERL_CALLCONV STRLEN Perl__is_utf8_char_helper(const U8 * const s, const U8 * e, const U32 flags) - __attribute__warn_unused_result__ - __attribute__pure__; -#define PERL_ARGS_ASSERT__IS_UTF8_CHAR_HELPER \ - assert(s); assert(e) - -PERL_STATIC_INLINE void S_append_utf8_from_native_byte(const U8 byte, U8** dest); -#define PERL_ARGS_ASSERT_APPEND_UTF8_FROM_NATIVE_BYTE \ - assert(dest) -PERL_STATIC_INLINE SSize_t S_av_top_index(pTHX_ AV *av) - __attribute__warn_unused_result__; -#define PERL_ARGS_ASSERT_AV_TOP_INDEX \ - assert(av) - +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_cx_popblock(pTHX_ PERL_CONTEXT *cx); #define PERL_ARGS_ASSERT_CX_POPBLOCK \ assert(cx) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_cx_popeval(pTHX_ PERL_CONTEXT *cx); #define PERL_ARGS_ASSERT_CX_POPEVAL \ assert(cx) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_cx_popformat(pTHX_ PERL_CONTEXT *cx); #define PERL_ARGS_ASSERT_CX_POPFORMAT \ assert(cx) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_cx_popgiven(pTHX_ PERL_CONTEXT *cx); #define PERL_ARGS_ASSERT_CX_POPGIVEN \ assert(cx) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_cx_poploop(pTHX_ PERL_CONTEXT *cx); #define PERL_ARGS_ASSERT_CX_POPLOOP \ assert(cx) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_cx_popsub(pTHX_ PERL_CONTEXT *cx); #define PERL_ARGS_ASSERT_CX_POPSUB \ assert(cx) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_cx_popsub_args(pTHX_ PERL_CONTEXT *cx); #define PERL_ARGS_ASSERT_CX_POPSUB_ARGS \ assert(cx) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_cx_popsub_common(pTHX_ PERL_CONTEXT *cx); #define PERL_ARGS_ASSERT_CX_POPSUB_COMMON \ assert(cx) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_cx_popwhen(pTHX_ PERL_CONTEXT *cx); #define PERL_ARGS_ASSERT_CX_POPWHEN \ assert(cx) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE PERL_CONTEXT * S_cx_pushblock(pTHX_ U8 type, U8 gimme, SV** sp, I32 saveix); #define PERL_ARGS_ASSERT_CX_PUSHBLOCK \ assert(sp) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_cx_pusheval(pTHX_ PERL_CONTEXT *cx, OP *retop, SV *namesv); #define PERL_ARGS_ASSERT_CX_PUSHEVAL \ assert(cx) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_cx_pushformat(pTHX_ PERL_CONTEXT *cx, CV *cv, OP *retop, GV *gv); #define PERL_ARGS_ASSERT_CX_PUSHFORMAT \ assert(cx); assert(cv) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_cx_pushgiven(pTHX_ PERL_CONTEXT *cx, SV *orig_defsv); #define PERL_ARGS_ASSERT_CX_PUSHGIVEN \ assert(cx) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_cx_pushloop_for(pTHX_ PERL_CONTEXT *cx, void *itervarp, SV *itersave); #define PERL_ARGS_ASSERT_CX_PUSHLOOP_FOR \ assert(cx); assert(itervarp) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_cx_pushloop_plain(pTHX_ PERL_CONTEXT *cx); #define PERL_ARGS_ASSERT_CX_PUSHLOOP_PLAIN \ assert(cx) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_cx_pushsub(pTHX_ PERL_CONTEXT *cx, CV *cv, OP *retop, bool hasargs); #define PERL_ARGS_ASSERT_CX_PUSHSUB \ assert(cx); assert(cv) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_cx_pushwhen(pTHX_ PERL_CONTEXT *cx); #define PERL_ARGS_ASSERT_CX_PUSHWHEN \ assert(cx) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_cx_topblock(pTHX_ PERL_CONTEXT *cx); #define PERL_ARGS_ASSERT_CX_TOPBLOCK \ assert(cx) -PERL_STATIC_INLINE bool S_is_safe_syscall(pTHX_ const char *pv, STRLEN len, const char *what, const char *op_name) - __attribute__warn_unused_result__; -#define PERL_ARGS_ASSERT_IS_SAFE_SYSCALL \ - assert(pv); assert(what); assert(op_name) - -PERL_STATIC_INLINE bool S_sv_only_taint_gmagic(SV *sv); -#define PERL_ARGS_ASSERT_SV_ONLY_TAINT_GMAGIC \ - assert(sv) +#endif #endif #if !defined(PERL_NO_UTF16_FILTER) # if defined(PERL_IN_TOKE_C) @@ -4166,10 +4264,12 @@ PERL_CALLCONV void Perl_opslab_free_nopad(pTHX_ OPSLAB *slab); PERL_CALLCONV void Perl_parser_free_nexttoke_ops(pTHX_ yy_parser *parser, OPSLAB *slab); #define PERL_ARGS_ASSERT_PARSER_FREE_NEXTTOKE_OPS \ assert(parser); assert(slab) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE bool S_should_warn_nl(const char *pv) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_SHOULD_WARN_NL \ assert(pv) +#endif # if defined(PERL_DEBUG_READONLY_OPS) PERL_CALLCONV void Perl_Slab_to_ro(pTHX_ OPSLAB *slab); @@ -4181,10 +4281,12 @@ PERL_CALLCONV void Perl_Slab_to_rw(pTHX_ OPSLAB *const slab); # endif #endif #if defined(PERL_CORE) || defined (PERL_EXT) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE STRLEN S_sv_or_pv_pos_u2b(pTHX_ SV *sv, const char *pv, STRLEN pos, STRLEN *lenp); #define PERL_ARGS_ASSERT_SV_OR_PV_POS_U2B \ assert(sv); assert(pv) #endif +#endif #if defined(PERL_CR_FILTER) # if defined(PERL_IN_TOKE_C) STATIC I32 S_cr_textfilter(pTHX_ int idx, SV *sv, int maxlen); @@ -4392,7 +4494,9 @@ PERL_CALLCONV void Perl_hv_kill_backrefs(pTHX_ HV *hv); STATIC bool S_find_default_stash(pTHX_ HV **stash, const char *name, STRLEN len, const U32 is_utf8, const I32 add, const svtype sv_type); #define PERL_ARGS_ASSERT_FIND_DEFAULT_STASH \ assert(stash); assert(name) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE GV* S_gv_fetchmeth_internal(pTHX_ HV* stash, SV* meth, const char* name, STRLEN len, I32 level, U32 flags); +#endif STATIC void S_gv_init_svtype(pTHX_ GV *gv, const svtype sv_type); #define PERL_ARGS_ASSERT_GV_INIT_SVTYPE \ assert(gv) @@ -4405,10 +4509,14 @@ STATIC bool S_gv_magicalize(pTHX_ GV *gv, HV *stash, const char *name, STRLEN le STATIC void S_gv_magicalize_isa(pTHX_ GV *gv); #define PERL_ARGS_ASSERT_GV_MAGICALIZE_ISA \ assert(gv) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE HV* S_gv_stashpvn_internal(pTHX_ const char* name, U32 namelen, I32 flags); #define PERL_ARGS_ASSERT_GV_STASHPVN_INTERNAL \ assert(name) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE HV* S_gv_stashsvpvn_cached(pTHX_ SV *namesv, const char* name, U32 namelen, I32 flags); +#endif STATIC void S_maybe_multimagic_gv(pTHX_ GV *gv, const char *name, const svtype sv_type); #define PERL_ARGS_ASSERT_MAYBE_MULTIMAGIC_GV \ assert(gv); assert(name) @@ -4455,7 +4563,9 @@ PERL_STATIC_NO_RET void S_hv_notallowed(pTHX_ int flags, const char *key, I32 kl STATIC HE* S_new_he(pTHX) __attribute__warn_unused_result__; +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE U32 S_ptr_hash(PTRV u); +#endif STATIC SV * S_refcounted_he_value(pTHX_ const struct refcounted_he *he); #define PERL_ARGS_ASSERT_REFCOUNTED_HE_VALUE \ assert(he) @@ -4587,7 +4697,9 @@ STATIC OP * S_my_kid(pTHX_ OP *o, OP *attrs, OP **imopsp); STATIC OP* S_newGIVWHENOP(pTHX_ OP* cond, OP *block, I32 enter_opcode, I32 leave_opcode, PADOFFSET entertarg); #define PERL_ARGS_ASSERT_NEWGIVWHENOP \ assert(block) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE OP* S_newMETHOP_internal(pTHX_ I32 type, I32 flags, OP* dynamic_meth, SV* const_meth); +#endif STATIC OP* S_new_logop(pTHX_ I32 type, I32 flags, OP **firstp, OP **otherp) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_NEW_LOGOP \ @@ -4601,12 +4713,16 @@ STATIC OP* S_no_fh_allowed(pTHX_ OP *o) #define PERL_ARGS_ASSERT_NO_FH_ALLOWED \ assert(o) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE OP* S_op_integerize(pTHX_ OP *o); #define PERL_ARGS_ASSERT_OP_INTEGERIZE \ assert(o) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE OP* S_op_std_init(pTHX_ OP *o); #define PERL_ARGS_ASSERT_OP_STD_INIT \ assert(o) +#endif STATIC OP* S_pmtrans(pTHX_ OP* o, OP* expr, OP* repl); #define PERL_ARGS_ASSERT_PMTRANS \ assert(o); assert(expr); assert(repl) @@ -4640,9 +4756,11 @@ STATIC OP* S_too_many_arguments_pv(pTHX_ OP *o, const char* name, U32 flags); #define PERL_ARGS_ASSERT_TOO_MANY_ARGUMENTS_PV \ assert(o); assert(name) # if defined(USE_ITHREADS) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_op_relocate_sv(pTHX_ SV** svp, PADOFFSET* targp); #define PERL_ARGS_ASSERT_OP_RELOCATE_SV \ assert(svp); assert(targp) +#endif # endif #endif #if defined(PERL_IN_OP_C) || defined(PERL_IN_SV_C) @@ -4777,10 +4895,12 @@ STATIC bool S_matcher_matches_sv(pTHX_ PMOP* matcher, SV* sv) STATIC bool S_num_overflow(NV value, I32 fldsize, I32 frcsize) __attribute__warn_unused_result__; +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE bool S_path_is_searchable(const char *name) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_PATH_IS_SEARCHABLE \ assert(name) +#endif STATIC I32 S_run_user_filter(pTHX_ int idx, SV *buf_sv, int maxlen) __attribute__warn_unused_result__; @@ -4801,10 +4921,12 @@ STATIC void S_save_lines(pTHX_ AV *array, SV *sv); STATIC void S_do_oddball(pTHX_ SV **oddkey, SV **firstkey); #define PERL_ARGS_ASSERT_DO_ODDBALL \ assert(oddkey); assert(firstkey) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE HV* S_opmethod_stash(pTHX_ SV* meth); #define PERL_ARGS_ASSERT_OPMETHOD_STASH \ assert(meth) #endif +#endif #if defined(PERL_IN_PP_PACK_C) STATIC int S_div128(pTHX_ SV *pnum, bool *done); #define PERL_ARGS_ASSERT_DIV128 \ @@ -4903,8 +5025,10 @@ STATIC SV* S__make_exactf_invlist(pTHX_ RExC_state_t *pRExC_state, regnode *node STATIC void S_add_above_Latin1_folds(pTHX_ RExC_state_t *pRExC_state, const U8 cp, SV** invlist); #define PERL_ARGS_ASSERT_ADD_ABOVE_LATIN1_FOLDS \ assert(pRExC_state); assert(invlist) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE SV* S_add_cp_to_invlist(pTHX_ SV* invlist, const UV cp) __attribute__warn_unused_result__; +#endif STATIC U32 S_add_data(RExC_state_t* const pRExC_state, const char* const s, const U32 n) __attribute__warn_unused_result__; @@ -4914,15 +5038,19 @@ STATIC U32 S_add_data(RExC_state_t* const pRExC_state, const char* const s, cons STATIC AV* S_add_multi_match(pTHX_ AV* multi_char_matches, SV* multi_string, const STRLEN cp_count); #define PERL_ARGS_ASSERT_ADD_MULTI_MATCH \ assert(multi_string) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_alloc_maybe_populate_EXACT(pTHX_ RExC_state_t *pRExC_state, regnode *node, I32 *flagp, STRLEN len, UV code_point, bool downgradable); #define PERL_ARGS_ASSERT_ALLOC_MAYBE_POPULATE_EXACT \ assert(pRExC_state); assert(node); assert(flagp) +#endif STATIC const char * S_cntrl_to_mnemonic(const U8 c) __attribute__warn_unused_result__; +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE U8 S_compute_EXACTish(RExC_state_t *pRExC_state); #define PERL_ARGS_ASSERT_COMPUTE_EXACTISH \ assert(pRExC_state) +#endif STATIC regnode * S_construct_ahocorasick_from_trie(pTHX_ RExC_state_t *pRExC_state, regnode *source, U32 depth); #define PERL_ARGS_ASSERT_CONSTRUCT_AHOCORASICK_FROM_TRIE \ assert(pRExC_state); assert(source) @@ -4934,57 +5062,73 @@ STATIC int S_edit_distance(const UV *src, const UV *tgt, const STRLEN x, const S STATIC SV* S_get_ANYOF_cp_list_for_ssc(pTHX_ const RExC_state_t *pRExC_state, const regnode_charclass* const node); #define PERL_ARGS_ASSERT_GET_ANYOF_CP_LIST_FOR_SSC \ assert(pRExC_state); assert(node) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE STRLEN* S_get_invlist_iter_addr(SV* invlist) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_GET_INVLIST_ITER_ADDR \ assert(invlist) +#endif STATIC bool S_grok_bslash_N(pTHX_ RExC_state_t *pRExC_state, regnode** nodep, UV *code_point_p, int* cp_count, I32 *flagp, const bool strict, const U32 depth); #define PERL_ARGS_ASSERT_GROK_BSLASH_N \ assert(pRExC_state); assert(flagp) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE regnode* S_handle_named_backref(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, char * parse_start, char ch); #define PERL_ARGS_ASSERT_HANDLE_NAMED_BACKREF \ assert(pRExC_state); assert(flagp); assert(parse_start) +#endif STATIC int S_handle_possible_posix(pTHX_ RExC_state_t *pRExC_state, const char* const s, char ** updated_parse_ptr, AV** posix_warnings, const bool check_only); #define PERL_ARGS_ASSERT_HANDLE_POSSIBLE_POSIX \ assert(pRExC_state); assert(s) STATIC regnode* S_handle_regex_sets(pTHX_ RExC_state_t *pRExC_state, SV ** return_invlist, I32 *flagp, U32 depth, char * const oregcomp_parse); #define PERL_ARGS_ASSERT_HANDLE_REGEX_SETS \ assert(pRExC_state); assert(flagp); assert(oregcomp_parse) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE SV* S_invlist_clone(pTHX_ SV* const invlist) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_INVLIST_CLONE \ assert(invlist) +#endif STATIC SV* S_invlist_contents(pTHX_ SV* const invlist, const bool traditional_style) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_INVLIST_CONTENTS \ assert(invlist) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE UV S_invlist_highest(SV* const invlist) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_INVLIST_HIGHEST \ assert(invlist) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE bool S_invlist_is_iterating(SV* const invlist) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_INVLIST_IS_ITERATING \ assert(invlist) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_invlist_iterfinish(SV* invlist); #define PERL_ARGS_ASSERT_INVLIST_ITERFINISH \ assert(invlist) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_invlist_iterinit(SV* invlist); #define PERL_ARGS_ASSERT_INVLIST_ITERINIT \ assert(invlist) +#endif STATIC bool S_invlist_iternext(SV* invlist, UV* start, UV* end) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_INVLIST_ITERNEXT \ assert(invlist); assert(start); assert(end) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_invlist_set_len(pTHX_ SV* const invlist, const UV len, const bool offset); #define PERL_ARGS_ASSERT_INVLIST_SET_LEN \ assert(invlist) +#endif STATIC bool S_is_ssc_worth_it(const RExC_state_t * pRExC_state, const regnode_ssc * ssc); #define PERL_ARGS_ASSERT_IS_SSC_WORTH_IT \ assert(pRExC_state); assert(ssc) @@ -5023,9 +5167,11 @@ STATIC regnode* S_reg_node(pTHX_ RExC_state_t *pRExC_state, U8 op); STATIC SV * S_reg_scan_name(pTHX_ RExC_state_t *pRExC_state, U32 flags); #define PERL_ARGS_ASSERT_REG_SCAN_NAME \ assert(pRExC_state) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE char * S_reg_skipcomment(RExC_state_t *pRExC_state, char * p); #define PERL_ARGS_ASSERT_REG_SKIPCOMMENT \ assert(pRExC_state); assert(p) +#endif STATIC regnode* S_reganode(pTHX_ RExC_state_t *pRExC_state, U8 op, U32 arg); #define PERL_ARGS_ASSERT_REGANODE \ assert(pRExC_state) @@ -5062,30 +5208,38 @@ STATIC void S_set_ANYOF_arg(pTHX_ RExC_state_t* const pRExC_state, regnode* cons STATIC void S_skip_to_be_ignored_text(pTHX_ RExC_state_t *pRExC_state, char ** p, const bool force_to_xmod); #define PERL_ARGS_ASSERT_SKIP_TO_BE_IGNORED_TEXT \ assert(pRExC_state); assert(p) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_ssc_add_range(pTHX_ regnode_ssc *ssc, UV const start, UV const end); #define PERL_ARGS_ASSERT_SSC_ADD_RANGE \ assert(ssc) +#endif STATIC void S_ssc_and(pTHX_ const RExC_state_t *pRExC_state, regnode_ssc *ssc, const regnode_charclass *and_with); #define PERL_ARGS_ASSERT_SSC_AND \ assert(pRExC_state); assert(ssc); assert(and_with) STATIC void S_ssc_anything(pTHX_ regnode_ssc *ssc); #define PERL_ARGS_ASSERT_SSC_ANYTHING \ assert(ssc) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_ssc_clear_locale(regnode_ssc *ssc); #define PERL_ARGS_ASSERT_SSC_CLEAR_LOCALE \ assert(ssc) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_ssc_cp_and(pTHX_ regnode_ssc *ssc, UV const cp); #define PERL_ARGS_ASSERT_SSC_CP_AND \ assert(ssc) +#endif STATIC void S_ssc_finalize(pTHX_ RExC_state_t *pRExC_state, regnode_ssc *ssc); #define PERL_ARGS_ASSERT_SSC_FINALIZE \ assert(pRExC_state); assert(ssc) STATIC void S_ssc_init(pTHX_ const RExC_state_t *pRExC_state, regnode_ssc *ssc); #define PERL_ARGS_ASSERT_SSC_INIT \ assert(pRExC_state); assert(ssc) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_ssc_intersection(pTHX_ regnode_ssc *ssc, SV* const invlist, const bool invert_2nd); #define PERL_ARGS_ASSERT_SSC_INTERSECTION \ assert(ssc); assert(invlist) +#endif STATIC int S_ssc_is_anything(const regnode_ssc *ssc) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_SSC_IS_ANYTHING \ @@ -5099,9 +5253,11 @@ STATIC int S_ssc_is_cp_posixl_init(const RExC_state_t *pRExC_state, const regnod STATIC void S_ssc_or(pTHX_ const RExC_state_t *pRExC_state, regnode_ssc *ssc, const regnode_charclass *or_with); #define PERL_ARGS_ASSERT_SSC_OR \ assert(pRExC_state); assert(ssc); assert(or_with) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_ssc_union(pTHX_ regnode_ssc *ssc, SV* const invlist, const bool invert_2nd); #define PERL_ARGS_ASSERT_SSC_UNION \ assert(ssc); assert(invlist) +#endif STATIC SSize_t S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, SSize_t *minlenp, SSize_t *deltap, regnode *last, struct scan_data_t *data, I32 stopparen, U32 recursed_depth, regnode_s ... [37 chars truncated] #define PERL_ARGS_ASSERT_STUDY_CHUNK \ assert(pRExC_state); assert(scanp); assert(minlenp); assert(deltap); assert(last) @@ -5139,15 +5295,19 @@ PERL_CALLCONV SV* Perl__get_swash_invlist(pTHX_ SV* const swash) #define PERL_ARGS_ASSERT__GET_SWASH_INVLIST \ assert(swash) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE bool S__invlist_contains_cp(SV* const invlist, const UV cp) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT__INVLIST_CONTAINS_CP \ assert(invlist) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE UV S__invlist_len(SV* const invlist) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT__INVLIST_LEN \ assert(invlist) +#endif PERL_CALLCONV SSize_t Perl__invlist_search(SV* const invlist, const UV cp) __attribute__warn_unused_result__; @@ -5159,15 +5319,19 @@ PERL_CALLCONV HV* Perl__swash_inversion_hash(pTHX_ SV* const swash) #define PERL_ARGS_ASSERT__SWASH_INVERSION_HASH \ assert(swash) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE bool* S_get_invlist_offset_addr(SV* invlist) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_GET_INVLIST_OFFSET_ADDR \ assert(invlist) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE UV* S_invlist_array(SV* const invlist) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_INVLIST_ARRAY \ assert(invlist) +#endif #endif #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C) || defined(PERL_IN_TOKE_C) @@ -5176,10 +5340,12 @@ PERL_CALLCONV SV* Perl__core_swash_init(pTHX_ const char* pkg, const char* name, assert(pkg); assert(name); assert(listsv) #endif #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C) || defined(PERL_IN_DQUOTE_C) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE char* S_form_short_octal_warning(pTHX_ const char * const s, const STRLEN len) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_FORM_SHORT_OCTAL_WARNING \ assert(s) +#endif PERL_CALLCONV char Perl_grok_bslash_c(pTHX_ const char source, const bool output_warning) __attribute__warn_unused_result__; @@ -5194,10 +5360,12 @@ PERL_CALLCONV bool Perl_grok_bslash_x(pTHX_ char** s, UV* uv, const char** error #define PERL_ARGS_ASSERT_GROK_BSLASH_X \ assert(s); assert(uv); assert(error_msg) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE I32 S_regcurly(const char *s) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_REGCURLY \ assert(s) +#endif #endif #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_UTF8_C) @@ -5439,9 +5607,11 @@ STATIC STRLEN S_sv_pos_u2b_forwards(const U8 *const start, const U8 *const send, STATIC STRLEN S_sv_pos_u2b_midway(const U8 *const start, const U8 *send, STRLEN uoffset, const STRLEN uend); #define PERL_ARGS_ASSERT_SV_POS_U2B_MIDWAY \ assert(start); assert(send) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void S_sv_unglob(pTHX_ SV *const sv, U32 flags); #define PERL_ARGS_ASSERT_SV_UNGLOB \ assert(sv) +#endif STATIC char * S_uiv_2buf(char *const buf, const IV iv, UV uv, const int is_uv, char **const peob) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_UIV_2BUF \ @@ -5631,35 +5801,47 @@ STATIC UV S_check_locale_boundary_crossing(pTHX_ const U8* const p, const UV res #define PERL_ARGS_ASSERT_CHECK_LOCALE_BOUNDARY_CROSSING \ assert(p); assert(ustrp); assert(lenp) +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE bool S_does_utf8_overflow(const U8 * const s, const U8 * e) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_DOES_UTF8_OVERFLOW \ assert(s); assert(e) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE bool S_isFF_OVERLONG(const U8 * const s, const STRLEN len) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_ISFF_OVERLONG \ assert(s) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE bool S_is_utf8_common(pTHX_ const U8 *const p, SV **swash, const char * const swashname, SV* const invlist) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_IS_UTF8_COMMON \ assert(p); assert(swash); assert(swashname) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE bool S_is_utf8_common_with_len(pTHX_ const U8 *const p, const U8 *const e, SV **swash, const char * const swashname, SV* const invlist) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_IS_UTF8_COMMON_WITH_LEN \ assert(p); assert(e); assert(swash); assert(swashname) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE bool S_is_utf8_cp_above_31_bits(const U8 * const s, const U8 * const e) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_IS_UTF8_CP_ABOVE_31_BITS \ assert(s); assert(e) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE bool S_is_utf8_overlong_given_start_byte_ok(const U8 * const s, const STRLEN len) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_IS_UTF8_OVERLONG_GIVEN_START_BYTE_OK \ assert(s) +#endif STATIC U8* S_swash_scan_list_line(pTHX_ U8* l, U8* const lend, UV* min, UV* max, UV* val, const bool wants_value, const U8* const typestr) __attribute__warn_unused_result__; diff --git a/regen/embed.pl b/regen/embed.pl index ea77ecb106..ed49f5fd5b 100755 --- a/regen/embed.pl +++ b/regen/embed.pl @@ -102,6 +102,7 @@ my ($embed, $core, $ext, $api) = setup_embed(); die_at_end "$plain_func: s flag is mutually exclusive from the i and p plags" if $flags =~ /s/ && $flags =~ /[ip]/; + my $static_inline = 0; if ($flags =~ /([si])/) { my $type; if ($never_returns) { @@ -112,6 +113,7 @@ my ($embed, $core, $ext, $api) = setup_embed(); } $retval = "$type $retval"; die_at_end "Don't declare static function '$plain_func' pure" if $flags =~ /P/; + $static_inline = $type eq 'PERL_STATIC_INLINE'; } else { if ($never_returns) { @@ -124,6 +126,7 @@ my ($embed, $core, $ext, $api) = setup_embed(); $func = full_name($plain_func, $flags); $ret = ""; $ret .= "#ifndef NO_MATHOMS\n" if $binarycompat; + $ret .= "#ifndef PERL_NO_INLINE_FUNCTIONS\n" if $static_inline; $ret .= "$retval\t$func("; if ( $has_context ) { $ret .= @args ? "pTHX_ " : "pTHX"; @@ -216,6 +219,7 @@ my ($embed, $core, $ext, $api) = setup_embed(); $ret .= "\n#define PERL_ARGS_ASSERT_\U$plain_func\E\t\\\n\t" . join '; ', map "assert($_)", @names_of_nn; } + $ret .= "\n#endif" if $static_inline; $ret .= "\n#endif" if $binarycompat; $ret .= @attrs ? "\n\n" : "\n"; -- Perl5 Master Repository
