]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.1027 v7.3.1027
authorBram Moolenaar <Bram@vim.org>
Sun, 26 May 2013 17:19:52 +0000 (19:19 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 26 May 2013 17:19:52 +0000 (19:19 +0200)
Problem:    New regexp performance: Calling no_Magic() very often.
Solution:   Remove magicness inline.

src/regexp_nfa.c
src/version.c

index 9029460f871544e1ab0b83f4ca4f3870866d7489..aafe7153096afdb41c6429a7ce738151cfaff123 100644 (file)
@@ -3563,14 +3563,18 @@ nfa_regmatch(start, submatch, m)
                break;
 
            default:    /* regular character */
-               /* TODO: put this in #ifdef later */
-               if (t->state->c < -256)
-                   EMSGN("INTERNAL: Negative state char: %ld", t->state->c);
-               result = (no_Magic(t->state->c) == curc);
+             {
+               int c = t->state->c;
 
-               if (!result)
-                   result = ireg_ic == TRUE
-                              && MB_TOLOWER(t->state->c) == MB_TOLOWER(curc);
+               /* TODO: put this in #ifdef later */
+               if (c < -256)
+                   EMSGN("INTERNAL: Negative state char: %ld", c);
+               if (is_Magic(c))
+                   c = un_Magic(c);
+               result = (c == curc);
+
+               if (!result && ireg_ic)
+                   result = MB_TOLOWER(c) == MB_TOLOWER(curc);
 #ifdef FEAT_MBYTE
                /* If there is a composing character which is not being
                 * ignored there can be no match. Match with composing
@@ -3581,6 +3585,7 @@ nfa_regmatch(start, submatch, m)
 #endif
                ADD_POS_NEG_STATE(t->state);
                break;
+             }
            }
 
        } /* for (thislist = thislist; thislist->state; thislist++) */
index 51d86af5b123a2a6d351b8996f7468a10edea927..c19efc34df562edafe0ca3657a4e80050504f190 100644 (file)
@@ -728,6 +728,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1027,
 /**/
     1026,
 /**/