summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2016-03-13 16:59:32 +0100
committerYves Orton <demerphq@gmail.com>2016-03-13 16:59:32 +0100
commit7b031478003366d219d13a53e4fb99eb5708defd (patch)
tree4bf03b4c816f29a9bead3a2c2c7d4fa22493c57b /regcomp.c
parent401a80220e9b38609f41611345e25c9956fd7157 (diff)
downloadperl-7b031478003366d219d13a53e4fb99eb5708defd.tar.gz
fixup definitions and usage of new re debugging subs
this should fix the smoke failures on threaded builds, also it renames re_indentfo which was a terrible name in the first place, and now what i have had to strip the Perl_prefixes from these subs with a perl -i -pe, I took the opportunity to rename it to re_exec_indent, which self documents much better.
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c376
1 files changed, 188 insertions, 188 deletions
diff --git a/regcomp.c b/regcomp.c
index 64a8021751..1ee06ed891 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -900,7 +900,7 @@ static const scan_data_t zero_scan_data =
#ifdef DEBUGGING
int
-Perl_re_printf(const char *fmt, ...)
+re_printf(pTHX_ const char *fmt, ...)
{
va_list ap;
int result;
@@ -913,7 +913,7 @@ Perl_re_printf(const char *fmt, ...)
}
int
-Perl_re_indentf(const char *fmt, U32 depth, ...)
+Perl_re_indentf(pTHX_ const char *fmt, U32 depth, ...)
{
va_list ap;
int result;
@@ -927,49 +927,49 @@ Perl_re_indentf(const char *fmt, U32 depth, ...)
}
#endif /* DEBUGGING */
-#define DEBUG_RExC_seen() \
+#define DEBUG_RExC_seen() \
DEBUG_OPTIMISE_MORE_r({ \
- Perl_re_printf("RExC_seen: "); \
+ re_printf("RExC_seen: "); \
\
if (RExC_seen & REG_ZERO_LEN_SEEN) \
- Perl_re_printf("REG_ZERO_LEN_SEEN "); \
+ re_printf("REG_ZERO_LEN_SEEN "); \
\
if (RExC_seen & REG_LOOKBEHIND_SEEN) \
- Perl_re_printf("REG_LOOKBEHIND_SEEN "); \
+ re_printf("REG_LOOKBEHIND_SEEN "); \
\
if (RExC_seen & REG_GPOS_SEEN) \
- Perl_re_printf("REG_GPOS_SEEN "); \
+ re_printf("REG_GPOS_SEEN "); \
\
if (RExC_seen & REG_RECURSE_SEEN) \
- Perl_re_printf("REG_RECURSE_SEEN "); \
+ re_printf("REG_RECURSE_SEEN "); \
\
- if (RExC_seen & REG_TOP_LEVEL_BRANCHES_SEEN) \
- Perl_re_printf("REG_TOP_LEVEL_BRANCHES_SEEN "); \
+ if (RExC_seen & REG_TOP_LEVEL_BRANCHES_SEEN) \
+ re_printf("REG_TOP_LEVEL_BRANCHES_SEEN "); \
\
if (RExC_seen & REG_VERBARG_SEEN) \
- Perl_re_printf("REG_VERBARG_SEEN "); \
+ re_printf("REG_VERBARG_SEEN "); \
\
if (RExC_seen & REG_CUTGROUP_SEEN) \
- Perl_re_printf("REG_CUTGROUP_SEEN "); \
+ re_printf("REG_CUTGROUP_SEEN "); \
\
if (RExC_seen & REG_RUN_ON_COMMENT_SEEN) \
- Perl_re_printf("REG_RUN_ON_COMMENT_SEEN "); \
+ re_printf("REG_RUN_ON_COMMENT_SEEN "); \
\
if (RExC_seen & REG_UNFOLDED_MULTI_SEEN) \
- Perl_re_printf("REG_UNFOLDED_MULTI_SEEN "); \
+ re_printf("REG_UNFOLDED_MULTI_SEEN "); \
\
- if (RExC_seen & REG_UNBOUNDED_QUANTIFIER_SEEN) \
- Perl_re_printf("REG_UNBOUNDED_QUANTIFIER_SEEN "); \
+ if (RExC_seen & REG_UNBOUNDED_QUANTIFIER_SEEN) \
+ re_printf("REG_UNBOUNDED_QUANTIFIER_SEEN "); \
\
- Perl_re_printf("\n"); \
+ re_printf("\n"); \
});
#define DEBUG_SHOW_STUDY_FLAG(flags,flag) \
- if ((flags) & flag) Perl_re_printf( "%s ", #flag)
+ if ((flags) & flag) re_printf( "%s ", #flag)
#define DEBUG_SHOW_STUDY_FLAGS(flags,open_str,close_str) \
if ( ( flags ) ) { \
- Perl_re_printf( "%s", open_str); \
+ re_printf( "%s", open_str); \
DEBUG_SHOW_STUDY_FLAG(flags,SF_FL_BEFORE_SEOL); \
DEBUG_SHOW_STUDY_FLAG(flags,SF_FL_BEFORE_MEOL); \
DEBUG_SHOW_STUDY_FLAG(flags,SF_IS_INF); \
@@ -985,28 +985,28 @@ Perl_re_indentf(const char *fmt, U32 depth, ...)
DEBUG_SHOW_STUDY_FLAG(flags,SCF_SEEN_ACCEPT); \
DEBUG_SHOW_STUDY_FLAG(flags,SCF_TRIE_DOING_RESTUDY); \
DEBUG_SHOW_STUDY_FLAG(flags,SCF_IN_DEFINE); \
- Perl_re_printf( "%s", close_str); \
+ re_printf( "%s", close_str); \
}
#define DEBUG_STUDYDATA(str,data,depth) \
DEBUG_OPTIMISE_MORE_r(if(data){ \
- Perl_re_indentf( "" str "Pos:%"IVdf"/%"IVdf \
+ re_indentf( "" str "Pos:%"IVdf"/%"IVdf \
" Flags: 0x%"UVXf, \
- depth, \
+ depth, \
(IV)((data)->pos_min), \
(IV)((data)->pos_delta), \
(UV)((data)->flags) \
); \
DEBUG_SHOW_STUDY_FLAGS((data)->flags," [ ","]"); \
- Perl_re_printf( \
+ re_printf( \
" Whilem_c: %"IVdf" Lcp: %"IVdf" %s", \
(IV)((data)->whilem_c), \
(IV)((data)->last_closep ? *((data)->last_closep) : -1), \
is_inf ? "INF " : "" \
); \
if ((data)->last_found) \
- Perl_re_printf( \
+ re_printf( \
"Last:'%s' %"IVdf":%"IVdf"/%"IVdf" %sFixed:'%s' @ %"IVdf \
" %sFloat: '%s' @ %"IVdf"/%"IVdf"", \
SvPVX_const((data)->last_found), \
@@ -1023,7 +1023,7 @@ DEBUG_OPTIMISE_MORE_r(if(data){ \
(IV)((data)->offset_float_min), \
(IV)((data)->offset_float_max) \
); \
- Perl_re_printf("\n"); \
+ re_printf("\n"); \
});
@@ -1977,14 +1977,14 @@ S_dump_trie(pTHX_ const struct _reg_trie_data *trie, HV *widecharmap,
PERL_ARGS_ASSERT_DUMP_TRIE;
- Perl_re_indentf( "Char : %-6s%-6s%-4s ",
+ re_indentf( "Char : %-6s%-6s%-4s ",
depth+1,
"Match","Base","Ofs" );
for( state = 0 ; state < trie->uniquecharcount ; state++ ) {
SV ** const tmp = av_fetch( revcharmap, state, 0);
if ( tmp ) {
- Perl_re_printf( "%*s",
+ re_printf( "%*s",
colwidth,
pv_pretty(sv, SvPV_nolen_const(*tmp), SvCUR(*tmp), colwidth,
PL_colors[0], PL_colors[1],
@@ -1994,27 +1994,27 @@ S_dump_trie(pTHX_ const struct _reg_trie_data *trie, HV *widecharmap,
);
}
}
- Perl_re_printf( "\n%*sState|-----------------------",
+ re_printf( "\n%*sState|-----------------------",
depth+1);
for( state = 0 ; state < trie->uniquecharcount ; state++ )
- Perl_re_printf( "%.*s", colwidth, "--------");
- Perl_re_printf( "\n");
+ re_printf( "%.*s", colwidth, "--------");
+ re_printf( "\n");
for( state = 1 ; state < trie->statecount ; state++ ) {
const U32 base = trie->states[ state ].trans.base;
- Perl_re_indentf( "#%4"UVXf"|",
+ re_indentf( "#%4"UVXf"|",
depth+1, (UV)state);
if ( trie->states[ state ].wordnum ) {
- Perl_re_printf( " W%4X",
+ re_printf( " W%4X",
trie->states[ state ].wordnum );
} else {
- Perl_re_printf( "%6s", "" );
+ re_printf( "%6s", "" );
}
- Perl_re_printf( " @%4"UVXf" ", (UV)base );
+ re_printf( " @%4"UVXf" ", (UV)base );
if ( base ) {
U32 ofs = 0;
@@ -2025,7 +2025,7 @@ S_dump_trie(pTHX_ const struct _reg_trie_data *trie, HV *widecharmap,
!= state))
ofs++;
- Perl_re_printf( "+%2"UVXf"[ ", (UV)ofs);
+ re_printf( "+%2"UVXf"[ ", (UV)ofs);
for ( ofs = 0 ; ofs < trie->uniquecharcount ; ofs++ ) {
if ( ( base + ofs >= trie->uniquecharcount )
@@ -2034,28 +2034,28 @@ S_dump_trie(pTHX_ const struct _reg_trie_data *trie, HV *widecharmap,
&& trie->trans[ base + ofs
- trie->uniquecharcount ].check == state )
{
- Perl_re_printf( "%*"UVXf,
+ re_printf( "%*"UVXf,
colwidth,
(UV)trie->trans[ base + ofs
- trie->uniquecharcount ].next );
} else {
- Perl_re_printf( "%*s",colwidth," ." );
+ re_printf( "%*s",colwidth," ." );
}
}
- Perl_re_printf( "]");
+ re_printf( "]");
}
- Perl_re_printf( "\n" );
+ re_printf( "\n" );
}
- Perl_re_indentf( "word_info N:(prev,len)=",
+ re_indentf( "word_info N:(prev,len)=",
depth);
for (word=1; word <= trie->wordcount; word++) {
- Perl_re_printf( " %d:(%d,%d)",
+ re_printf( " %d:(%d,%d)",
(int)word, (int)(trie->wordinfo[word].prev),
(int)(trie->wordinfo[word].len));
}
- Perl_re_printf( "\n" );
+ re_printf( "\n" );
}
/*
Dumps a fully constructed but uncompressed trie in list form.
@@ -2076,20 +2076,20 @@ S_dump_trie_interim_list(pTHX_ const struct _reg_trie_data *trie,
PERL_ARGS_ASSERT_DUMP_TRIE_INTERIM_LIST;
/* print out the table precompression. */
- Perl_re_indentf( "State :Word | Transition Data\n",
+ re_indentf( "State :Word | Transition Data\n",
depth+1 );
- Perl_re_indentf( "%s",
+ re_indentf( "%s",
depth+1, "------:-----+-----------------\n" );
for( state=1 ; state < next_alloc ; state ++ ) {
U16 charid;
- Perl_re_indentf( " %4"UVXf" :",
+ re_indentf( " %4"UVXf" :",
depth+1, (UV)state );
if ( ! trie->states[ state ].wordnum ) {
- Perl_re_printf( "%5s| ","");
+ re_printf( "%5s| ","");
} else {
- Perl_re_printf( "W%4x| ",
+ re_printf( "W%4x| ",
trie->states[ state ].wordnum
);
}
@@ -2097,7 +2097,7 @@ S_dump_trie_interim_list(pTHX_ const struct _reg_trie_data *trie,
SV ** const tmp = av_fetch( revcharmap,
TRIE_LIST_ITEM(state,charid).forid, 0);
if ( tmp ) {
- Perl_re_printf( "%*s:%3X=%4"UVXf" | ",
+ re_printf( "%*s:%3X=%4"UVXf" | ",
colwidth,
pv_pretty(sv, SvPV_nolen_const(*tmp), SvCUR(*tmp),
colwidth,
@@ -2109,11 +2109,11 @@ S_dump_trie_interim_list(pTHX_ const struct _reg_trie_data *trie,
(UV)TRIE_LIST_ITEM(state,charid).newstate
);
if (!(charid % 10))
- Perl_re_printf( "\n%*s| ",
+ re_printf( "\n%*s| ",
(int)((depth * 2) + 14), "");
}
}
- Perl_re_printf( "\n");
+ re_printf( "\n");
}
}
@@ -2141,12 +2141,12 @@ S_dump_trie_interim_table(pTHX_ const struct _reg_trie_data *trie,
that they are identical.
*/
- Perl_re_indentf( "Char : ", depth+1 );
+ re_indentf( "Char : ", depth+1 );
for( charid = 0 ; charid < trie->uniquecharcount ; charid++ ) {
SV ** const tmp = av_fetch( revcharmap, charid, 0);
if ( tmp ) {
- Perl_re_printf( "%*s",
+ re_printf( "%*s",
colwidth,
pv_pretty(sv, SvPV_nolen_const(*tmp), SvCUR(*tmp), colwidth,
PL_colors[0], PL_colors[1],
@@ -2157,32 +2157,32 @@ S_dump_trie_interim_table(pTHX_ const struct _reg_trie_data *trie,
}
}
- Perl_re_printf( "\n%*sState+-",depth+1 );
+ re_printf( "\n%*sState+-",depth+1 );
for( charid=0 ; charid < trie->uniquecharcount ; charid++ ) {
- Perl_re_printf( "%.*s", colwidth,"--------");
+ re_printf( "%.*s", colwidth,"--------");
}
- Perl_re_printf( "\n" );
+ re_printf( "\n" );
for( state=1 ; state < next_alloc ; state += trie->uniquecharcount ) {
- Perl_re_indentf( "%4"UVXf" : ",
+ re_indentf( "%4"UVXf" : ",
depth+1,
(UV)TRIE_NODENUM( state ) );
for( charid = 0 ; charid < trie->uniquecharcount ; charid++ ) {
UV v=(UV)SAFE_TRIE_NODENUM( trie->trans[ state + charid ].next );
if (v)
- Perl_re_printf( "%*"UVXf, colwidth, v );
+ re_printf( "%*"UVXf, colwidth, v );
else
- Perl_re_printf( "%*s", colwidth, "." );
+ re_printf( "%*s", colwidth, "." );
}
if ( ! trie->states[ TRIE_NODENUM( state ) ].wordnum ) {
- Perl_re_printf( " (%4"UVXf")\n",
+ re_printf( " (%4"UVXf")\n",
(UV)trie->trans[ state ].check );
} else {
- Perl_re_printf( " (%4"UVXf") W%4X\n",
+ re_printf( " (%4"UVXf") W%4X\n",
(UV)trie->trans[ state ].check,
trie->states[ TRIE_NODENUM( state ) ].wordnum );
}
@@ -2494,7 +2494,7 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch,
sv_setiv(re_trie_maxbuff, RE_TRIE_MAXBUF_INIT);
}
DEBUG_TRIE_COMPILE_r({
- Perl_re_indentf(
+ re_indentf(
"make_trie start==%d, first==%d, last==%d, tail==%d depth=%d\n",
depth+1,
REG_NODE_NUM(startbranch),REG_NODE_NUM(first),
@@ -2701,7 +2701,7 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch,
}
} /* end first pass */
DEBUG_TRIE_COMPILE_r(
- Perl_re_indentf(
+ re_indentf(
"TRIE(%s): W:%d C:%d Uq:%d Min:%d Max:%d\n",
depth+1,
( widecharmap ? "UTF8" : "NATIVE" ), (int)word_count,
@@ -2751,7 +2751,7 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch,
STRLEN transcount = 1;
- DEBUG_TRIE_COMPILE_MORE_r( Perl_re_indentf( "Compiling trie using list compiler\n",
+ DEBUG_TRIE_COMPILE_MORE_r( re_indentf( "Compiling trie using list compiler\n",
depth+1));
trie->states = (reg_trie_state *)
@@ -2858,7 +2858,7 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch,
/*
DEBUG_TRIE_COMPILE_MORE_r(
- Perl_re_printf( "tp: %d zp: %d ",tp,zp)
+ re_printf( "tp: %d zp: %d ",tp,zp)
);
*/
@@ -2920,7 +2920,7 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch,
}
/*
DEBUG_TRIE_COMPILE_MORE_r(
- Perl_re_printf( " base: %d\n",base);
+ re_printf( " base: %d\n",base);
);
*/
trie->states[ state ].trans.base=base;
@@ -2963,7 +2963,7 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch,
we have to use TRIE_NODENUM() to convert.
*/
- DEBUG_TRIE_COMPILE_MORE_r( Perl_re_indentf( "Compiling trie using table compiler\n",
+ DEBUG_TRIE_COMPILE_MORE_r( re_indentf( "Compiling trie using table compiler\n",
depth+1));
trie->trans = (reg_trie_trans *)
@@ -3154,7 +3154,7 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch,
PerlMemShared_realloc( trie->states, laststate
* sizeof(reg_trie_state) );
DEBUG_TRIE_COMPILE_MORE_r(
- Perl_re_indentf( "Alloc: %d Orig: %"IVdf" elements, Final:%"IVdf". Savings of %%%5.2f\n",
+ re_indentf( "Alloc: %d Orig: %"IVdf" elements, Final:%"IVdf". Savings of %%%5.2f\n",
depth+1,
(int)( ( TRIE_CHARCOUNT(trie) + 1 ) * trie->uniquecharcount
+ 1 ),
@@ -3166,7 +3166,7 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch,
} /* end table compress */
}
DEBUG_TRIE_COMPILE_MORE_r(
- Perl_re_indentf( "Statecount:%"UVxf" Lasttrans:%"UVxf"\n",
+ re_indentf( "Statecount:%"UVxf" Lasttrans:%"UVxf"\n",
depth+1,
(UV)trie->statecount,
(UV)trie->lasttrans)
@@ -3217,7 +3217,7 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch,
});
}
DEBUG_OPTIMISE_r(
- Perl_re_indentf( "MJD offset:%"UVuf" MJD length:%"UVuf"\n",
+ re_indentf( "MJD offset:%"UVuf" MJD length:%"UVuf"\n",
depth+1,
(UV)mjd_offset, (UV)mjd_nodelen)
);
@@ -3248,7 +3248,7 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch,
if ( count == 2 ) {
Zero(trie->bitmap, ANYOF_BITMAP_SIZE, char);
DEBUG_OPTIMISE_r(
- Perl_re_indentf( "New Start State=%"UVuf" Class: [",
+ re_indentf( "New Start State=%"UVuf" Class: [",
depth+1,
(UV)state));
if (idx >= 0) {
@@ -3259,14 +3259,14 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch,
if ( folder )
TRIE_BITMAP_SET(trie, folder[ *ch ]);
DEBUG_OPTIMISE_r(
- Perl_re_printf( "%s", (char*)ch)
+ re_printf( "%s", (char*)ch)
);
}
}
TRIE_BITMAP_SET(trie,*ch);
if ( folder )
TRIE_BITMAP_SET(trie,folder[ *ch ]);
- DEBUG_OPTIMISE_r(Perl_re_printf("%s", ch));
+ DEBUG_OPTIMISE_r(re_printf("%s", ch));
}
idx = ofs;
}
@@ -3277,7 +3277,7 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch,
char *ch = SvPV( *tmp, len );
DEBUG_OPTIMISE_r({
SV *sv=sv_newmortal();
- Perl_re_indentf( "Prefix State: %"UVuf" Idx:%"UVuf" Char='%s'\n",
+ re_indentf( "Prefix State: %"UVuf" Idx:%"UVuf" Char='%s'\n",
depth+1,
(UV)state, (UV)idx,
pv_pretty(sv, SvPV_nolen_const(*tmp), SvCUR(*tmp), 6,
@@ -3298,7 +3298,7 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch,
} else {
#ifdef DEBUGGING
if (state>1)
- DEBUG_OPTIMISE_r(Perl_re_printf("]\n"));
+ DEBUG_OPTIMISE_r(re_printf("]\n"));
#endif
break;
}
@@ -3570,13 +3570,13 @@ S_construct_ahocorasick_from_trie(pTHX_ RExC_state_t *pRExC_state, regnode *sour
*/
fail[ 0 ] = fail[ 1 ] = 0;
DEBUG_TRIE_COMPILE_r({
- Perl_re_indentf( "Stclass Failtable (%"UVuf" states): 0",
+ re_indentf( "Stclass Failtable (%"UVuf" states): 0",
depth, (UV)numstates
);
for( q_read=1; q_read<numstates; q_read++ ) {
- Perl_re_printf( ", %"UVuf, (UV)fail[q_read]);
+ re_printf( ", %"UVuf, (UV)fail[q_read]);
}
- Perl_re_printf( "\n");
+ re_printf( "\n");
});
Safefree(q);
/*RExC_seen |= REG_TRIEDFA_SEEN;*/
@@ -3584,15 +3584,15 @@ S_construct_ahocorasick_from_trie(pTHX_ RExC_state_t *pRExC_state, regnode *sour
}
-#define DEBUG_PEEP(str,scan,depth) \
- DEBUG_OPTIMISE_r({if (scan){ \
- regnode *Next = regnext(scan); \
- regprop(RExC_rx, RExC_mysv, scan, NULL, pRExC_state); \
- Perl_re_indentf( "" str ">%3d: %s (%d)", \
+#define DEBUG_PEEP(str,scan,depth) \
+ DEBUG_OPTIMISE_r({if (scan){ \
+ regnode *Next = regnext(scan); \
+ regprop(RExC_rx, RExC_mysv, scan, NULL, pRExC_state);\
+ re_indentf( "" str ">%3d: %s (%d)", \
depth, REG_NODE_NUM(scan), SvPV_nolen_const(RExC_mysv),\
- Next ? (REG_NODE_NUM(Next)) : 0 ); \
+ Next ? (REG_NODE_NUM(Next)) : 0 );\
DEBUG_SHOW_STUDY_FLAGS(flags," [ ","]");\
- Perl_re_printf( "\n"); \
+ re_printf( "\n"); \
}});
/* The below joins as many adjacent EXACTish nodes as possible into a single
@@ -4106,7 +4106,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
);
DEBUG_OPTIMISE_MORE_r(
{
- Perl_re_indentf( "study_chunk stopparen=%ld recursed_count=%lu depth=%lu recursed_depth=%lu scan=%p last=%p",
+ re_indentf( "study_chunk stopparen=%ld recursed_count=%lu depth=%lu recursed_depth=%lu scan=%p last=%p",
depth, (long)stopparen,
(unsigned long)RExC_study_chunk_recursed_count,
(unsigned long)depth, (unsigned long)recursed_depth,
@@ -4126,16 +4126,16 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
(( j - 1 ) * RExC_study_chunk_recursed_bytes), i)
)
) {
- Perl_re_printf(" %d",(int)i);
+ re_printf(" %d",(int)i);
break;
}
}
if ( j + 1 < recursed_depth ) {
- Perl_re_printf( ",");
+ re_printf( ",");
}
}
}
- Perl_re_printf("\n");
+ re_printf("\n");
}
);
while ( scan && OP(scan) != END && scan < last ){
@@ -4411,7 +4411,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
DEBUG_TRIE_COMPILE_r({
regprop(RExC_rx, RExC_mysv, tail, NULL, pRExC_state);
- Perl_re_indentf( "%s %"UVuf":%s\n",
+ re_indentf( "%s %"UVuf":%s\n",
depth+1,
"Looking for TRIE'able sequences. Tail node is ",
(UV)(tail - RExC_emit_start),
@@ -4503,20 +4503,20 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
DEBUG_TRIE_COMPILE_r({
regprop(RExC_rx, RExC_mysv, cur, NULL, pRExC_state);
- Perl_re_indentf( "- %d:%s (%d)",
+ re_indentf( "- %d:%s (%d)",
depth+1,
REG_NODE_NUM(cur), SvPV_nolen_const( RExC_mysv ), REG_NODE_NUM(cur) );
regprop(RExC_rx, RExC_mysv, noper, NULL, pRExC_state);
- Perl_re_printf( " -> %d:%s",
+ re_printf( " -> %d:%s",
REG_NODE_NUM(noper), SvPV_nolen_const(RExC_mysv));
if ( noper_next ) {
regprop(RExC_rx, RExC_mysv, noper_next, NULL, pRExC_state);
- Perl_re_printf("\t=> %d:%s\t",
+ re_printf("\t=> %d:%s\t",
REG_NODE_NUM(noper_next), SvPV_nolen_const(RExC_mysv));
}
- Perl_re_printf( "(First==%d,Last==%d,Cur==%d,tt==%s,ntt==%s,nntt==%s)\n",
+ re_printf( "(First==%d,Last==%d,Cur==%d,tt==%s,ntt==%s,nntt==%s)\n",
REG_NODE_NUM(first), REG_NODE_NUM(last), REG_NODE_NUM(cur),
PL_reg_name[trietype], PL_reg_name[noper_trietype], PL_reg_name[noper_next_trietype]
);
@@ -4612,9 +4612,9 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
} /* loop over branches */
DEBUG_TRIE_COMPILE_r({
regprop(RExC_rx, RExC_mysv, cur, NULL, pRExC_state);
- Perl_re_indentf( "- %s (%d) <SCAN FINISHED> ",
+ re_indentf( "- %s (%d) <SCAN FINISHED> ",
depth+1, SvPV_nolen_const( RExC_mysv ),REG_NODE_NUM(cur));
- Perl_re_printf( "(First==%d, Last==%d, Cur==%d, tt==%s)\n",
+ re_printf( "(First==%d, Last==%d, Cur==%d, tt==%s)\n",
REG_NODE_NUM(first), REG_NODE_NUM(last), REG_NODE_NUM(cur),
PL_reg_name[trietype]
);
@@ -4654,7 +4654,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
* turn it into a plain NOTHING op. */
DEBUG_TRIE_COMPILE_r({
regprop(RExC_rx, RExC_mysv, cur, NULL, pRExC_state);
- Perl_re_indentf( "- %s (%d) <NOTHING BRANCH SEQUENCE>\n",
+ re_indentf( "- %s (%d) <NOTHING BRANCH SEQUENCE>\n",
depth+1,
SvPV_nolen_const( RExC_mysv ),REG_NODE_NUM(cur));
@@ -5244,13 +5244,13 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
/* It is counted once already... */
data->pos_min += minnext * (mincount - counted);
#if 0
-Perl_re_printf( "counted=%"UVuf" deltanext=%"UVuf
+re_printf( "counted=%"UVuf" deltanext=%"UVuf
" SSize_t_MAX=%"UVuf" minnext=%"UVuf
" maxcount=%"UVuf" mincount=%"UVuf"\n",
(UV)counted, (UV)deltanext, (UV)SSize_t_MAX, (UV)minnext, (UV)maxcount,
(UV)mincount);
if (deltanext != SSize_t_MAX)
-Perl_re_printf( "LHS=%"UVuf" RHS=%"UVuf"\n",
+re_printf( "LHS=%"UVuf" RHS=%"UVuf"\n",
(UV)(-counted * deltanext + (minnext + deltanext) * maxcount
- minnext * mincount), (UV)(SSize_t_MAX - data->pos_delta));
#endif
@@ -6064,7 +6064,7 @@ Perl_pregcomp(pTHX_ SV * const pattern, const U32 flags)
/* Dispatch a request to compile a regexp to correct regexp engine. */
DEBUG_COMPILE_r({
- Perl_re_printf( "Using engine %"UVxf"\n",
+ re_printf( "Using engine %"UVxf"\n",
PTR2UV(eng));
});
return CALLREGCOMP_ENG(eng, pattern, flags);
@@ -6109,7 +6109,7 @@ S_pat_upgrade_to_utf8(pTHX_ RExC_state_t * const pRExC_state,
bool do_end = 0;
GET_RE_DEBUG_FLAGS_DECL;
- DEBUG_PARSE_r(Perl_re_printf(
+ DEBUG_PARSE_r(re_printf(
"UTF8 mismatch! Converting to utf8 for resizing and compile\n"));
Newx(dst, *plen_p * 2 + 1, U8);
@@ -6477,7 +6477,7 @@ S_compile_runtime_code(pTHX_ RExC_state_t * const pRExC_state,
*p++ = 'x';
*p++ = '\0';
DEBUG_COMPILE_r({
- Perl_re_printf(
+ re_printf(
"%sre-parsing pattern for runtime code:%s %s\n",
PL_colors[4],PL_colors[5],newpat);
});
@@ -6812,7 +6812,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
}
- DEBUG_PARSE_r(Perl_re_printf(
+ DEBUG_PARSE_r(re_printf(
"Assembling pattern from %d elements%s\n", pat_count,
orig_rx_flags & RXf_SPLIT ? " for split" : ""));
@@ -6841,7 +6841,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
*is_bare_re = TRUE;
SvREFCNT_inc(re);
Safefree(pRExC_state->code_blocks);
- DEBUG_PARSE_r(Perl_re_printf(
+ DEBUG_PARSE_r(re_printf(
"Precompiled pattern%s\n",
orig_rx_flags & RXf_SPLIT ? " for split" : ""));
@@ -6884,7 +6884,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
DEBUG_COMPILE_r({
SV *dsv= sv_newmortal();
RE_PV_QUOTED_DECL(s, RExC_utf8, dsv, exp, plen, 60);
- Perl_re_printf( "%sCompiling REx%s %s\n",
+ re_printf( "%sCompiling REx%s %s\n",
PL_colors[4],PL_colors[5],s);
});
@@ -7000,7 +7000,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
assert(*RExC_end == '\0');
DEBUG_PARSE_r(
- Perl_re_printf( "Starting first pass (sizing)\n");
+ re_printf( "Starting first pass (sizing)\n");
RExC_lastnum=0;
RExC_lastparse=NULL;
);
@@ -7030,7 +7030,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
pRExC_state->num_code_blocks);
}
else {
- DEBUG_PARSE_r(Perl_re_printf(
+ DEBUG_PARSE_r(re_printf(
"Need to redo pass 1\n"));
}
@@ -7042,7 +7042,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
SvLEN_set(code_blocksv,0); /* no you can't have it, sv_clear */
DEBUG_PARSE_r({
- Perl_re_printf(
+ re_printf(
"Required size %"IVdf" nodes\n"
"Starting second pass (creation)\n",
(IV)RExC_size);
@@ -7180,7 +7180,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
/* Useful during FAIL. */
#ifdef RE_TRACK_PATTERN_OFFSETS
Newxz(ri->u.offsets, 2*RExC_size+1, U32); /* MJD 20001228 */
- DEBUG_OFFSETS_r(Perl_re_printf(
+ DEBUG_OFFSETS_r(re_printf(
"%s %"UVuf" bytes for offset annotations.\n",
ri->u.offsets ? "Got" : "Couldn't get",
(UV)((2*RExC_size+1) * sizeof(U32))));
@@ -7205,7 +7205,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
/* setup various meta data about recursion, this all requires
* RExC_npar to be correctly set, and a bit later on we clear it */
if (RExC_seen & REG_RECURSE_SEEN) {
- DEBUG_OPTIMISE_MORE_r(Perl_re_printf(
+ DEBUG_OPTIMISE_MORE_r(re_printf(
"%*s%*s Setting up open/close parens\n",
22, "| |", (int)(0 * 2 + 1), ""));
@@ -7238,7 +7238,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
Perl_croak(aTHX_ "panic: reg returned NULL to re_op_compile for generation pass, flags=%#"UVxf"", (UV) flags);
}
DEBUG_OPTIMISE_r(
- Perl_re_printf( "Starting post parse optimization\n");
+ re_printf( "Starting post parse optimization\n");
);
/* XXXX To minimize changes to RE engine we always allocate
@@ -7267,7 +7267,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
copyRExC_state = RExC_state;
} else {
U32 seen=RExC_seen;
- DEBUG_OPTIMISE_r(Perl_re_printf("Restudying\n"));
+ DEBUG_OPTIMISE_r(re_printf("Restudying\n"));
RExC_state = copyRExC_state;
if (seen & REG_TOP_LEVEL_BRANCHES_SEEN)
@@ -7401,12 +7401,12 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
#ifdef TRIE_STUDY_OPT
DEBUG_PARSE_r(
if (!restudied)
- Perl_re_printf( "first at %"IVdf"\n",
+ re_printf( "first at %"IVdf"\n",
(IV)(first - scan + 1))
);
#else
DEBUG_PARSE_r(
- Perl_re_printf( "first at %"IVdf"\n",
+ re_printf( "first at %"IVdf"\n",
(IV)(first - scan + 1))
);
#endif
@@ -7535,7 +7535,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
r->intflags &= ~PREGf_SKIP; /* Used in find_byclass(). */
DEBUG_COMPILE_r({ SV *sv = sv_newmortal();
regprop(r, sv, (regnode*)data.start_class, NULL, pRExC_state);
- Perl_re_printf(
+ re_printf(
"synthetic stclass \"%s\".\n",
SvPVX_const(sv));});
data.start_class = NULL;
@@ -7580,7 +7580,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
regnode_ssc ch_class;
SSize_t last_close = 0;
- DEBUG_PARSE_r(Perl_re_printf( "\nMulti Top Level\n"));
+ DEBUG_PARSE_r(re_printf( "\nMulti Top Level\n"));
scan = ri->program + 1;
ssc_init(pRExC_state, &ch_class);
@@ -7615,7 +7615,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
r->intflags &= ~PREGf_SKIP; /* Used in find_byclass(). */
DEBUG_COMPILE_r({ SV* sv = sv_newmortal();
regprop(r, sv, (regnode*)data.start_class, NULL, pRExC_state);
- Perl_re_printf(
+ re_printf(
"synthetic stclass \"%s\".\n",
SvPVX_const(sv));});
data.start_class = NULL;
@@ -7633,7 +7633,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
/* Guard against an embedded (?=) or (?<=) with a longer minlen than
the "real" pattern. */
DEBUG_OPTIMISE_r({
- Perl_re_printf("minlen: %"IVdf" r->minlen:%"IVdf" maxlen:%"IVdf"\n",
+ re_printf("minlen: %"IVdf" r->minlen:%"IVdf" maxlen:%"IVdf"\n",
(IV)minlen, (IV)r->minlen, (IV)RExC_maxlen);
});
r->minlenret = minlen;
@@ -7727,12 +7727,12 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
Newxz(r->offs, RExC_npar, regexp_paren_pair);
/* assume we don't need to swap parens around before we match */
DEBUG_TEST_r({
- Perl_re_printf("study_chunk_recursed_count: %lu\n",
+ re_printf("study_chunk_recursed_count: %lu\n",
(unsigned long)RExC_study_chunk_recursed_count);
});
DEBUG_DUMP_r({
DEBUG_RExC_seen();
- Perl_re_printf("Final program:\n");
+ re_printf("Final program:\n");
regdump(r);
});
#ifdef RE_TRACK_PATTERN_OFFSETS
@@ -7740,14 +7740,14 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
const STRLEN len = ri->u.offsets[0];
STRLEN i;
GET_RE_DEBUG_FLAGS_DECL;
- Perl_re_printf(
+ re_printf(
"Offsets: [%"UVuf"]\n\t", (UV)ri->u.offsets[0]);
for (i = 1; i <= len; i++) {
if (ri->u.offsets[i*2-1] || ri->u.offsets[i*2])
- Perl_re_printf( "%"UVuf":%"UVuf"[%"UVuf"] ",
+ re_printf( "%"UVuf":%"UVuf"[%"UVuf"] ",
(UV)i, (UV)ri->u.offsets[i*2-1], (UV)ri->u.offsets[i*2]);
}
- Perl_re_printf( "\n");
+ re_printf( "\n");
});
#endif
@@ -8265,7 +8265,7 @@ S_reg_scan_name(pTHX_ RExC_state_t *pRExC_state, U32 flags)
#define DEBUG_PARSE_MSG(funcname) DEBUG_PARSE_r({ \
int num; \
if (RExC_lastparse!=RExC_parse) { \
- Perl_re_printf( "%s", \
+ re_printf( "%s", \
Perl_pv_pretty(aTHX_ RExC_mysv1, RExC_parse, \
RExC_end - RExC_parse, 16, \
"", "", \
@@ -8277,17 +8277,17 @@ S_reg_scan_name(pTHX_ RExC_state_t *pRExC_state, U32 flags)
) \
); \
} else \
- Perl_re_printf("%16s",""); \
+ re_printf("%16s",""); \
\
if (SIZE_ONLY) \
num = RExC_size + 1; \
else \
num=REG_NODE_NUM(RExC_emit); \
if (RExC_lastnum!=num) \
- Perl_re_printf("|%4d",num); \
+ re_printf("|%4d",num); \
else \
- Perl_re_printf("|%4s",""); \
- Perl_re_printf("|%*s%-4s", \
+ re_printf("|%4s",""); \
+ re_printf("|%*s%-4s", \
(int)((depth*2)), "", \
(funcname) \
); \
@@ -8299,11 +8299,11 @@ S_reg_scan_name(pTHX_ RExC_state_t *pRExC_state, U32 flags)
#define DEBUG_PARSE(funcname) DEBUG_PARSE_r({ \
DEBUG_PARSE_MSG((funcname)); \
- Perl_re_printf("%4s","\n"); \
+ re_printf("%4s","\n"); \
})
-#define DEBUG_PARSE_FMT(funcname,fmt,args) DEBUG_PARSE_r({ \
+#define DEBUG_PARSE_FMT(funcname,fmt,args) DEBUG_PARSE_r({\
DEBUG_PARSE_MSG((funcname)); \
- Perl_re_printf(fmt "\n",args); \
+ re_printf(fmt "\n",args); \
})
/* This section of code defines the inversion list object and its methods. The
@@ -10736,7 +10736,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)
vFAIL("Reference to nonexistent group");
}
RExC_recurse_count++;
- DEBUG_OPTIMISE_MORE_r(Perl_re_printf(
+ DEBUG_OPTIMISE_MORE_r(re_printf(
"%*s%*s Recurse #%"UVuf" to %"IVdf"\n",
22, "| |", (int)(depth * 2 + 1), "",
(UV)ARG(ret), (IV)ARG2L(ret)));
@@ -11049,7 +11049,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)
RExC_nestroot = parno;
if (RExC_open_parens && !RExC_open_parens[parno])
{
- DEBUG_OPTIMISE_MORE_r(Perl_re_printf(
+ DEBUG_OPTIMISE_MORE_r(re_printf(
"%*s%*s Setting open paren #%"IVdf" to %d\n",
22, "| |", (int)(depth * 2 + 1), "",
(IV)parno, REG_NODE_NUM(ret)));
@@ -11143,7 +11143,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)
case 1: case 2:
ender = reganode(pRExC_state, CLOSE, parno);
if ( RExC_close_parens ) {
- DEBUG_OPTIMISE_MORE_r(Perl_re_printf(
+ DEBUG_OPTIMISE_MORE_r(re_printf(
"%*s%*s Setting close paren #%"IVdf" to %d\n",
22, "| |", (int)(depth * 2 + 1), "", (IV)parno, REG_NODE_NUM(ender)));
RExC_close_parens[parno]= ender;
@@ -11168,7 +11168,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)
assert(!RExC_end_op); /* there can only be one! */
RExC_end_op = ender;
if (RExC_close_parens) {
- DEBUG_OPTIMISE_MORE_r(Perl_re_printf(
+ DEBUG_OPTIMISE_MORE_r(re_printf(
"%*s%*s Setting close paren #0 (END) to %d\n",
22, "| |", (int)(depth * 2 + 1), "", REG_NODE_NUM(ender)));
@@ -11181,7 +11181,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)
DEBUG_PARSE_MSG("lsbr");
regprop(RExC_rx, RExC_mysv1, lastbr, NULL, pRExC_state);
regprop(RExC_rx, RExC_mysv2, ender, NULL, pRExC_state);
- Perl_re_printf( "~ tying lastbr %s (%"IVdf") to ender %s (%"IVdf") offset %"IVdf"\n",
+ re_printf( "~ tying lastbr %s (%"IVdf") to ender %s (%"IVdf") offset %"IVdf"\n",
SvPV_nolen_const(RExC_mysv1),
(IV)REG_NODE_NUM(lastbr),
SvPV_nolen_const(RExC_mysv2),
@@ -11220,7 +11220,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)
DEBUG_PARSE_MSG("NADA");
regprop(RExC_rx, RExC_mysv1, ret, NULL, pRExC_state);
regprop(RExC_rx, RExC_mysv2, ender, NULL, pRExC_state);
- Perl_re_printf( "~ converting ret %s (%"IVdf") to ender %s (%"IVdf") offset %"IVdf"\n",
+ re_printf( "~ converting ret %s (%"IVdf") to ender %s (%"IVdf") offset %"IVdf"\n",
SvPV_nolen_const(RExC_mysv1),
(IV)REG_NODE_NUM(ret),
SvPV_nolen_const(RExC_mysv2),
@@ -18340,7 +18340,7 @@ S_regtail(pTHX_ RExC_state_t * pRExC_state,
DEBUG_PARSE_r({
DEBUG_PARSE_MSG((scan==p ? "tail" : ""));
regprop(RExC_rx, RExC_mysv, scan, NULL, pRExC_state);
- Perl_re_printf( "~ %s (%d) %s %s\n",
+ re_printf( "~ %s (%d) %s %s\n",
SvPV_nolen_const(RExC_mysv), REG_NODE_NUM(scan),
(temp == NULL ? "->" : ""),
(temp == NULL ? PL_reg_name[OP(val)] : "")
@@ -18430,7 +18430,7 @@ S_regtail_study(pTHX_ RExC_state_t *pRExC_state, regnode *p,
DEBUG_PARSE_r({
DEBUG_PARSE_MSG((scan==p ? "tsdy" : ""));
regprop(RExC_rx, RExC_mysv, scan, NULL, pRExC_state);
- Perl_re_printf( "~ %s (%d) -> %s\n",
+ re_printf( "~ %s (%d) -> %s\n",
SvPV_nolen_const(RExC_mysv),
REG_NODE_NUM(scan),
PL_reg_name[exact]);
@@ -18442,7 +18442,7 @@ S_regtail_study(pTHX_ RExC_state_t *pRExC_state, regnode *p,
DEBUG_PARSE_r({
DEBUG_PARSE_MSG("");
regprop(RExC_rx, RExC_mysv, val, NULL, pRExC_state);
- Perl_re_printf(
+ re_printf(
"~ attach to %s (%"IVdf") offset to %"IVdf"\n",
SvPV_nolen_const(RExC_mysv),
(IV)REG_NODE_NUM(val),
@@ -18476,15 +18476,15 @@ S_regdump_intflags(pTHX_ const char *lead, const U32 flags)
for (bit=0; bit<REG_INTFLAGS_NAME_SIZE; bit++) {
if (flags & (1<<bit)) {
if (!set++ && lead)
- Perl_re_printf( "%s",lead);
- Perl_re_printf( "%s ",PL_reg_intflags_name[bit]);
+ re_printf( "%s",lead);
+ re_printf( "%s ",PL_reg_intflags_name[bit]);
}
}
if (lead) {
if (set)
- Perl_re_printf( "\n");
+ re_printf( "\n");
else
- Perl_re_printf( "%s[none-set]\n",lead);
+ re_printf( "%s[none-set]\n",lead);
}
}
@@ -18503,37 +18503,37 @@ S_regdump_extflags(pTHX_ const char *lead, const U32 flags)
continue;
}
if (!set++ && lead)
- Perl_re_printf( "%s",lead);
- Perl_re_printf( "%s ",PL_reg_extflags_name[bit]);
+ re_printf( "%s",lead);
+ re_printf( "%s ",PL_reg_extflags_name[bit]);
}
}
if ((cs = get_regex_charset(flags)) != REGEX_DEPENDS_CHARSET) {
if (!set++ && lead) {
- Perl_re_printf( "%s",lead);
+ re_printf( "%s",lead);
}
switch (cs) {
case REGEX_UNICODE_CHARSET:
- Perl_re_printf( "UNICODE");
+ re_printf( "UNICODE");
break;
case REGEX_LOCALE_CHARSET:
- Perl_re_printf( "LOCALE");
+ re_printf( "LOCALE");
break;
case REGEX_ASCII_RESTRICTED_CHARSET:
- Perl_re_printf( "ASCII-RESTRICTED");
+ re_printf( "ASCII-RESTRICTED");
break;
case REGEX_ASCII_MORE_RESTRICTED_CHARSET:
- Perl_re_printf( "ASCII-MORE_RESTRICTED");
+ re_printf( "ASCII-MORE_RESTRICTED");
break;
default:
- Perl_re_printf( "UNKNOWN CHARACTER SET");
+ re_printf( "UNKNOWN CHARACTER SET");
break;
}
}
if (lead) {
if (set)
- Perl_re_printf( "\n");
+ re_printf( "\n");
else
- Perl_re_printf( "%s[none-set]\n",lead);
+ re_printf( "%s[none-set]\n",lead);
}
}
#endif
@@ -18555,14 +18555,14 @@ Perl_regdump(pTHX_ const regexp *r)
if (r->anchored_substr) {
RE_PV_QUOTED_DECL(s, 0, dsv, SvPVX_const(r->anchored_substr),
RE_SV_DUMPLEN(r->anchored_substr), 30);
- Perl_re_printf(
+ re_printf(
"anchored %s%s at %"IVdf" ",
s, RE_SV_TAIL(r->anchored_substr),
(IV)r->anchored_offset);
} else if (r->anchored_utf8) {
RE_PV_QUOTED_DECL(s, 1, dsv, SvPVX_const(r->anchored_utf8),
RE_SV_DUMPLEN(r->anchored_utf8), 30);
- Perl_re_printf(
+ re_printf(
"anchored utf8 %s%s at %"IVdf" ",
s, RE_SV_TAIL(r->anchored_utf8),
(IV)r->anchored_offset);
@@ -18570,55 +18570,55 @@ Perl_regdump(pTHX_ const regexp *r)
if (r->float_substr) {
RE_PV_QUOTED_DECL(s, 0, dsv, SvPVX_const(r->float_substr),
RE_SV_DUMPLEN(r->float_substr), 30);
- Perl_re_printf(
+ re_printf(
"floating %s%s at %"IVdf"..%"UVuf" ",
s, RE_SV_TAIL(r->float_substr),
(IV)r->float_min_offset, (UV)r->float_max_offset);
} else if (r->float_utf8) {
RE_PV_QUOTED_DECL(s, 1, dsv, SvPVX_const(r->float_utf8),
RE_SV_DUMPLEN(r->float_utf8), 30);
- Perl_re_printf(
+ re_printf(
"floating utf8 %s%s at %"IVdf"..%"UVuf" ",
s, RE_SV_TAIL(r->float_utf8),
(IV)r->float_min_offset, (UV)r->float_max_offset);
}
if (r->check_substr || r->check_utf8)
- Perl_re_printf(
+ re_printf(
(const char *)
(r->check_substr == r->float_substr
&& r->check_utf8 == r->float_utf8
? "(checking floating" : "(checking anchored"));
if (r->intflags & PREGf_NOSCAN)
- Perl_re_printf( " noscan");
+ re_printf( " noscan");
if (r->extflags & RXf_CHECK_ALL)
- Perl_re_printf( " isall");
+ re_printf( " isall");
if (r->check_substr || r->check_utf8)
- Perl_re_printf( ") ");
+ re_printf( ") ");
if (ri->regstclass) {
regprop(r, sv, ri->regstclass, NULL, NULL);
- Perl_re_printf( "stclass %s ", SvPVX_const(sv));
+ re_printf( "stclass %s ", SvPVX_const(sv));
}
if (r->intflags & PREGf_ANCH) {
- Perl_re_printf( "anchored");
+ re_printf( "anchored");
if (r->intflags & PREGf_ANCH_MBOL)
- Perl_re_printf( "(MBOL)");
+ re_printf( "(MBOL)");
if (r->intflags & PREGf_ANCH_SBOL)
- Perl_re_printf( "(SBOL)");
+ re_printf( "(SBOL)");
if (r->intflags & PREGf_ANCH_GPOS)
- Perl_re_printf( "(GPOS)");
- Perl_re_printf(" ");
+ re_printf( "(GPOS)");
+ re_printf(" ");
}
if (r->intflags & PREGf_GPOS_SEEN)
- Perl_re_printf( "GPOS:%"UVuf" ", (UV)r->gofs);
+ re_printf( "GPOS:%"UVuf" ", (UV)r->gofs);
if (r->intflags & PREGf_SKIP)
- Perl_re_printf( "plus ");
+ re_printf( "plus ");
if (r->intflags & PREGf_IMPLICIT)
- Perl_re_printf( "implicit ");
- Perl_re_printf( "minlen %"IVdf" ", (IV)r->minlen);
+ re_printf( "implicit ");
+ re_printf( "minlen %"IVdf" ", (IV)r->minlen);
if (r->extflags & RXf_EVAL_SEEN)
- Perl_re_printf( "with eval ");
- Perl_re_printf( "\n");
+ re_printf( "with eval ");
+ re_printf( "\n");
DEBUG_FLAGS_r({
regdump_extflags("r->extflags: ",r->extflags);
regdump_intflags("r->intflags: ",r->intflags);
@@ -19025,7 +19025,7 @@ Perl_re_intuit_string(pTHX_ REGEXP * const r)
? prog->check_utf8 : prog->check_substr);
if (!PL_colorset) reginitcolors();
- Perl_re_printf(
+ re_printf(
"%sUsing REx %ssubstr:%s \"%s%.60s%s%s\"\n",
PL_colors[4],
RX_UTF8(r) ? "utf8 " : "",
@@ -19206,7 +19206,7 @@ Perl_regfree_internal(pTHX_ REGEXP * const rx)
SV *dsv= sv_newmortal();
RE_PV_QUOTED_DECL(s, RX_UTF8(rx),
dsv, RX_PRECOMP(rx), RX_PRELEN(rx), 60);
- Perl_re_printf("%sFreeing REx:%s %s\n",
+ re_printf("%sFreeing REx:%s %s\n",
PL_colors[4],PL_colors[5],s);
}
});
@@ -20201,11 +20201,11 @@ S_put_charclass_bitmap_innards(pTHX_ SV *sv,
return SvCUR(sv) > orig_sv_cur;
}
-#define CLEAR_OPTSTART \
+#define CLEAR_OPTSTART \
if (optstart) STMT_START { \
- DEBUG_OPTIMISE_r(Perl_re_printf( \
+ DEBUG_OPTIMISE_r(re_printf( \
" (%"IVdf" nodes)\n", (IV)(node - optstart))); \
- optstart=NULL; \
+ optstart=NULL; \
} STMT_END
#define DUMPUNTIL(b,e) \
@@ -20227,7 +20227,7 @@ S_dumpuntil(pTHX_ const regexp *r, const regnode *start, const regnode *node,
PERL_ARGS_ASSERT_DUMPUNTIL;
#ifdef DEBUG_DUMPUNTIL
- Perl_re_printf( "--- %d : %d - %d - %d\n",indent,node-start,
+ re_printf( "--- %d : %d - %d - %d\n",indent,node-start,
last ? last-start : 0,plast ? plast-start : 0);
#endif
@@ -20253,18 +20253,18 @@ S_dumpuntil(pTHX_ const regexp *r, const regnode *start, const regnode *node,
CLEAR_OPTSTART;
regprop(r, sv, node, NULL, NULL);
- Perl_re_printf( "%4"IVdf":%*s%s", (IV)(node - start),
+ re_printf( "%4"IVdf":%*s%s", (IV)(node - start),
(int)(2*indent + 1), "", SvPVX_const(sv));
if (OP(node) != OPTIMIZED) {
if (next == NULL) /* Next ptr. */
- Perl_re_printf( " (0)");
+ re_printf( " (0)");
else if (PL_regkind[(U8)op] == BRANCH
&& PL_regkind[OP(next)] != BRANCH )
- Perl_re_printf( " (FAIL)");
+ re_printf( " (FAIL)");
else
- Perl_re_printf( " (%"IVdf")", (IV)(next - start));
- Perl_re_printf("\n");
+ re_printf( " (%"IVdf")", (IV)(next - start));
+ re_printf("\n");
}
after_print:
@@ -20302,7 +20302,7 @@ S_dumpuntil(pTHX_ const regexp *r, const regnode *start, const regnode *node,
for (word_idx= 0; word_idx < (I32)trie->wordcount; word_idx++) {
SV ** const elem_ptr = av_fetch(trie_words,word_idx,0);
- Perl_re_indentf( "%s ",
+ re_indentf( "%s ",
indent+3,
elem_ptr
? pv_pretty(sv, SvPV_nolen_const(*elem_ptr),
@@ -20318,7 +20318,7 @@ S_dumpuntil(pTHX_ const regexp *r, const regnode *start, const regnode *node,
);
if (trie->jump) {
U16 dist= trie->jump[word_idx+1];
- Perl_re_printf( "(%"UVuf")\n",
+ re_printf( "(%"UVuf")\n",
(UV)((dist ? this_trie + dist : next) - start));
if (dist) {
if (!nextbranch)
@@ -20328,7 +20328,7 @@ S_dumpuntil(pTHX_ const regexp *r, const regnode *start, const regnode *node,
if (nextbranch && PL_regkind[OP(nextbranch)]==BRANCH)
nextbranch= regnext((regnode *)nextbranch);
} else {
- Perl_re_printf( "\n");
+ re_printf( "\n");
}
}
if (last && next > last)
@@ -20368,7 +20368,7 @@ S_dumpuntil(pTHX_ const regexp *r, const regnode *start, const regnode *node,
}
CLEAR_OPTSTART;
#ifdef DEBUG_DUMPUNTIL
- Perl_re_printf( "--- %d\n", (int)indent);
+ re_printf( "--- %d\n", (int)indent);
#endif
return node;
}