0
0
mirror of https://github.com/vim/vim.git synced 2025-10-28 09:27:14 -04:00

updated for version 7.3.1154

Problem:    New regexp_nfa engine: Uneccessary code.
Solution:   Remove uneccessary code.
This commit is contained in:
Bram Moolenaar
2013-06-09 17:25:34 +02:00
parent 2a4e98ac1e
commit 927d4a1fb5
2 changed files with 11 additions and 10 deletions

View File

@@ -3795,14 +3795,8 @@ addstate(l, state, subs, pim, off)
int did_print = FALSE; int did_print = FALSE;
#endif #endif
if (l == NULL || state == NULL)
return;
switch (state->c) switch (state->c)
{ {
case NFA_SPLIT:
case NFA_NOPEN:
case NFA_SKIP_CHAR:
case NFA_NCLOSE: case NFA_NCLOSE:
case NFA_MCLOSE: case NFA_MCLOSE:
case NFA_MCLOSE1: case NFA_MCLOSE1:
@@ -3827,6 +3821,9 @@ addstate(l, state, subs, pim, off)
case NFA_ZCLOSE9: case NFA_ZCLOSE9:
#endif #endif
case NFA_ZEND: case NFA_ZEND:
case NFA_SPLIT:
case NFA_NOPEN:
case NFA_SKIP_CHAR:
/* These nodes are not added themselves but their "out" and/or /* These nodes are not added themselves but their "out" and/or
* "out1" may be added below. */ * "out1" may be added below. */
break; break;
@@ -3889,12 +3886,14 @@ skip_add:
return; return;
} }
/* Do not add the state again when it exists with the same
* positions. */
if (has_state_with_pos(l, state, subs)) if (has_state_with_pos(l, state, subs))
goto skip_add; goto skip_add;
} }
/* when there are backreferences or look-behind matches the number /* When there are backreferences the number of states may be (a
* of states may be (a lot) bigger */ * lot) bigger than anticipated. */
if (nfa_has_backref && l->n == l->len) if (nfa_has_backref && l->n == l->len)
{ {
int newlen = l->len * 3 / 2 + 50; int newlen = l->len * 3 / 2 + 50;
@@ -3985,8 +3984,8 @@ skip_add:
sub = &subs->norm; sub = &subs->norm;
} }
/* Set the position (with "off") in the subexpression. Save and /* Set the position (with "off" added) in the subexpression. Save
* restore it when it was in use. Otherwise fill any gap. */ * and restore it when it was in use. Otherwise fill any gap. */
save_ptr = NULL; save_ptr = NULL;
if (REG_MULTI) if (REG_MULTI)
{ {

View File

@@ -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 */
/**/
1154,
/**/ /**/
1153, 1153,
/**/ /**/