diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-05-26 19:19:52 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-05-26 19:19:52 +0200 |
commit | c4912e555bb609604f7e86ee2c38fe600c25f369 (patch) | |
tree | be7d974bea618dd142534658a994b7e4a91bfc12 /src | |
parent | e23febdb857c0b0e297128d80bdde12240056653 (diff) | |
download | vim-git-c4912e555bb609604f7e86ee2c38fe600c25f369.tar.gz |
updated for version 7.3.1027v7.3.1027
Problem: New regexp performance: Calling no_Magic() very often.
Solution: Remove magicness inline.
Diffstat (limited to 'src')
-rw-r--r-- | src/regexp_nfa.c | 19 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 14 insertions, 7 deletions
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c index 9029460f8..aafe71530 100644 --- a/src/regexp_nfa.c +++ b/src/regexp_nfa.c @@ -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++) */ diff --git a/src/version.c b/src/version.c index 51d86af5b..c19efc34d 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1027, +/**/ 1026, /**/ 1025, |