ranlib = $ranlib
ECHO = $echo
-@@ -786,7 +787,7 @@ bitcount.h: generate_uudmap$(HOST_EXE_EX
+@@ -791,7 +792,7 @@ bitcount.h: generate_uudmap$(HOST_EXE_EX
./generate_uudmap$(HOST_EXE_EXT) $(generated_headers)
generate_uudmap$(HOST_EXE_EXT): generate_uudmap$(OBJ_EXT)
$(LNS) $(HOST_GENERATE) generate_uudmap$(HOST_EXE_EXT)
!NO!SUBS!
-@@ -891,26 +892,26 @@ mydtrace.h: $(DTRACE_H)
+@@ -896,26 +897,26 @@ mydtrace.h: $(DTRACE_H)
define)
$spitshell >>$Makefile <<'!NO!SUBS!'
$(DTRACE_MINI_O): perldtrace.d $(miniperl_objs_nodt)
!NO!SUBS!
;;
-@@ -921,13 +922,13 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD
+@@ -926,13 +927,13 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD
case "$useshrplib" in
true)
$spitshell >>$Makefile <<'!NO!SUBS!'
mv $@ libperl$(OBJ_EXT)
$(AR) qv $(LIBPERL) libperl$(OBJ_EXT)
!NO!SUBS!
-@@ -936,7 +937,7 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD
+@@ -941,7 +942,7 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD
;;
*)
$spitshell >>$Makefile <<'!NO!SUBS!'
$(AR) rc $(LIBPERL) $(perllib_objs) $(DYNALOADER)
@$(ranlib) $(LIBPERL)
!NO!SUBS!
-@@ -970,7 +971,7 @@ $(MINIPERL_EXE): lib/buildcustomize.pl
+@@ -975,7 +976,7 @@ $(MINIPERL_EXE): lib/buildcustomize.pl
amigaos*)
$spitshell >>$Makefile <<'!NO!SUBS!'
lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl
$(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \
$(miniperl_objs) $(libs)
# $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
-@@ -992,7 +993,7 @@ NAMESPACEFLAGS = -force_flat_namespace
+@@ -997,7 +998,7 @@ NAMESPACEFLAGS = -force_flat_namespace
esac
$spitshell >>$Makefile <<'!NO!SUBS!'
lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl
$(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
$(miniperl_objs) $(libs)
$(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
-@@ -1003,8 +1004,8 @@ lib/buildcustomize.pl: $& $(miniperl_obj
+@@ -1008,8 +1009,8 @@ lib/buildcustomize.pl: $& $(miniperl_obj
if test "X$hostperl" != X; then
$spitshell >>$Makefile <<!GROK!THIS!
lib/buildcustomize.pl: \$& \$(miniperl_dep) write_buildcustomize.pl
\$(LNS) \$(HOST_PERL) \$(MINIPERL_EXE)
\$(LDLIBPTH) ./miniperl\$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
\$(MINIPERL) -f write_buildcustomize.pl 'osname' "$osname"
-@@ -1012,7 +1013,7 @@ lib/buildcustomize.pl: \$& \$(miniperl_d
+@@ -1017,7 +1018,7 @@ lib/buildcustomize.pl: \$& \$(miniperl_d
else
$spitshell >>$Makefile <<'!NO!SUBS!'
lib/buildcustomize.pl: $& $(miniperl_dep) write_buildcustomize.pl
$(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \
$(miniperl_objs) $(libs)
$(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
-@@ -1025,7 +1026,7 @@ lib/buildcustomize.pl: $& $(miniperl_dep
+@@ -1030,7 +1031,7 @@ lib/buildcustomize.pl: $& $(miniperl_dep
$spitshell >>$Makefile <<'!NO!SUBS!'
$(PERL_EXE): $& $(perlmain_dep) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT) write_buildcustomize.pl
!NO!SUBS!
case "$osname" in
-@@ -1133,8 +1134,8 @@ pod/perl5382delta.pod: pod/perldelta.pod
- $(LNS) perldelta.pod pod/perl5382delta.pod
+@@ -1130,8 +1131,8 @@ pod/perl5400delta.pod: pod/perldelta.pod
+ $(LNS) perldelta.pod pod/perl5400delta.pod
extra.pods: $(MINIPERL_EXE)
- -@test ! -f extra.pods || rm -f `cat extra.pods`
-@for x in `grep -l '^=[a-z]' README.* | grep -v README.vms` ; do \
nx=`echo $$x | sed -e "s/README\.//"`; \
$(LNS) ../$$x "pod/perl"$$nx".pod" ; \
-@@ -1334,11 +1335,11 @@ realclean: _realcleaner _mopup
+@@ -1330,11 +1331,11 @@ realclean: _realcleaner _mopup
@echo "Note that '$(MAKE) realclean' does not delete config.sh or Policy.sh"
_clobber:
clobber: _realcleaner _mopup _clobber
-@@ -1346,24 +1347,24 @@ distclean: clobber
+@@ -1342,24 +1343,24 @@ distclean: clobber
# Like distclean but also removes emacs backups and *.orig.
veryclean: _verycleaner _mopup _clobber
- -rm -f perl.export perl.dll perl.libexp perl.map perl.def
- -rm -f *perl.xok
- -rm -f cygwin.c libperl*.def libperl*.dll cygperl*.dll *.exe.stackdump
-- -rm -f $(PERL_EXE) $(MINIPERL_EXE) $(LIBPERL) libperl.* microperl
+- -rm -f $(PERL_EXE) $(MINIPERL_EXE) $(LIBPERL) libperl.*
- -rm -f config.arch config.over $(DTRACE_H)
+ -@test -f extra.pods && $(RMS) `cat extra.pods`
+ -@test -f vms/README_vms.pod && $(RMS) vms/README_vms.pod
+ $(RMS) perl.export perl.dll perl.libexp perl.map perl.def
+ $(RMS) *perl.xok
+ $(RMS) cygwin.c libperl*.def libperl*.dll cygperl*.dll *.exe.stackdump
-+ $(RMS) $(PERL_EXE) $(MINIPERL_EXE) $(LIBPERL) libperl.* microperl
++ $(RMS) $(PERL_EXE) $(MINIPERL_EXE) $(LIBPERL) libperl.*
+ $(RMS) config.arch config.over $(DTRACE_H)
_cleaner1:
-cd pod; $(LDLIBPTH) $(MAKE) $(CLEAN)
-cd utils; $(LDLIBPTH) $(MAKE) $(CLEAN)
-@if test -f $(MINIPERL_EXE) ; then \
-@@ -1373,8 +1374,8 @@ _cleaner1:
+@@ -1369,8 +1370,8 @@ _cleaner1:
else \
sh $(CLEAN).sh ; \
fi
# Dear POSIX, thanks for making the default to xargs to be
# run once if nothing is passed in. It is such a great help.
-@@ -1389,24 +1390,24 @@ _cleaner1:
+@@ -1385,24 +1386,24 @@ _cleaner1:
# Add new rules before that line - the next line (rm -f so_locations ...) is
# used as a placeholder by a regen script.
_cleaner2:
-rmdir lib/version lib/threads lib/inc/ExtUtils lib/inc lib/encoding
-rmdir lib/autodie/exception lib/autodie/Scope lib/autodie lib/XS
-rmdir lib/Win32API lib/VMS lib/Unicode/Collate/Locale
-@@ -1457,11 +1458,11 @@ _realcleaner:
+@@ -1459,11 +1460,11 @@ _realcleaner:
_verycleaner:
@$(LDLIBPTH) $(MAKE) _cleaner1 CLEAN=veryclean
@$(LDLIBPTH) $(MAKE) _cleaner2
lint $(lintflags) -DPERL_CORE -D_REENTRANT -DDEBUGGING -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(c)
cscopeflags = -Rb # Recursive, build-only.
-@@ -1522,7 +1523,7 @@ case "$targethost" in
+@@ -1524,7 +1525,7 @@ case "$targethost" in
'') $spitshell >>$Makefile <<'!NO!SUBS!'
test_prep test-prep: test_prep_pre $(MINIPERL_EXE) $(unidatafiles) $(PERL_EXE) \
$(dynamic_ext) $(TEST_PERL_DLL) runtests $(generated_pods) common_build
!NO!SUBS!
;;
-@@ -1572,7 +1573,7 @@ test_prep test-prep: test_prep_pre \$(MI
+@@ -1574,7 +1575,7 @@ test_prep test-prep: test_prep_pre \$(MI
$to config.sh
# --- For lib/diagnostics.t with -Duseshrplib
$to \$(PERL_EXE)
$to t/\$(PERL_EXE)
!GROK!THIS!
-@@ -1582,7 +1583,7 @@ esac
+@@ -1592,7 +1593,7 @@ else
$spitshell >>$Makefile <<'!NO!SUBS!'
test_prep_reonly: $(MINIPERL_EXE) $(PERL_EXE) $(dynamic_ext_re) $(TEST_PERL_DLL)
$(MINIPERL) make_ext.pl $(dynamic_ext_re) MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) LINKTYPE=dynamic
- cd t && (rm -f $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE))
+ cd t && ($(RMS) $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE))
!NO!SUBS!
+ fi
- case "$targethost" in
-@@ -1637,7 +1638,7 @@ minitest_prep: $(MINIPERL_EXE)
+@@ -1648,7 +1649,7 @@ minitest_prep: $(MINIPERL_EXE)
@echo "You may see some irrelevant test failures if you have been unable"
@echo "to build lib/Config.pm, or the Unicode data files."
@echo " "
+++ /dev/null
-From ba6e2c38aafc23cf114f3ba0d0ff3baead34328b Mon Sep 17 00:00:00 2001
-From: Yves Orton <demerphq@gmail.com>
-Date: Tue, 1 Aug 2023 23:12:46 +0200
-Subject: [PATCH] regcomp*.c, regexec.c - fixup regex engine build under
- -Uusedl
-
-The regex engine is built a bit different from most of the perl
-codebase. It is compiled as part of the main libperl.so and it is
-also compiled (with DEBUGGING enabled) as part of the re extension.
-When perl itself is compiled with DEBUGGING enabled then the code
-in the re.so extension and the code in libperl.so is the same.
-
-This all works fine and dandy until you have a static build where the
-re.so is linked into libperl.so, which results in duplicate symbols
-being defined. These symbols come in two flaviours: "auxiliary" and
-"debugging" related symbols.
-
-We have basically three cases:
-
-1. USE_DYNAMIC_LOADING is defined. In this case we are doing a dynamic
- build and re.so will be separate from libperl.so, so it even if this
- is a DEBUGGING enabled build debug and auxiliary functions can be
- compiled into *both* re.so and libperl.so. This is basically the
- "standard build".
-
-2. USE_DYNAMIC_LOADING is not defined, and DEBUGGING is not defined
- either. In this case auxiliary functions should only be compiled in
- libperl.so, and the debug functions should only be compiled into
- re.so
-
-3. USE_DYNAMIC_LOADING is not defined, and DEBUGGING *is* defined. In
- this case auxiliary functions AND debug functions should only be
- compiled into libperl.so
-
-It is possible to detect the different build options by looking at the
-defines 'USE_DYNAMIC_LOADING', 'PERL_EXT_RE_DEBUG' and
-'DEBUGGING_RE_ONLY'. 'USE_DYNAMIC_LOADING' is NOT defined when we are
-building a static perl. 'PERL_EXT_RE_DEBUG' is defined only when we are
-building re.so, and 'DEBUGGING_RE_ONLY' is defined only when we are
-building re.so in a perl that is not itself already a DEBUGGING enabled
-perl. The file ext/re/re_top.h responsible for setting up
-DEBUGGING_RE_ONLY.
-
-This patch uses 'PERL_EXT_RE_DEBUG', 'DEBUGGING_RE_ONLY' and
-'USE_DYNAMIC_LOADING' to define in regcomp.h two further define flags
-'PERL_RE_BUILD_DEBUG' and 'PERL_RE_BUILD_AUX'.
-
-The 'PERL_RE_BUILD_DEBUG' flag determines if the debugging functions
-should be compiled into libperl.so or re.so or both. The
-'PERL_RE_BUILD_AUX' flag determines if the auxiliary functions should be
-compiled into just libperl.so or into it and re.so. We then use these
-flags to guard the different types of functions so that we can build in
-all three modes without duplicate symbols.
----
- regcomp.c | 13 +-
- regcomp.h | 14 ++-
- regcomp_debug.c | 308 +++++++++++++++++++++++-----------------------
- regcomp_invlist.c | 3 +-
- regexec.c | 3 +-
- 5 files changed, 181 insertions(+), 160 deletions(-)
-
---- a/regcomp.c
-+++ b/regcomp.c
-@@ -290,6 +290,7 @@ S_edit_distance(const UV* src,
- /* END of edit_distance() stuff
- * ========================================================= */
-
-+#ifdef PERL_RE_BUILD_AUX
- /* add a data member to the struct reg_data attached to this regex, it should
- * always return a non-zero return. the 's' argument is the type of the items
- * being added and the n is the number of items. The length of 's' should match
-@@ -340,6 +341,7 @@ Perl_reg_add_data(RExC_state_t* const pR
- assert(count>0);
- return count;
- }
-+#endif /* PERL_RE_BUILD_AUX */
-
- /*XXX: todo make this not included in a non debugging perl, but appears to be
- * used anyway there, in 'use re' */
-@@ -7443,6 +7445,7 @@ S_regatom(pTHX_ RExC_state_t *pRExC_stat
- }
-
-
-+#ifdef PERL_RE_BUILD_AUX
- void
- Perl_populate_anyof_bitmap_from_invlist(pTHX_ regnode *node, SV** invlist_ptr)
- {
-@@ -7502,6 +7505,7 @@ Perl_populate_anyof_bitmap_from_invlist(
- }
- }
- }
-+#endif /* PERL_RE_BUILD_AUX */
-
- /* Parse POSIX character classes: [[:foo:]], [[=foo=]], [[.foo.]].
- Character classes ([:foo:]) can also be negated ([:^foo:]).
-@@ -9095,6 +9099,7 @@ S_dump_regex_sets_structures(pTHX_ RExC_
- #undef IS_OPERATOR
- #undef IS_OPERAND
-
-+#ifdef PERL_RE_BUILD_AUX
- void
- Perl_add_above_Latin1_folds(pTHX_ RExC_state_t *pRExC_state, const U8 cp, SV** invlist)
- {
-@@ -9182,6 +9187,8 @@ Perl_add_above_Latin1_folds(pTHX_ RExC_s
- }
- }
- }
-+#endif /* PERL_RE_BUILD_AUX */
-+
-
- STATIC void
- S_output_posix_warnings(pTHX_ RExC_state_t *pRExC_state, AV* posix_warnings)
-@@ -12105,6 +12112,7 @@ S_optimize_regclass(pTHX_
-
- #undef HAS_NONLOCALE_RUNTIME_PROPERTY_DEFINITION
-
-+#ifdef PERL_RE_BUILD_AUX
- void
- Perl_set_ANYOF_arg(pTHX_ RExC_state_t* const pRExC_state,
- regnode* const node,
-@@ -12261,6 +12269,7 @@ Perl_set_ANYOF_arg(pTHX_ RExC_state_t* c
- RExC_rxi->data->data[n] = (void*)rv;
- ARG1u_SET(node, n);
- }
-+#endif /* PERL_RE_BUILD_AUX */
-
- SV *
-
-@@ -12999,6 +13008,8 @@ S_regtail_study(pTHX_ RExC_state_t *pREx
- }
- #endif
-
-+
-+#ifdef PERL_RE_BUILD_AUX
- SV*
- Perl_get_ANYOFM_contents(pTHX_ const regnode * n) {
-
-@@ -13047,7 +13058,7 @@ Perl_get_ANYOFHbbm_contents(pTHX_ const
- UTF_CONTINUATION_MARK | 0));
- return cp_list;
- }
--
-+#endif /* PERL_RE_BUILD_AUX */
-
-
- SV *
---- a/regcomp.h
-+++ b/regcomp.h
-@@ -1554,7 +1554,19 @@ typedef enum {
- #define EVAL_OPTIMISTIC_FLAG 128
- #define EVAL_FLAGS_MASK (EVAL_OPTIMISTIC_FLAG-1)
-
--
-+/* We define PERL_RE_BUILD_DEBUG if we are NOT compiling the re extension and
-+ * we are under DEBUGGING, or if we are ARE compiling the re extension
-+ * and this is not a DEBUGGING enabled build (identified by
-+ * DEBUGGING_RE_ONLY being defined)
-+ */
-+#if ( defined(USE_DYNAMIC_LOADING) && defined(DEBUGGING)) || \
-+ ( defined(PERL_EXT_RE_BUILD) && defined(DEBUGGING_RE_ONLY)) || \
-+ (!defined(PERL_EXT_RE_BUILD) && defined(DEBUGGING))
-+#define PERL_RE_BUILD_DEBUG
-+#endif
-+#if ( defined(USE_DYNAMIC_LOADING) || !defined(PERL_EXT_RE_BUILD) )
-+#define PERL_RE_BUILD_AUX
-+#endif
-
- #endif /* PERL_REGCOMP_H_ */
-
---- a/regcomp_debug.c
-+++ b/regcomp_debug.c
-@@ -18,8 +18,7 @@
- #include "unicode_constants.h"
- #include "regcomp_internal.h"
-
--#ifdef DEBUGGING
--
-+#ifdef PERL_RE_BUILD_DEBUG
- int
- Perl_re_printf(pTHX_ const char *fmt, ...)
- {
-@@ -159,13 +158,160 @@ Perl_debug_peep(pTHX_ const char *str, c
- });
- }
-
--#endif /* DEBUGGING */
-+const regnode *
-+Perl_dumpuntil(pTHX_ const regexp *r, const regnode *start, const regnode *node,
-+ const regnode *last, const regnode *plast,
-+ SV* sv, I32 indent, U32 depth)
-+{
-+ const regnode *next;
-+ const regnode *optstart= NULL;
-+
-+ RXi_GET_DECL(r, ri);
-+ DECLARE_AND_GET_RE_DEBUG_FLAGS;
-+
-+ PERL_ARGS_ASSERT_DUMPUNTIL;
-+
-+#ifdef DEBUG_DUMPUNTIL
-+ Perl_re_printf( aTHX_ "--- %d : %d - %d - %d\n", indent, node-start,
-+ last ? last-start : 0, plast ? plast-start : 0);
-+#endif
-+
-+ if (plast && plast < last)
-+ last= plast;
-+
-+ while (node && (!last || node < last)) {
-+ const U8 op = OP(node);
-+
-+ if (op == CLOSE || op == SRCLOSE || op == WHILEM)
-+ indent--;
-+ next = regnext((regnode *)node);
-+ const regnode *after = regnode_after((regnode *)node,0);
-+
-+ /* Where, what. */
-+ if (op == OPTIMIZED) {
-+ if (!optstart && RE_DEBUG_FLAG(RE_DEBUG_COMPILE_OPTIMISE))
-+ optstart = node;
-+ else
-+ goto after_print;
-+ } else
-+ CLEAR_OPTSTART;
-+
-+ regprop(r, sv, node, NULL, NULL);
-+ Perl_re_printf( aTHX_ "%4" IVdf ":%*s%s", (IV)(node - start),
-+ (int)(2*indent + 1), "", SvPVX_const(sv));
-+
-+ if (op != OPTIMIZED) {
-+ if (next == NULL) /* Next ptr. */
-+ Perl_re_printf( aTHX_ " (0)");
-+ else if (REGNODE_TYPE(op) == BRANCH
-+ && REGNODE_TYPE(OP(next)) != BRANCH )
-+ Perl_re_printf( aTHX_ " (FAIL)");
-+ else
-+ Perl_re_printf( aTHX_ " (%" IVdf ")", (IV)(next - start));
-+ Perl_re_printf( aTHX_ "\n");
-+ }
-+
-+ after_print:
-+ if (REGNODE_TYPE(op) == BRANCHJ) {
-+ assert(next);
-+ const regnode *nnode = (OP(next) == LONGJMP
-+ ? regnext((regnode *)next)
-+ : next);
-+ if (last && nnode > last)
-+ nnode = last;
-+ DUMPUNTIL(after, nnode);
-+ }
-+ else if (REGNODE_TYPE(op) == BRANCH) {
-+ assert(next);
-+ DUMPUNTIL(after, next);
-+ }
-+ else if ( REGNODE_TYPE(op) == TRIE ) {
-+ const regnode *this_trie = node;
-+ const U32 n = ARG1u(node);
-+ const reg_ac_data * const ac = op>=AHOCORASICK ?
-+ (reg_ac_data *)ri->data->data[n] :
-+ NULL;
-+ const reg_trie_data * const trie =
-+ (reg_trie_data*)ri->data->data[op<AHOCORASICK ? n : ac->trie];
-+#ifdef DEBUGGING
-+ AV *const trie_words
-+ = MUTABLE_AV(ri->data->data[n + TRIE_WORDS_OFFSET]);
-+#endif
-+ const regnode *nextbranch= NULL;
-+ I32 word_idx;
-+ SvPVCLEAR(sv);
-+ for (word_idx= 0; word_idx < (I32)trie->wordcount; word_idx++) {
-+ SV ** const elem_ptr = av_fetch_simple(trie_words, word_idx, 0);
-+
-+ Perl_re_indentf( aTHX_ "%s ",
-+ indent+3,
-+ elem_ptr
-+ ? pv_pretty(sv, SvPV_nolen_const(*elem_ptr),
-+ SvCUR(*elem_ptr), PL_dump_re_max_len,
-+ PL_colors[0], PL_colors[1],
-+ (SvUTF8(*elem_ptr)
-+ ? PERL_PV_ESCAPE_UNI
-+ : 0)
-+ | PERL_PV_PRETTY_ELLIPSES
-+ | PERL_PV_PRETTY_LTGT
-+ )
-+ : "???"
-+ );
-+ if (trie->jump) {
-+ U16 dist= trie->jump[word_idx+1];
-+ Perl_re_printf( aTHX_ "(%" UVuf ")\n",
-+ (UV)((dist ? this_trie + dist : next) - start));
-+ if (dist) {
-+ if (!nextbranch)
-+ nextbranch= this_trie + trie->jump[0];
-+ DUMPUNTIL(this_trie + dist, nextbranch);
-+ }
-+ if (nextbranch && REGNODE_TYPE(OP(nextbranch))==BRANCH)
-+ nextbranch= regnext((regnode *)nextbranch);
-+ } else {
-+ Perl_re_printf( aTHX_ "\n");
-+ }
-+ }
-+ if (last && next > last)
-+ node= last;
-+ else
-+ node= next;
-+ }
-+ else if ( op == CURLY ) { /* "next" might be very big: optimizer */
-+ DUMPUNTIL(after, after + 1); /* +1 is NOT a REGNODE_AFTER */
-+ }
-+ else if (REGNODE_TYPE(op) == CURLY && op != CURLYX) {
-+ assert(next);
-+ DUMPUNTIL(after, next);
-+ }
-+ else if ( op == PLUS || op == STAR) {
-+ DUMPUNTIL(after, after + 1); /* +1 NOT a REGNODE_AFTER */
-+ }
-+ else if (REGNODE_TYPE(op) == EXACT || op == ANYOFHs) {
-+ /* Literal string, where present. */
-+ node = (const regnode *)REGNODE_AFTER_varies(node);
-+ }
-+ else {
-+ node = REGNODE_AFTER_opcode(node,op);
-+ }
-+ if (op == CURLYX || op == OPEN || op == SROPEN)
-+ indent++;
-+ if (REGNODE_TYPE(op) == END)
-+ break;
-+ }
-+ CLEAR_OPTSTART;
-+#ifdef DEBUG_DUMPUNTIL
-+ Perl_re_printf( aTHX_ "--- %d\n", (int)indent);
-+#endif
-+ return node;
-+}
-+
-+#endif /* PERL_RE_BUILD_DEBUG */
-
- /*
- - regdump - dump a regexp onto Perl_debug_log in vaguely comprehensible form
- */
- #ifdef DEBUGGING
--
- static void
- S_regdump_intflags(pTHX_ const char *lead, const U32 flags)
- {
-@@ -907,8 +1053,8 @@ Perl_regprop(pTHX_ const regexp *prog, S
- #endif /* DEBUGGING */
- }
-
--#ifdef DEBUGGING
-
-+#ifdef DEBUGGING
- STATIC void
- S_put_code_point(pTHX_ SV *sv, UV c)
- {
-@@ -1517,154 +1663,4 @@ S_put_charclass_bitmap_innards(pTHX_ SV
-
- return did_output_something;
- }
--
--
--const regnode *
--Perl_dumpuntil(pTHX_ const regexp *r, const regnode *start, const regnode *node,
-- const regnode *last, const regnode *plast,
-- SV* sv, I32 indent, U32 depth)
--{
-- const regnode *next;
-- const regnode *optstart= NULL;
--
-- RXi_GET_DECL(r, ri);
-- DECLARE_AND_GET_RE_DEBUG_FLAGS;
--
-- PERL_ARGS_ASSERT_DUMPUNTIL;
--
--#ifdef DEBUG_DUMPUNTIL
-- Perl_re_printf( aTHX_ "--- %d : %d - %d - %d\n", indent, node-start,
-- last ? last-start : 0, plast ? plast-start : 0);
--#endif
--
-- if (plast && plast < last)
-- last= plast;
--
-- while (node && (!last || node < last)) {
-- const U8 op = OP(node);
--
-- if (op == CLOSE || op == SRCLOSE || op == WHILEM)
-- indent--;
-- next = regnext((regnode *)node);
-- const regnode *after = regnode_after((regnode *)node,0);
--
-- /* Where, what. */
-- if (op == OPTIMIZED) {
-- if (!optstart && RE_DEBUG_FLAG(RE_DEBUG_COMPILE_OPTIMISE))
-- optstart = node;
-- else
-- goto after_print;
-- } else
-- CLEAR_OPTSTART;
--
-- regprop(r, sv, node, NULL, NULL);
-- Perl_re_printf( aTHX_ "%4" IVdf ":%*s%s", (IV)(node - start),
-- (int)(2*indent + 1), "", SvPVX_const(sv));
--
-- if (op != OPTIMIZED) {
-- if (next == NULL) /* Next ptr. */
-- Perl_re_printf( aTHX_ " (0)");
-- else if (REGNODE_TYPE(op) == BRANCH
-- && REGNODE_TYPE(OP(next)) != BRANCH )
-- Perl_re_printf( aTHX_ " (FAIL)");
-- else
-- Perl_re_printf( aTHX_ " (%" IVdf ")", (IV)(next - start));
-- Perl_re_printf( aTHX_ "\n");
-- }
--
-- after_print:
-- if (REGNODE_TYPE(op) == BRANCHJ) {
-- assert(next);
-- const regnode *nnode = (OP(next) == LONGJMP
-- ? regnext((regnode *)next)
-- : next);
-- if (last && nnode > last)
-- nnode = last;
-- DUMPUNTIL(after, nnode);
-- }
-- else if (REGNODE_TYPE(op) == BRANCH) {
-- assert(next);
-- DUMPUNTIL(after, next);
-- }
-- else if ( REGNODE_TYPE(op) == TRIE ) {
-- const regnode *this_trie = node;
-- const U32 n = ARG1u(node);
-- const reg_ac_data * const ac = op>=AHOCORASICK ?
-- (reg_ac_data *)ri->data->data[n] :
-- NULL;
-- const reg_trie_data * const trie =
-- (reg_trie_data*)ri->data->data[op<AHOCORASICK ? n : ac->trie];
--#ifdef DEBUGGING
-- AV *const trie_words
-- = MUTABLE_AV(ri->data->data[n + TRIE_WORDS_OFFSET]);
--#endif
-- const regnode *nextbranch= NULL;
-- I32 word_idx;
-- SvPVCLEAR(sv);
-- for (word_idx= 0; word_idx < (I32)trie->wordcount; word_idx++) {
-- SV ** const elem_ptr = av_fetch_simple(trie_words, word_idx, 0);
--
-- Perl_re_indentf( aTHX_ "%s ",
-- indent+3,
-- elem_ptr
-- ? pv_pretty(sv, SvPV_nolen_const(*elem_ptr),
-- SvCUR(*elem_ptr), PL_dump_re_max_len,
-- PL_colors[0], PL_colors[1],
-- (SvUTF8(*elem_ptr)
-- ? PERL_PV_ESCAPE_UNI
-- : 0)
-- | PERL_PV_PRETTY_ELLIPSES
-- | PERL_PV_PRETTY_LTGT
-- )
-- : "???"
-- );
-- if (trie->jump) {
-- U16 dist= trie->jump[word_idx+1];
-- Perl_re_printf( aTHX_ "(%" UVuf ")\n",
-- (UV)((dist ? this_trie + dist : next) - start));
-- if (dist) {
-- if (!nextbranch)
-- nextbranch= this_trie + trie->jump[0];
-- DUMPUNTIL(this_trie + dist, nextbranch);
-- }
-- if (nextbranch && REGNODE_TYPE(OP(nextbranch))==BRANCH)
-- nextbranch= regnext((regnode *)nextbranch);
-- } else {
-- Perl_re_printf( aTHX_ "\n");
-- }
-- }
-- if (last && next > last)
-- node= last;
-- else
-- node= next;
-- }
-- else if ( op == CURLY ) { /* "next" might be very big: optimizer */
-- DUMPUNTIL(after, after + 1); /* +1 is NOT a REGNODE_AFTER */
-- }
-- else if (REGNODE_TYPE(op) == CURLY && op != CURLYX) {
-- assert(next);
-- DUMPUNTIL(after, next);
-- }
-- else if ( op == PLUS || op == STAR) {
-- DUMPUNTIL(after, after + 1); /* +1 NOT a REGNODE_AFTER */
-- }
-- else if (REGNODE_TYPE(op) == EXACT || op == ANYOFHs) {
-- /* Literal string, where present. */
-- node = (const regnode *)REGNODE_AFTER_varies(node);
-- }
-- else {
-- node = REGNODE_AFTER_opcode(node,op);
-- }
-- if (op == CURLYX || op == OPEN || op == SROPEN)
-- indent++;
-- if (REGNODE_TYPE(op) == END)
-- break;
-- }
-- CLEAR_OPTSTART;
--#ifdef DEBUG_DUMPUNTIL
-- Perl_re_printf( aTHX_ "--- %d\n", (int)indent);
--#endif
-- return node;
--}
--
--#endif /* DEBUGGING */
-+#endif /* DEBUGGING */
---- a/regcomp_invlist.c
-+++ b/regcomp_invlist.c
-@@ -18,7 +18,7 @@
- #include "unicode_constants.h"
- #include "regcomp_internal.h"
-
--
-+#ifdef PERL_RE_BUILD_AUX
- void
- Perl_populate_bitmap_from_invlist(pTHX_ SV * invlist, const UV offset, const U8 * bitmap, const Size_t len)
- {
-@@ -70,6 +70,7 @@ Perl_populate_invlist_from_bitmap(pTHX_
- }
- }
- }
-+#endif /* PERL_RE_BUILD_AUX */
-
- /* This section of code defines the inversion list object and its methods. The
- * interfaces are highly subject to change, so as much as possible is static to
---- a/regexec.c
-+++ b/regexec.c
-@@ -4421,7 +4421,8 @@ S_regtry(pTHX_ regmatch_info *reginfo, c
- */
- #define REPORT_CODE_OFF 29
- #define INDENT_CHARS(depth) ((int)(depth) % 20)
--#ifdef DEBUGGING
-+
-+#ifdef PERL_RE_BUILD_DEBUG
- int
- Perl_re_exec_indentf(pTHX_ const char *fmt, U32 depth, ...)
- {