This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Where available, use _NSGetExecutablePath() to make $^X absolute.
[perl5.git] / regcomp.c
index a8b1b3c..ec8b3c1 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -2647,13 +2647,13 @@ S_join_exact(pTHX_ RExC_state_t *pRExC_state, regnode *scan, I32 *min, U32 flags
     }
     
 #ifdef DEBUGGING
-    /* Allow dumping */
+    /* Allow dumping but overwriting the collection of skipped
+     * ops and/or strings with fake optimized ops */
     n = scan + NODE_SZ_STR(scan);
     while (n <= stop) {
-        if (PL_regkind[OP(n)] != NOTHING || OP(n) == NOTHING) {
-            OP(n) = OPTIMIZED;
-            NEXT_OFF(n) = 0;
-        }
+       OP(n) = OPTIMIZED;
+       FLAGS(n) = 0;
+       NEXT_OFF(n) = 0;
         n++;
     }
 #endif
@@ -6129,10 +6129,9 @@ Perl__append_range_to_invlist(pTHX_ SV* const invlist, const UV start, const UV
        invlist_set_len(invlist, len - 1);
     }
 }
-#endif
 
-STATIC void
-S__invlist_union(pTHX_ SV* const a, SV* const b, SV** output)
+void
+Perl__invlist_union(pTHX_ SV* const a, SV* const b, SV** output)
 {
     /* Take the union of two inversion lists and point 'result' to it.  If
      * 'result' on input points to one of the two lists, the reference count to
@@ -6321,8 +6320,8 @@ S__invlist_union(pTHX_ SV* const a, SV* const b, SV** output)
     return;
 }
 
-STATIC void
-S__invlist_intersection(pTHX_ SV* const a, SV* const b, SV** i)
+void
+Perl__invlist_intersection(pTHX_ SV* const a, SV* const b, SV** i)
 {
     /* Take the intersection of two inversion lists and point 'i' to it.  If
      * 'i' on input points to one of the two lists, the reference count to that
@@ -6490,6 +6489,8 @@ S__invlist_intersection(pTHX_ SV* const a, SV* const b, SV** i)
     return;
 }
 
+#endif
+
 STATIC SV*
 S_add_range_to_invlist(pTHX_ SV* invlist, const UV start, const UV end)
 {
@@ -6537,8 +6538,9 @@ S_add_cp_to_invlist(pTHX_ SV* invlist, const UV cp) {
     return add_range_to_invlist(invlist, cp, cp);
 }
 
-PERL_STATIC_INLINE void
-S__invlist_invert(pTHX_ SV* const invlist)
+#ifndef PERL_IN_XSUB_RE
+void
+Perl__invlist_invert(pTHX_ SV* const invlist)
 {
     /* Complement the input inversion list.  This adds a 0 if the list didn't
      * have a zero; removes it otherwise.  As described above, the data
@@ -6564,6 +6566,7 @@ S__invlist_invert(pTHX_ SV* const invlist)
        (*len_pos)++;
     }
 }
+#endif
 
 PERL_STATIC_INLINE SV*
 S_invlist_clone(pTHX_ SV* const invlist)
@@ -6580,8 +6583,9 @@ S_invlist_clone(pTHX_ SV* const invlist)
     return new_invlist;
 }
 
-STATIC void
-S__invlist_subtract(pTHX_ SV* const a, SV* const b, SV** result)
+#ifndef PERL_IN_XSUB_RE
+void
+Perl__invlist_subtract(pTHX_ SV* const a, SV* const b, SV** result)
 {
     /* Point result to an inversion list which consists of all elements in 'a'
      * that aren't also in 'b' */
@@ -6610,6 +6614,7 @@ S__invlist_subtract(pTHX_ SV* const a, SV* const b, SV** result)
 
     return;
 }
+#endif
 
 PERL_STATIC_INLINE UV*
 S_get_invlist_iter_addr(pTHX_ SV* invlist)