From: Gurusamy Sarathy Date: Tue, 7 Jul 1998 22:08:48 +0000 (+0000) Subject: fix accidental RE-de-optimization X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ee027f1d663256f1223632e02ff1c8835809ce91;p=p5sagit%2Fp5-mst-13.2.git fix accidental RE-de-optimization From: larry@wall.org (Larry Wall) Date: Mon, 6 Jul 1998 17:49:31 -0700 Message-Id: <199807070049.RAA23475@wall.org> Subject: Re: before you deluge us with patches -- From: Ilya Zakharevich Date: Tue, 7 Jul 1998 03:10:56 -0400 (EDT) Message-Id: <199807070710.DAA25399@monk.mps.ohio-state.edu> Subject: Re: before you deluge us with patches p4raw-id: //depot/perl@1359 --- diff --git a/pp_hot.c b/pp_hot.c index d825e64..b52563a 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -881,7 +881,7 @@ play_it_again: goto nope; else if ((rx->reganch & ROPT_CHECK_ALL) && !sawampersand) goto yup; - if (s && rx->check_offset_max < t - s) { + if (s && rx->check_offset_max < s - t) { ++BmUSEFUL(rx->check_substr); s -= rx->check_offset_max; } diff --git a/regexec.c b/regexec.c index 6efc93c..77b9f2d 100644 --- a/regexec.c +++ b/regexec.c @@ -782,7 +782,7 @@ regmatch(regnode *prog) switch (OP(scan)) { case BOL: - if (locinput == regbol + if (locinput == bostr ? regprev == '\n' : (multiline && (nextchr || locinput < regeol) && locinput[-1] == '\n') ) @@ -792,7 +792,7 @@ regmatch(regnode *prog) } sayNO; case MBOL: - if (locinput == regbol + if (locinput == bostr ? regprev == '\n' : ((nextchr || locinput < regeol) && locinput[-1] == '\n') ) {