Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doop.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ S_do_trans_count_invmap(pTHX_ SV * const sv, AV * const invmap)

/* Look the code point up in the data structure for this tr/// to get
* what it maps to */
i = _invlist_search(from_invlist, from);
i = invlist_search_(from_invlist, from);
assert(i >= 0);

if (map[i] != (UV) TR_UNLISTED) {
Expand Down Expand Up @@ -491,7 +491,7 @@ S_do_trans_invmap(pTHX_ SV * const sv, AV * const invmap)

/* Look the code point up in the data structure for this tr/// to get
* what it maps to */
i = _invlist_search(from_invlist, from);
i = invlist_search_(from_invlist, from);
assert(i >= 0);

to = map[i];
Expand Down
2 changes: 1 addition & 1 deletion dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -2444,7 +2444,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
if (type == SVt_INVLIST) {
PerlIO_printf(file, "\n");
/* 4 blanks indents 2 beyond the PV, etc */
_invlist_dump(file, level, " ", sv);
invlist_dump_(file, level, " ", sv);
}
else {
PerlIO_printf(file, "%s", pv_display_for_dump(d, ptr, SvCUR(sv),
Expand Down
34 changes: 17 additions & 17 deletions embed.fnc
Original file line number Diff line number Diff line change
Expand Up @@ -4389,11 +4389,11 @@ RS |Size_t |do_trans_simple|NN SV * const sv \
ERTi |bool * |get_invlist_offset_addr \
|NN SV *invlist
ERTi |UV * |invlist_array |NN SV * const invlist
ERTi |bool |_invlist_contains_cp \
ERTi |bool |invlist_contains_cp_ \
|NN SV * const invlist \
|const UV cp
ERTi |UV |_invlist_len |NN SV * const invlist
ERTXp |SSize_t|_invlist_search|NN SV * const invlist \
ERTi |UV |invlist_len_ |NN SV * const invlist
ERTXp |SSize_t|invlist_search_|NN SV * const invlist \
|const UV cp
ERTi |bool |is_invlist |NULLOK const SV * const invlist
#endif
Expand All @@ -4411,34 +4411,34 @@ Ei |void |invlist_set_len|NN SV * const invlist \
#endif
#if defined(PERL_IN_DOOP_C) || defined(PERL_IN_OP_C) || \
defined(PERL_IN_REGCOMP_ANY) || defined(PERL_IN_UTF8_C)
ERXp |SV * |_add_range_to_invlist \
ERXp |SV * |add_range_to_invlist_ \
|NULLOK SV *invlist \
|UV start \
|UV end
m |void |_invlist_intersection \
m |void |invlist_intersection_ \
|NN SV * const a \
|NN SV * const b \
|NN SV **i
EXp |void |_invlist_intersection_maybe_complement_2nd \
EXp |void |invlist_intersection_maybe_complement_2nd_ \
|NULLOK SV * const a \
|NN SV * const b \
|const bool complement_b \
|NN SV **i
EXp |void |_invlist_invert|NN SV * const invlist
m |void |_invlist_subtract \
EXp |void |invlist_invert_|NN SV * const invlist
m |void |invlist_subtract_ \
|NN SV * const a \
|NN SV * const b \
|NN SV **result
m |void |_invlist_union |NULLOK SV * const a \
m |void |invlist_union_ |NULLOK SV * const a \
|NN SV * const b \
|NN SV **output
EXp |void |_invlist_union_maybe_complement_2nd \
EXp |void |invlist_union_maybe_complement_2nd_ \
|NULLOK SV * const a \
|NN SV * const b \
|const bool complement_b \
|NN SV **output
ERXp |SV * |_new_invlist |IV initial_size
ERXp |SV * |_setup_canned_invlist \
ERXp |SV * |new_invlist_ |IV initial_size
ERXp |SV * |setup_canned_invlist_ \
|const STRLEN size \
|const UV element0 \
|NN UV **other_elements_ptr
Expand Down Expand Up @@ -4502,7 +4502,7 @@ opx |void |hv_kill_backrefs \
#endif
#if defined(PERL_IN_DUMP_C) || defined(PERL_IN_OP_C) || \
defined(PERL_IN_REGCOMP_ANY)
EXp |void |_invlist_dump |NN PerlIO *file \
EXp |void |invlist_dump_ |NN PerlIO *file \
|I32 level \
|NN const char * const indent \
|NN SV * const invlist
Expand Down Expand Up @@ -5123,10 +5123,10 @@ So |void |validate_suid |NN PerlIO *rsfp
#endif /* defined(PERL_IN_PERL_C) */
#if defined(PERL_IN_PERL_C) || defined(PERL_IN_REGCOMP_ANY) || \
defined(PERL_IN_UTF8_C)
EXp |bool |_invlistEQ |NN SV * const a \
EXp |bool |invlistEQ_ |NN SV * const a \
|NN SV * const b \
|const bool complement_b
ERXp |SV * |_new_invlist_C_array \
ERXp |SV * |new_invlist_C_array_ \
|NN const UV * const list
#endif
#if defined(PERL_IN_PP_C)
Expand Down Expand Up @@ -5659,7 +5659,7 @@ ES |void |regdump_intflags \
|const U32 flags
#endif
#if defined(PERL_IN_REGCOMP_INVLIST_C) && !defined(PERL_EXT_RE_BUILD)
ES |void |_append_range_to_invlist \
ES |void |append_range_to_invlist_ \
|NN SV * const invlist \
|const UV start \
|const UV end
Expand All @@ -5668,7 +5668,7 @@ ERTi |IV * |get_invlist_previous_index_addr \
S |void |initialize_invlist_guts \
|NN SV *invlist \
|const Size_t initial_size
ERTi |UV * |_invlist_array_init \
ERTi |UV * |invlist_array_init_ \
|NN SV * const invlist \
|const bool will_have_0
Ei |void |invlist_clear |NN SV *invlist
Expand Down
28 changes: 14 additions & 14 deletions embed.h
Original file line number Diff line number Diff line change
Expand Up @@ -1850,11 +1850,11 @@
defined(PERL_IN_PP_C) || defined(PERL_IN_REGCOMP_ANY) || \
defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_TOKE_C) || \
defined(PERL_IN_UTF8_C)
# define _invlist_contains_cp S__invlist_contains_cp
# define _invlist_len S__invlist_len
# define _invlist_search Perl__invlist_search
# define get_invlist_offset_addr S_get_invlist_offset_addr
# define invlist_array S_invlist_array
# define invlist_contains_cp_ S_invlist_contains_cp_
# define invlist_len_ S_invlist_len_
# define invlist_search_ Perl_invlist_search_
# define is_invlist S_is_invlist
# endif
# if defined(PERL_IN_DOOP_C) || defined(PERL_IN_OP_C) || \
Expand All @@ -1866,12 +1866,12 @@
# endif
# if defined(PERL_IN_DOOP_C) || defined(PERL_IN_OP_C) || \
defined(PERL_IN_REGCOMP_ANY) || defined(PERL_IN_UTF8_C)
# define _add_range_to_invlist(a,b,c) Perl__add_range_to_invlist(aTHX_ a,b,c)
# define _invlist_intersection_maybe_complement_2nd(a,b,c,d) Perl__invlist_intersection_maybe_complement_2nd(aTHX_ a,b,c,d)
# define _invlist_invert(a) Perl__invlist_invert(aTHX_ a)
# define _invlist_union_maybe_complement_2nd(a,b,c,d) Perl__invlist_union_maybe_complement_2nd(aTHX_ a,b,c,d)
# define _new_invlist(a) Perl__new_invlist(aTHX_ a)
# define _setup_canned_invlist(a,b,c) Perl__setup_canned_invlist(aTHX_ a,b,c)
# define add_range_to_invlist_(a,b,c) Perl_add_range_to_invlist_(aTHX_ a,b,c)
# define invlist_intersection_maybe_complement_2nd_(a,b,c,d) Perl_invlist_intersection_maybe_complement_2nd_(aTHX_ a,b,c,d)
# define invlist_invert_(a) Perl_invlist_invert_(aTHX_ a)
# define invlist_union_maybe_complement_2nd_(a,b,c,d) Perl_invlist_union_maybe_complement_2nd_(aTHX_ a,b,c,d)
# define new_invlist_(a) Perl_new_invlist_(aTHX_ a)
# define setup_canned_invlist_(a,b,c) Perl_setup_canned_invlist_(aTHX_ a,b,c)
# endif
# if defined(PERL_IN_DQUOTE_C) || defined(PERL_IN_REGCOMP_C) || \
defined(PERL_IN_TOKE_C)
Expand All @@ -1886,7 +1886,7 @@
# endif
# if defined(PERL_IN_DUMP_C) || defined(PERL_IN_OP_C) || \
defined(PERL_IN_REGCOMP_ANY)
# define _invlist_dump(a,b,c,d) Perl__invlist_dump(aTHX_ a,b,c,d)
# define invlist_dump_(a,b,c,d) Perl_invlist_dump_(aTHX_ a,b,c,d)
# endif
# if defined(PERL_IN_GV_C) || defined(PERL_IN_UNIVERSAL_C)
# define gv_stashsvpvn_cached(a,b,c,d) Perl_gv_stashsvpvn_cached(aTHX_ a,b,c,d)
Expand All @@ -1899,8 +1899,8 @@
# endif
# if defined(PERL_IN_PERL_C) || defined(PERL_IN_REGCOMP_ANY) || \
defined(PERL_IN_UTF8_C)
# define _invlistEQ(a,b,c) Perl__invlistEQ(aTHX_ a,b,c)
# define _new_invlist_C_array(a) Perl__new_invlist_C_array(aTHX_ a)
# define invlistEQ_(a,b,c) Perl_invlistEQ_(aTHX_ a,b,c)
# define new_invlist_C_array_(a) Perl_new_invlist_C_array_(aTHX_ a)
# endif
# if defined(PERL_IN_PP_C) || defined(PERL_IN_REGCOMP_ANY) || \
defined(PERL_IN_TOKE_C) || defined(PERL_IN_UNIVERSAL_C)
Expand Down Expand Up @@ -2006,9 +2006,9 @@
# define regdump_intflags(a,b) S_regdump_intflags(aTHX_ a,b)
# endif
# if defined(PERL_IN_REGCOMP_INVLIST_C) && !defined(PERL_EXT_RE_BUILD)
# define _append_range_to_invlist(a,b,c) S__append_range_to_invlist(aTHX_ a,b,c)
# define _invlist_array_init S__invlist_array_init
# define append_range_to_invlist_(a,b,c) S_append_range_to_invlist_(aTHX_ a,b,c)
# define get_invlist_previous_index_addr S_get_invlist_previous_index_addr
# define invlist_array_init_ S_invlist_array_init_
# define invlist_clear(a) S_invlist_clear(aTHX_ a)
# define invlist_max S_invlist_max
# define invlist_previous_index S_invlist_previous_index
Expand Down
22 changes: 11 additions & 11 deletions invlist_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ S_get_invlist_offset_addr(SV* invlist)
}

PERL_STATIC_INLINE UV
S__invlist_len(SV* const invlist)
S_invlist_len_(SV* const invlist)
{
/* Returns the current number of elements stored in the inversion list's
* array */

PERL_ARGS_ASSERT__INVLIST_LEN;
PERL_ARGS_ASSERT_INVLIST_LEN_;

assert(is_invlist(invlist));

Expand All @@ -60,13 +60,13 @@ S__invlist_len(SV* const invlist)
}

PERL_STATIC_INLINE bool
S__invlist_contains_cp(SV* const invlist, const UV cp)
S_invlist_contains_cp_(SV* const invlist, const UV cp)
{
/* Does <invlist> contain code point <cp> as part of the set? */

IV index = _invlist_search(invlist, cp);
IV index = invlist_search_(invlist, cp);

PERL_ARGS_ASSERT__INVLIST_CONTAINS_CP;
PERL_ARGS_ASSERT_INVLIST_CONTAINS_CP_;

return index >= 0 && ELEMENT_RANGE_MATCHES_INVLIST(index);
}
Expand All @@ -82,7 +82,7 @@ S_invlist_array(SV* const invlist)

/* Must not be empty. If these fail, you probably didn't check for <len>
* being non-zero before trying to get the array */
assert(_invlist_len(invlist));
assert(invlist_len_(invlist));

/* The very first element always contains zero, The array begins either
* there, or if the inversion list is offset, at the element after it.
Expand Down Expand Up @@ -128,7 +128,7 @@ S_invlist_set_len(pTHX_ SV* const invlist, const UV len, const bool offset)

PERL_STATIC_INLINE SV*
S_add_cp_to_invlist(pTHX_ SV* invlist, const UV cp) {
return _add_range_to_invlist(invlist, cp, cp);
return add_range_to_invlist_(invlist, cp, cp);
}

PERL_STATIC_INLINE UV
Expand All @@ -139,7 +139,7 @@ S_invlist_highest(SV* const invlist)
* 0, or if the list is empty. If this distinction matters to you, check
* for emptiness before calling this function */

UV len = _invlist_len(invlist);
UV len = invlist_len_(invlist);
UV *array;

PERL_ARGS_ASSERT_INVLIST_HIGHEST;
Expand Down Expand Up @@ -172,7 +172,7 @@ S_invlist_highest_range_start(SV* const invlist)
* distinction matters to you, check for emptiness before calling this
* function. */

UV len = _invlist_len(invlist);
UV len = invlist_len_(invlist);
UV *array;

PERL_ARGS_ASSERT_INVLIST_HIGHEST_RANGE_START;
Expand Down Expand Up @@ -249,7 +249,7 @@ S_invlist_iternext(SV* invlist, UV* start, UV* end)
* will start over at the beginning of the list */

STRLEN* pos = get_invlist_iter_addr(invlist);
UV len = _invlist_len(invlist);
UV len = invlist_len_(invlist);
UV *array;

PERL_ARGS_ASSERT_INVLIST_ITERNEXT;
Expand Down Expand Up @@ -356,7 +356,7 @@ S_invlist_lowest(SV* const invlist)
* 0, or if the list is empty. If this distinction matters to you, check
* for emptiness before calling this function */

UV len = _invlist_len(invlist);
UV len = invlist_len_(invlist);
UV *array;

PERL_ARGS_ASSERT_INVLIST_LOWEST;
Expand Down
16 changes: 8 additions & 8 deletions op.c
Original file line number Diff line number Diff line change
Expand Up @@ -6110,7 +6110,7 @@ Perl_invmap_dump(pTHX_ SV* invlist, UV *map)

const unsigned int indent = 4;

UV len = _invlist_len(invlist);
UV len = invlist_len_(invlist);
UV * array = invlist_array(invlist);

if (len == 0) {
Expand Down Expand Up @@ -6567,7 +6567,7 @@ S_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
* automatically keeps it sorted as we go along */
if (complement) {
UV start, end;
SV * inverted_tlist = _new_invlist(tlen);
SV * inverted_tlist = new_invlist_(tlen);
Size_t temp_len;

DEBUG_y(PerlIO_printf(Perl_debug_log,
Expand Down Expand Up @@ -6602,14 +6602,14 @@ S_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
t_cp_end = valid_utf8_to_uv(t, &t_char_len);
t += t_char_len;

inverted_tlist = _add_range_to_invlist(inverted_tlist,
inverted_tlist = add_range_to_invlist_(inverted_tlist,
t_cp, t_cp_end);
}
}
} /* End of parse through tstr */

/* The inversion list is done; now invert it */
_invlist_invert(inverted_tlist);
invlist_invert_(inverted_tlist);

/* Now go through the inverted list and create a new tstr for the rest
* of the routine to use. Since the UTF-8 version can have ranges, and
Expand Down Expand Up @@ -6657,10 +6657,10 @@ S_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
rstr_utf8 = tstr_utf8;
}

t_invlist = _new_invlist(1);
t_invlist = new_invlist_(1);

/* Initialize to a single range */
t_invlist = _add_range_to_invlist(t_invlist, 0, UV_MAX);
t_invlist = add_range_to_invlist_(t_invlist, 0, UV_MAX);

/* Below, we parse the (potentially adjusted) input, creating the inversion
* map. This is done in two passes. The first pass is just to determine
Expand Down Expand Up @@ -6695,7 +6695,7 @@ S_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
invmap_dump(t_invlist, r_map));

/* In the second pass, we start with a single range */
t_invlist = _add_range_to_invlist(t_invlist, 0, UV_MAX);
t_invlist = add_range_to_invlist_(t_invlist, 0, UV_MAX);
len = 1;
t_array = invlist_array(t_invlist);
}
Expand Down Expand Up @@ -6881,7 +6881,7 @@ S_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
* the return value is the index into the list's array of the range
* that contains <cp>, that is, 'i' such that
* array[i] <= cp < * array[i+1] */
j = _invlist_search(t_invlist, t_cp);
j = invlist_search_(t_invlist, t_cp);
assert(j >= 0);
i = j;

Expand Down
2 changes: 1 addition & 1 deletion pp.c
Original file line number Diff line number Diff line change
Expand Up @@ -4530,7 +4530,7 @@ PP_wrapped(pp_uc, 1, 0)
if (UNLIKELY(in_iota_subscript)) {
UV cp = utf8_to_uv_or_die(s, send, &this_len);

if (! _invlist_contains_cp(PL_utf8_mark, cp)) {
if (! invlist_contains_cp_(PL_utf8_mark, cp)) {

/* A non-mark. Time to output the iota subscript */
*d++ = UTF8_TWO_BYTE_HI(GREEK_CAPITAL_LETTER_IOTA);
Expand Down
Loading
Loading