|
Karsten Hopp |
d2dd93 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
d2dd93 |
Subject: Patch 7.3.1154
|
|
Karsten Hopp |
d2dd93 |
Fcc: outbox
|
|
Karsten Hopp |
d2dd93 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
d2dd93 |
Mime-Version: 1.0
|
|
Karsten Hopp |
d2dd93 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
d2dd93 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
d2dd93 |
------------
|
|
Karsten Hopp |
d2dd93 |
|
|
Karsten Hopp |
d2dd93 |
Patch 7.3.1154
|
|
Karsten Hopp |
d2dd93 |
Problem: New regexp_nfa engine: Uneccessary code.
|
|
Karsten Hopp |
d2dd93 |
Solution: Remove uneccessary code.
|
|
Karsten Hopp |
d2dd93 |
Files: src/regexp_nfa.c
|
|
Karsten Hopp |
d2dd93 |
|
|
Karsten Hopp |
d2dd93 |
|
|
Karsten Hopp |
d2dd93 |
*** ../vim-7.3.1153/src/regexp_nfa.c 2013-06-09 16:24:40.000000000 +0200
|
|
Karsten Hopp |
d2dd93 |
--- src/regexp_nfa.c 2013-06-09 17:02:03.000000000 +0200
|
|
Karsten Hopp |
d2dd93 |
***************
|
|
Karsten Hopp |
d2dd93 |
*** 3795,3808 ****
|
|
Karsten Hopp |
d2dd93 |
int did_print = FALSE;
|
|
Karsten Hopp |
d2dd93 |
#endif
|
|
Karsten Hopp |
d2dd93 |
|
|
Karsten Hopp |
d2dd93 |
- if (l == NULL || state == NULL)
|
|
Karsten Hopp |
d2dd93 |
- return;
|
|
Karsten Hopp |
d2dd93 |
-
|
|
Karsten Hopp |
d2dd93 |
switch (state->c)
|
|
Karsten Hopp |
d2dd93 |
{
|
|
Karsten Hopp |
d2dd93 |
- case NFA_SPLIT:
|
|
Karsten Hopp |
d2dd93 |
- case NFA_NOPEN:
|
|
Karsten Hopp |
d2dd93 |
- case NFA_SKIP_CHAR:
|
|
Karsten Hopp |
d2dd93 |
case NFA_NCLOSE:
|
|
Karsten Hopp |
d2dd93 |
case NFA_MCLOSE:
|
|
Karsten Hopp |
d2dd93 |
case NFA_MCLOSE1:
|
|
Karsten Hopp |
d2dd93 |
--- 3795,3802 ----
|
|
Karsten Hopp |
d2dd93 |
***************
|
|
Karsten Hopp |
d2dd93 |
*** 3827,3832 ****
|
|
Karsten Hopp |
d2dd93 |
--- 3821,3829 ----
|
|
Karsten Hopp |
d2dd93 |
case NFA_ZCLOSE9:
|
|
Karsten Hopp |
d2dd93 |
#endif
|
|
Karsten Hopp |
d2dd93 |
case NFA_ZEND:
|
|
Karsten Hopp |
d2dd93 |
+ case NFA_SPLIT:
|
|
Karsten Hopp |
d2dd93 |
+ case NFA_NOPEN:
|
|
Karsten Hopp |
d2dd93 |
+ case NFA_SKIP_CHAR:
|
|
Karsten Hopp |
d2dd93 |
/* These nodes are not added themselves but their "out" and/or
|
|
Karsten Hopp |
d2dd93 |
* "out1" may be added below. */
|
|
Karsten Hopp |
d2dd93 |
break;
|
|
Karsten Hopp |
d2dd93 |
***************
|
|
Karsten Hopp |
d2dd93 |
*** 3889,3900 ****
|
|
Karsten Hopp |
d2dd93 |
return;
|
|
Karsten Hopp |
d2dd93 |
}
|
|
Karsten Hopp |
d2dd93 |
|
|
Karsten Hopp |
d2dd93 |
if (has_state_with_pos(l, state, subs))
|
|
Karsten Hopp |
d2dd93 |
goto skip_add;
|
|
Karsten Hopp |
d2dd93 |
}
|
|
Karsten Hopp |
d2dd93 |
|
|
Karsten Hopp |
d2dd93 |
! /* when there are backreferences or look-behind matches the number
|
|
Karsten Hopp |
d2dd93 |
! * of states may be (a lot) bigger */
|
|
Karsten Hopp |
d2dd93 |
if (nfa_has_backref && l->n == l->len)
|
|
Karsten Hopp |
d2dd93 |
{
|
|
Karsten Hopp |
d2dd93 |
int newlen = l->len * 3 / 2 + 50;
|
|
Karsten Hopp |
d2dd93 |
--- 3886,3899 ----
|
|
Karsten Hopp |
d2dd93 |
return;
|
|
Karsten Hopp |
d2dd93 |
}
|
|
Karsten Hopp |
d2dd93 |
|
|
Karsten Hopp |
d2dd93 |
+ /* Do not add the state again when it exists with the same
|
|
Karsten Hopp |
d2dd93 |
+ * positions. */
|
|
Karsten Hopp |
d2dd93 |
if (has_state_with_pos(l, state, subs))
|
|
Karsten Hopp |
d2dd93 |
goto skip_add;
|
|
Karsten Hopp |
d2dd93 |
}
|
|
Karsten Hopp |
d2dd93 |
|
|
Karsten Hopp |
d2dd93 |
! /* When there are backreferences the number of states may be (a
|
|
Karsten Hopp |
d2dd93 |
! * lot) bigger than anticipated. */
|
|
Karsten Hopp |
d2dd93 |
if (nfa_has_backref && l->n == l->len)
|
|
Karsten Hopp |
d2dd93 |
{
|
|
Karsten Hopp |
d2dd93 |
int newlen = l->len * 3 / 2 + 50;
|
|
Karsten Hopp |
d2dd93 |
***************
|
|
Karsten Hopp |
d2dd93 |
*** 3985,3992 ****
|
|
Karsten Hopp |
d2dd93 |
sub = &subs->norm;
|
|
Karsten Hopp |
d2dd93 |
}
|
|
Karsten Hopp |
d2dd93 |
|
|
Karsten Hopp |
d2dd93 |
! /* Set the position (with "off") in the subexpression. Save and
|
|
Karsten Hopp |
d2dd93 |
! * restore it when it was in use. Otherwise fill any gap. */
|
|
Karsten Hopp |
d2dd93 |
save_ptr = NULL;
|
|
Karsten Hopp |
d2dd93 |
if (REG_MULTI)
|
|
Karsten Hopp |
d2dd93 |
{
|
|
Karsten Hopp |
d2dd93 |
--- 3984,3991 ----
|
|
Karsten Hopp |
d2dd93 |
sub = &subs->norm;
|
|
Karsten Hopp |
d2dd93 |
}
|
|
Karsten Hopp |
d2dd93 |
|
|
Karsten Hopp |
d2dd93 |
! /* Set the position (with "off" added) in the subexpression. Save
|
|
Karsten Hopp |
d2dd93 |
! * and restore it when it was in use. Otherwise fill any gap. */
|
|
Karsten Hopp |
d2dd93 |
save_ptr = NULL;
|
|
Karsten Hopp |
d2dd93 |
if (REG_MULTI)
|
|
Karsten Hopp |
d2dd93 |
{
|
|
Karsten Hopp |
d2dd93 |
*** ../vim-7.3.1153/src/version.c 2013-06-09 16:24:40.000000000 +0200
|
|
Karsten Hopp |
d2dd93 |
--- src/version.c 2013-06-09 17:24:42.000000000 +0200
|
|
Karsten Hopp |
d2dd93 |
***************
|
|
Karsten Hopp |
d2dd93 |
*** 730,731 ****
|
|
Karsten Hopp |
d2dd93 |
--- 730,733 ----
|
|
Karsten Hopp |
d2dd93 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
d2dd93 |
+ /**/
|
|
Karsten Hopp |
d2dd93 |
+ 1154,
|
|
Karsten Hopp |
d2dd93 |
/**/
|
|
Karsten Hopp |
d2dd93 |
|
|
Karsten Hopp |
d2dd93 |
|
|
Karsten Hopp |
d2dd93 |
--
|
|
Karsten Hopp |
d2dd93 |
~
|
|
Karsten Hopp |
d2dd93 |
~
|
|
Karsten Hopp |
d2dd93 |
~
|
|
Karsten Hopp |
d2dd93 |
".signature" 4 lines, 50 characters written
|
|
Karsten Hopp |
d2dd93 |
|
|
Karsten Hopp |
d2dd93 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
d2dd93 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
d2dd93 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
d2dd93 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|