re_op_compile(): reapply debugging statements
authorDavid Mitchell <davem@iabyn.com>
Thu, 28 Mar 2013 15:29:14 +0000 (15:29 +0000)
committerDavid Mitchell <davem@iabyn.com>
Fri, 12 Apr 2013 10:29:55 +0000 (11:29 +0100)
These were temporarily removed a few commits ago to make rebasing easier.

(And since the code's been simplified in the conflicting branch, not so
many debug statements had to be added back as were in the original).

regcomp.c

index a7f4bb6..f680717 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -5364,6 +5364,10 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
         int n = 0;
         STRLEN orig_patlen = 0;
 
+        DEBUG_PARSE_r(PerlIO_printf(Perl_debug_log,
+            "Assembling pattern from %d elements%s\n", pat_count,
+                orig_rx_flags & RXf_SPLIT ? " for split" : ""));
+
        /* apply magic and RE overloading to each arg */
        for (svp = new_patternp; svp < new_patternp + pat_count; svp++) {
            SV *rx = *svp;
@@ -5526,6 +5530,10 @@ 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(PerlIO_printf(Perl_debug_log,
+                    "Precompiled pattern%s\n",
+                        orig_rx_flags & RXf_SPLIT ? " for split" : ""));
+
                return (REGEXP*)re;
            }
        }