mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
updated for version 7.3.1027
Problem: New regexp performance: Calling no_Magic() very often. Solution: Remove magicness inline.
This commit is contained in:
parent
e23febdb85
commit
c4912e555b
@ -3563,14 +3563,18 @@ nfa_regmatch(start, submatch, m)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default: /* regular character */
|
default: /* regular character */
|
||||||
/* TODO: put this in #ifdef later */
|
{
|
||||||
if (t->state->c < -256)
|
int c = t->state->c;
|
||||||
EMSGN("INTERNAL: Negative state char: %ld", t->state->c);
|
|
||||||
result = (no_Magic(t->state->c) == curc);
|
|
||||||
|
|
||||||
if (!result)
|
/* TODO: put this in #ifdef later */
|
||||||
result = ireg_ic == TRUE
|
if (c < -256)
|
||||||
&& MB_TOLOWER(t->state->c) == MB_TOLOWER(curc);
|
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
|
#ifdef FEAT_MBYTE
|
||||||
/* If there is a composing character which is not being
|
/* If there is a composing character which is not being
|
||||||
* ignored there can be no match. Match with composing
|
* ignored there can be no match. Match with composing
|
||||||
@ -3581,6 +3585,7 @@ nfa_regmatch(start, submatch, m)
|
|||||||
#endif
|
#endif
|
||||||
ADD_POS_NEG_STATE(t->state);
|
ADD_POS_NEG_STATE(t->state);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} /* for (thislist = thislist; thislist->state; thislist++) */
|
} /* for (thislist = thislist; thislist->state; thislist++) */
|
||||||
|
@ -728,6 +728,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1027,
|
||||||
/**/
|
/**/
|
||||||
1026,
|
1026,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user