summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2007-02-12 20:15:33 +0100
committerH.Merijn Brand <h.m.brand@xs4all.nl>2007-02-12 18:33:45 +0000
commit3e901dc0c5f53f3c2d9be0ef298df8eecfbaa8bd (patch)
tree27377f68dc019671a8459352a2ab2ed58335e249 /regexec.c
parent3fb2f3ac5c8ed8e4fdad7a9dbbce30a09d4f93f7 (diff)
downloadperl-3e901dc0c5f53f3c2d9be0ef298df8eecfbaa8bd.tar.gz
Re: [perl #41492] Incorrect match with /(?(DEFINE)(?<A> (?&B)+)(?<B> a))/
Message-ID: <9b18b3110702121015o1c84ff6hfd69cfa645fae0bf@mail.gmail.com> p4raw-id: //depot/perl@30236
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/regexec.c b/regexec.c
index 72b9e87b99..daa8e00523 100644
--- a/regexec.c
+++ b/regexec.c
@@ -122,8 +122,11 @@
/* TODO: Combine JUMPABLE and HAS_TEXT to cache OP(rn) */
/* for use after a quantifier and before an EXACT-like node -- japhy */
-#define JUMPABLE(rn) ( \
- OP(rn) == OPEN || OP(rn) == CLOSE || OP(rn) == EVAL || \
+/* it would be nice to rework regcomp.sym to generate this stuff. sigh */
+#define JUMPABLE(rn) ( \
+ OP(rn) == OPEN || \
+ (OP(rn) == CLOSE && (!cur_eval || cur_eval->u.eval.close_paren != ARG(rn))) || \
+ OP(rn) == EVAL || \
OP(rn) == SUSPEND || OP(rn) == IFMATCH || \
OP(rn) == PLUS || OP(rn) == MINMOD || \
OP(rn) == KEEPS || (PL_regkind[OP(rn)] == VERB) || \
@@ -4394,6 +4397,12 @@ NULL
&& UCHARAT(PL_reginput) != ST.c2)
{
/* simulate B failing */
+ DEBUG_OPTIMISE_r(
+ PerlIO_printf(Perl_debug_log,
+ "%*s CURLYM Fast bail c1=%"IVdf" c2=%"IVdf"\n",
+ (int)(REPORT_CODE_OFF+(depth*2)),"",
+ (IV)ST.c1,(IV)ST.c2
+ ));
state_num = CURLYM_B_fail;
goto reenter_switch;
}