Guard clause should happen first, otherwise its not a guard clause.
Yves Orton [Tue, 13 Jun 2006 09:39:42 +0000 (11:39 +0200)]
Message-ID: <9b18b3110606130039v1c6a3fe6s448e92ab2a05888a@mail.gmail.com>

p4raw-id: //depot/perl@28391

regcomp.c
regexec.c

index a891c48..8ea1dc6 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -2012,6 +2012,9 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, I32 *deltap,
     SV *re_trie_maxbuff = NULL;
 
     GET_RE_DEBUG_FLAGS_DECL;
+#ifdef DEBUGGING
+    StructCopy(&zero_scan_data, &data_fake, scan_data_t);    
+#endif
 
     while (scan && OP(scan) != END && scan < last) {
        /* Peephole optimizer: */
index a853b85..f93e17e 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -1603,7 +1603,7 @@ S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s,
                 points=(U8**)SvPV_nolen(sv_points );
 
                if (trie->bitmap && trie_type != trie_utf8_fold) {
-                   while (!TRIE_BITMAP_TEST(trie,*s) && s <= last_start ) {
+                   while (s <= last_start && !TRIE_BITMAP_TEST(trie,*s) ) {
                        s++;
                    }
                 }
@@ -1716,7 +1716,7 @@ S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s,
                             if (leftmost)
                                 break;
                             else if (!charid && trie->bitmap && trie_type != trie_utf8_fold) {
-                                while (!TRIE_BITMAP_TEST(trie,*uc) && uc <= (U8*)last_start ) {
+                                while ( uc <= (U8*)last_start  && !TRIE_BITMAP_TEST(trie,*uc) ) {
                                     uc++;
                                 }
                             }