Karsten Hopp d05184
To: vim_dev@googlegroups.com
Karsten Hopp d05184
Subject: Patch 7.4.497
Karsten Hopp d05184
Fcc: outbox
Karsten Hopp d05184
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp d05184
Mime-Version: 1.0
Karsten Hopp d05184
Content-Type: text/plain; charset=UTF-8
Karsten Hopp d05184
Content-Transfer-Encoding: 8bit
Karsten Hopp d05184
------------
Karsten Hopp d05184
Karsten Hopp d05184
Patch 7.4.497
Karsten Hopp d05184
Problem:    With some regexp patterns the NFA engine uses many states and
Karsten Hopp d05184
	    becomes very slow.  To the user it looks like Vim freezes.
Karsten Hopp d05184
Solution:   When the number of states reaches a limit fall back to the old
Karsten Hopp d05184
	    engine. (Christian Brabandt)
Karsten Hopp d05184
Files:	    runtime/doc/options.txt, src/Makefile, src/regexp.c, src/regexp.h,
Karsten Hopp d05184
	    src/regexp_nfa.c, src/testdir/Make_dos.mak,
Karsten Hopp d05184
	    src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
Karsten Hopp d05184
	    src/testdir/Makefile, src/testdir/samples/re.freeze.txt,
Karsten Hopp d05184
	    src/testdir/bench_re_freeze.in, src/testdir/bench_re_freeze.vim,
Karsten Hopp d05184
	    Filelist
Karsten Hopp d05184
Karsten Hopp d05184
Karsten Hopp d05184
*** ../vim-7.4.496/runtime/doc/options.txt	2014-09-23 15:45:04.866801055 +0200
Karsten Hopp d05184
--- runtime/doc/options.txt	2014-11-05 12:06:16.664961112 +0100
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 5622,5627 ****
Karsten Hopp d05184
--- 5626,5635 ----
Karsten Hopp d05184
  	Note that when using the NFA engine and the pattern contains something
Karsten Hopp d05184
  	that is not supported the pattern will not match.  This is only useful
Karsten Hopp d05184
  	for debugging the regexp engine.
Karsten Hopp d05184
+ 	Using automatic selection enables Vim to switch the engine, if the
Karsten Hopp d05184
+ 	default engine becomes too costly.  E.g., when the NFA engine uses too
Karsten Hopp d05184
+ 	many states.  This should prevent Vim from hanging on a combination of
Karsten Hopp d05184
+ 	a complex pattern with long text.
Karsten Hopp d05184
  
Karsten Hopp d05184
  		*'relativenumber'* *'rnu'* *'norelativenumber'* *'nornu'*
Karsten Hopp d05184
  'relativenumber' 'rnu'	boolean	(default off)
Karsten Hopp d05184
*** ../vim-7.4.496/src/Makefile	2014-08-17 17:05:39.155057796 +0200
Karsten Hopp d05184
--- src/Makefile	2014-11-05 12:01:58.704967328 +0100
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 1879,1884 ****
Karsten Hopp d05184
--- 1879,1887 ----
Karsten Hopp d05184
  	cd testdir; $(MAKE) -f Makefile $(GUI_TESTTARGET) VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
Karsten Hopp d05184
  	$(MAKE) -f Makefile unittest
Karsten Hopp d05184
  
Karsten Hopp d05184
+ benchmark:
Karsten Hopp d05184
+ 	cd testdir; $(MAKE) -f Makefile benchmark VIMPROG=../$(VIMTARGET) SCRIPTSOURCE=../$(SCRIPTSOURCE)
Karsten Hopp d05184
+ 
Karsten Hopp d05184
  unittesttargets:
Karsten Hopp d05184
  	$(MAKE) -f Makefile $(UNITTEST_TARGETS)
Karsten Hopp d05184
  
Karsten Hopp d05184
*** ../vim-7.4.496/src/regexp.c	2014-09-09 17:18:44.008540299 +0200
Karsten Hopp d05184
--- src/regexp.c	2014-11-05 14:05:40.544788489 +0100
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 8011,8023 ****
Karsten Hopp d05184
      bt_regcomp,
Karsten Hopp d05184
      bt_regfree,
Karsten Hopp d05184
      bt_regexec_nl,
Karsten Hopp d05184
!     bt_regexec_multi
Karsten Hopp d05184
! #ifdef DEBUG
Karsten Hopp d05184
!     ,(char_u *)""
Karsten Hopp d05184
! #endif
Karsten Hopp d05184
  };
Karsten Hopp d05184
  
Karsten Hopp d05184
- 
Karsten Hopp d05184
  #include "regexp_nfa.c"
Karsten Hopp d05184
  
Karsten Hopp d05184
  static regengine_T nfa_regengine =
Karsten Hopp d05184
--- 8011,8020 ----
Karsten Hopp d05184
      bt_regcomp,
Karsten Hopp d05184
      bt_regfree,
Karsten Hopp d05184
      bt_regexec_nl,
Karsten Hopp d05184
!     bt_regexec_multi,
Karsten Hopp d05184
!     (char_u *)""
Karsten Hopp d05184
  };
Karsten Hopp d05184
  
Karsten Hopp d05184
  #include "regexp_nfa.c"
Karsten Hopp d05184
  
Karsten Hopp d05184
  static regengine_T nfa_regengine =
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 8025,8042 ****
Karsten Hopp d05184
      nfa_regcomp,
Karsten Hopp d05184
      nfa_regfree,
Karsten Hopp d05184
      nfa_regexec_nl,
Karsten Hopp d05184
!     nfa_regexec_multi
Karsten Hopp d05184
! #ifdef DEBUG
Karsten Hopp d05184
!     ,(char_u *)""
Karsten Hopp d05184
! #endif
Karsten Hopp d05184
  };
Karsten Hopp d05184
  
Karsten Hopp d05184
  /* Which regexp engine to use? Needed for vim_regcomp().
Karsten Hopp d05184
   * Must match with 'regexpengine'. */
Karsten Hopp d05184
  static int regexp_engine = 0;
Karsten Hopp d05184
! #define	    AUTOMATIC_ENGINE	0
Karsten Hopp d05184
! #define	    BACKTRACKING_ENGINE	1
Karsten Hopp d05184
! #define	    NFA_ENGINE		2
Karsten Hopp d05184
  #ifdef DEBUG
Karsten Hopp d05184
  static char_u regname[][30] = {
Karsten Hopp d05184
  		    "AUTOMATIC Regexp Engine",
Karsten Hopp d05184
--- 8022,8035 ----
Karsten Hopp d05184
      nfa_regcomp,
Karsten Hopp d05184
      nfa_regfree,
Karsten Hopp d05184
      nfa_regexec_nl,
Karsten Hopp d05184
!     nfa_regexec_multi,
Karsten Hopp d05184
!     (char_u *)""
Karsten Hopp d05184
  };
Karsten Hopp d05184
  
Karsten Hopp d05184
  /* Which regexp engine to use? Needed for vim_regcomp().
Karsten Hopp d05184
   * Must match with 'regexpengine'. */
Karsten Hopp d05184
  static int regexp_engine = 0;
Karsten Hopp d05184
! 
Karsten Hopp d05184
  #ifdef DEBUG
Karsten Hopp d05184
  static char_u regname[][30] = {
Karsten Hopp d05184
  		    "AUTOMATIC Regexp Engine",
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 8083,8092 ****
Karsten Hopp d05184
  	    regexp_engine = AUTOMATIC_ENGINE;
Karsten Hopp d05184
  	}
Karsten Hopp d05184
      }
Karsten Hopp d05184
- #ifdef DEBUG
Karsten Hopp d05184
      bt_regengine.expr = expr;
Karsten Hopp d05184
      nfa_regengine.expr = expr;
Karsten Hopp d05184
- #endif
Karsten Hopp d05184
  
Karsten Hopp d05184
      /*
Karsten Hopp d05184
       * First try the NFA engine, unless backtracking was requested.
Karsten Hopp d05184
--- 8076,8083 ----
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 8096,8102 ****
Karsten Hopp d05184
      else
Karsten Hopp d05184
  	prog = bt_regengine.regcomp(expr, re_flags);
Karsten Hopp d05184
  
Karsten Hopp d05184
!     if (prog == NULL)	    /* error compiling regexp with initial engine */
Karsten Hopp d05184
      {
Karsten Hopp d05184
  #ifdef BT_REGEXP_DEBUG_LOG
Karsten Hopp d05184
  	if (regexp_engine != BACKTRACKING_ENGINE)   /* debugging log for NFA */
Karsten Hopp d05184
--- 8087,8094 ----
Karsten Hopp d05184
      else
Karsten Hopp d05184
  	prog = bt_regengine.regcomp(expr, re_flags);
Karsten Hopp d05184
  
Karsten Hopp d05184
!     /* Check for error compiling regexp with initial engine. */
Karsten Hopp d05184
!     if (prog == NULL)
Karsten Hopp d05184
      {
Karsten Hopp d05184
  #ifdef BT_REGEXP_DEBUG_LOG
Karsten Hopp d05184
  	if (regexp_engine != BACKTRACKING_ENGINE)   /* debugging log for NFA */
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 8114,8126 ****
Karsten Hopp d05184
  	}
Karsten Hopp d05184
  #endif
Karsten Hopp d05184
  	/*
Karsten Hopp d05184
! 	 * If the NFA engine failed, the backtracking engine won't work either.
Karsten Hopp d05184
  	 *
Karsten Hopp d05184
  	if (regexp_engine == AUTOMATIC_ENGINE)
Karsten Hopp d05184
  	    prog = bt_regengine.regcomp(expr, re_flags);
Karsten Hopp d05184
  	 */
Karsten Hopp d05184
      }
Karsten Hopp d05184
  
Karsten Hopp d05184
      return prog;
Karsten Hopp d05184
  }
Karsten Hopp d05184
  
Karsten Hopp d05184
--- 8106,8132 ----
Karsten Hopp d05184
  	}
Karsten Hopp d05184
  #endif
Karsten Hopp d05184
  	/*
Karsten Hopp d05184
! 	 * If the NFA engine failed, try the backtracking engine.
Karsten Hopp d05184
! 	 * Disabled for now, both engines fail on the same patterns.
Karsten Hopp d05184
! 	 * Re-enable when regcomp() fails when the pattern would work better
Karsten Hopp d05184
! 	 * with the other engine.
Karsten Hopp d05184
  	 *
Karsten Hopp d05184
  	if (regexp_engine == AUTOMATIC_ENGINE)
Karsten Hopp d05184
+ 	{
Karsten Hopp d05184
  	    prog = bt_regengine.regcomp(expr, re_flags);
Karsten Hopp d05184
+ 	    regexp_engine == BACKTRACKING_ENGINE;
Karsten Hopp d05184
+ 	}
Karsten Hopp d05184
  	 */
Karsten Hopp d05184
      }
Karsten Hopp d05184
  
Karsten Hopp d05184
+     if (prog != NULL)
Karsten Hopp d05184
+     {
Karsten Hopp d05184
+ 	/* Store the info needed to call regcomp() again when the engine turns
Karsten Hopp d05184
+ 	 * out to be very slow when executing it. */
Karsten Hopp d05184
+ 	prog->re_engine = regexp_engine;
Karsten Hopp d05184
+ 	prog->re_flags  = re_flags;
Karsten Hopp d05184
+     }
Karsten Hopp d05184
+ 
Karsten Hopp d05184
      return prog;
Karsten Hopp d05184
  }
Karsten Hopp d05184
  
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 8135,8154 ****
Karsten Hopp d05184
  	prog->engine->regfree(prog);
Karsten Hopp d05184
  }
Karsten Hopp d05184
  
Karsten Hopp d05184
  /*
Karsten Hopp d05184
   * Match a regexp against a string.
Karsten Hopp d05184
   * "rmp->regprog" is a compiled regexp as returned by vim_regcomp().
Karsten Hopp d05184
   * Uses curbuf for line count and 'iskeyword'.
Karsten Hopp d05184
   *
Karsten Hopp d05184
   * Return TRUE if there is a match, FALSE if not.
Karsten Hopp d05184
   */
Karsten Hopp d05184
      int
Karsten Hopp d05184
  vim_regexec(rmp, line, col)
Karsten Hopp d05184
!     regmatch_T *rmp;
Karsten Hopp d05184
!     char_u      *line;  /* string to match against */
Karsten Hopp d05184
!     colnr_T     col;    /* column to start looking for match */
Karsten Hopp d05184
  {
Karsten Hopp d05184
!     return rmp->regprog->engine->regexec_nl(rmp, line, col, FALSE);
Karsten Hopp d05184
  }
Karsten Hopp d05184
  
Karsten Hopp d05184
  #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \
Karsten Hopp d05184
--- 8141,8215 ----
Karsten Hopp d05184
  	prog->engine->regfree(prog);
Karsten Hopp d05184
  }
Karsten Hopp d05184
  
Karsten Hopp d05184
+ #ifdef FEAT_EVAL
Karsten Hopp d05184
+ static void report_re_switch __ARGS((char_u *pat));
Karsten Hopp d05184
+ 
Karsten Hopp d05184
+     static void
Karsten Hopp d05184
+ report_re_switch(pat)
Karsten Hopp d05184
+     char_u *pat;
Karsten Hopp d05184
+ {
Karsten Hopp d05184
+     if (p_verbose > 0)
Karsten Hopp d05184
+     {
Karsten Hopp d05184
+ 	verbose_enter();
Karsten Hopp d05184
+ 	MSG_PUTS(_("Switching to backtracking RE engine for pattern: "));
Karsten Hopp d05184
+ 	MSG_PUTS(pat);
Karsten Hopp d05184
+ 	verbose_leave();
Karsten Hopp d05184
+     }
Karsten Hopp d05184
+ }
Karsten Hopp d05184
+ #endif
Karsten Hopp d05184
+ 
Karsten Hopp d05184
+ static int vim_regexec_both __ARGS((regmatch_T *rmp, char_u *line, colnr_T col, int nl));
Karsten Hopp d05184
+ 
Karsten Hopp d05184
  /*
Karsten Hopp d05184
   * Match a regexp against a string.
Karsten Hopp d05184
   * "rmp->regprog" is a compiled regexp as returned by vim_regcomp().
Karsten Hopp d05184
   * Uses curbuf for line count and 'iskeyword'.
Karsten Hopp d05184
+  * When "nl" is TRUE consider a "\n" in "line" to be a line break.
Karsten Hopp d05184
   *
Karsten Hopp d05184
   * Return TRUE if there is a match, FALSE if not.
Karsten Hopp d05184
   */
Karsten Hopp d05184
+     static int
Karsten Hopp d05184
+ vim_regexec_both(rmp, line, col, nl)
Karsten Hopp d05184
+     regmatch_T	*rmp;
Karsten Hopp d05184
+     char_u	*line;  /* string to match against */
Karsten Hopp d05184
+     colnr_T	col;    /* column to start looking for match */
Karsten Hopp d05184
+     int		nl;
Karsten Hopp d05184
+ {
Karsten Hopp d05184
+     int result = rmp->regprog->engine->regexec_nl(rmp, line, col, nl);
Karsten Hopp d05184
+ 
Karsten Hopp d05184
+     /* NFA engine aborted because it's very slow. */
Karsten Hopp d05184
+     if (rmp->regprog->re_engine == AUTOMATIC_ENGINE
Karsten Hopp d05184
+ 					       && result == NFA_TOO_EXPENSIVE)
Karsten Hopp d05184
+     {
Karsten Hopp d05184
+ 	int    save_p_re = p_re;
Karsten Hopp d05184
+ 	int    re_flags = rmp->regprog->re_flags;
Karsten Hopp d05184
+ 	char_u *pat = vim_strsave(((nfa_regprog_T *)rmp->regprog)->pattern);
Karsten Hopp d05184
+ 
Karsten Hopp d05184
+ 	p_re = BACKTRACKING_ENGINE;
Karsten Hopp d05184
+ 	vim_regfree(rmp->regprog);
Karsten Hopp d05184
+ 	if (pat != NULL)
Karsten Hopp d05184
+ 	{
Karsten Hopp d05184
+ #ifdef FEAT_EVAL
Karsten Hopp d05184
+ 	    report_re_switch(pat);
Karsten Hopp d05184
+ #endif
Karsten Hopp d05184
+ 	    rmp->regprog = vim_regcomp(pat, re_flags);
Karsten Hopp d05184
+ 	    if (rmp->regprog != NULL)
Karsten Hopp d05184
+ 		result = rmp->regprog->engine->regexec_nl(rmp, line, col, nl);
Karsten Hopp d05184
+ 	    vim_free(pat);
Karsten Hopp d05184
+ 	}
Karsten Hopp d05184
+ 
Karsten Hopp d05184
+ 	p_re = save_p_re;
Karsten Hopp d05184
+     }
Karsten Hopp d05184
+     return result;
Karsten Hopp d05184
+ }
Karsten Hopp d05184
+ 
Karsten Hopp d05184
      int
Karsten Hopp d05184
  vim_regexec(rmp, line, col)
Karsten Hopp d05184
!     regmatch_T	*rmp;
Karsten Hopp d05184
!     char_u	*line;
Karsten Hopp d05184
!     colnr_T	col;
Karsten Hopp d05184
  {
Karsten Hopp d05184
!     return vim_regexec_both(rmp, line, col, FALSE);
Karsten Hopp d05184
  }
Karsten Hopp d05184
  
Karsten Hopp d05184
  #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 8158,8168 ****
Karsten Hopp d05184
   */
Karsten Hopp d05184
      int
Karsten Hopp d05184
  vim_regexec_nl(rmp, line, col)
Karsten Hopp d05184
!     regmatch_T *rmp;
Karsten Hopp d05184
!     char_u *line;
Karsten Hopp d05184
!     colnr_T col;
Karsten Hopp d05184
  {
Karsten Hopp d05184
!     return rmp->regprog->engine->regexec_nl(rmp, line, col, TRUE);
Karsten Hopp d05184
  }
Karsten Hopp d05184
  #endif
Karsten Hopp d05184
  
Karsten Hopp d05184
--- 8219,8229 ----
Karsten Hopp d05184
   */
Karsten Hopp d05184
      int
Karsten Hopp d05184
  vim_regexec_nl(rmp, line, col)
Karsten Hopp d05184
!     regmatch_T	*rmp;
Karsten Hopp d05184
!     char_u	*line;
Karsten Hopp d05184
!     colnr_T	col;
Karsten Hopp d05184
  {
Karsten Hopp d05184
!     return vim_regexec_both(rmp, line, col, TRUE);
Karsten Hopp d05184
  }
Karsten Hopp d05184
  #endif
Karsten Hopp d05184
  
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 8183,8187 ****
Karsten Hopp d05184
      colnr_T     col;            /* column to start looking for match */
Karsten Hopp d05184
      proftime_T	*tm;		/* timeout limit or NULL */
Karsten Hopp d05184
  {
Karsten Hopp d05184
!     return rmp->regprog->engine->regexec_multi(rmp, win, buf, lnum, col, tm);
Karsten Hopp d05184
  }
Karsten Hopp d05184
--- 8244,8275 ----
Karsten Hopp d05184
      colnr_T     col;            /* column to start looking for match */
Karsten Hopp d05184
      proftime_T	*tm;		/* timeout limit or NULL */
Karsten Hopp d05184
  {
Karsten Hopp d05184
!     int result = rmp->regprog->engine->regexec_multi(
Karsten Hopp d05184
! 						rmp, win, buf, lnum, col, tm);
Karsten Hopp d05184
! 
Karsten Hopp d05184
!     /* NFA engine aborted because it's very slow. */
Karsten Hopp d05184
!     if (rmp->regprog->re_engine == AUTOMATIC_ENGINE
Karsten Hopp d05184
! 					       && result == NFA_TOO_EXPENSIVE)
Karsten Hopp d05184
!     {
Karsten Hopp d05184
! 	int    save_p_re = p_re;
Karsten Hopp d05184
! 	int    re_flags = rmp->regprog->re_flags;
Karsten Hopp d05184
! 	char_u *pat = vim_strsave(((nfa_regprog_T *)rmp->regprog)->pattern);
Karsten Hopp d05184
! 
Karsten Hopp d05184
! 	p_re = BACKTRACKING_ENGINE;
Karsten Hopp d05184
! 	vim_regfree(rmp->regprog);
Karsten Hopp d05184
! 	if (pat != NULL)
Karsten Hopp d05184
! 	{
Karsten Hopp d05184
! #ifdef FEAT_EVAL
Karsten Hopp d05184
! 	    report_re_switch(pat);
Karsten Hopp d05184
! #endif
Karsten Hopp d05184
! 	    rmp->regprog = vim_regcomp(pat, re_flags);
Karsten Hopp d05184
! 	    if (rmp->regprog != NULL)
Karsten Hopp d05184
! 		result = rmp->regprog->engine->regexec_multi(
Karsten Hopp d05184
! 						rmp, win, buf, lnum, col, tm);
Karsten Hopp d05184
! 	    vim_free(pat);
Karsten Hopp d05184
! 	}
Karsten Hopp d05184
! 	p_re = save_p_re;
Karsten Hopp d05184
!     }
Karsten Hopp d05184
! 
Karsten Hopp d05184
!     return result;
Karsten Hopp d05184
  }
Karsten Hopp d05184
*** ../vim-7.4.496/src/regexp.h	2014-04-23 19:06:33.702828771 +0200
Karsten Hopp d05184
--- src/regexp.h	2014-11-05 13:09:14.136870089 +0100
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 27,32 ****
Karsten Hopp d05184
--- 27,44 ----
Karsten Hopp d05184
   */
Karsten Hopp d05184
  #define NFA_MAX_BRACES 20
Karsten Hopp d05184
  
Karsten Hopp d05184
+ /*
Karsten Hopp d05184
+  * In the NFA engine: how many states are allowed
Karsten Hopp d05184
+  */
Karsten Hopp d05184
+ #define NFA_MAX_STATES 100000
Karsten Hopp d05184
+ #define NFA_TOO_EXPENSIVE -1
Karsten Hopp d05184
+ 
Karsten Hopp d05184
+ /* Which regexp engine to use? Needed for vim_regcomp().
Karsten Hopp d05184
+  * Must match with 'regexpengine'. */
Karsten Hopp d05184
+ #define	    AUTOMATIC_ENGINE	0
Karsten Hopp d05184
+ #define	    BACKTRACKING_ENGINE	1
Karsten Hopp d05184
+ #define	    NFA_ENGINE		2
Karsten Hopp d05184
+ 
Karsten Hopp d05184
  typedef struct regengine regengine_T;
Karsten Hopp d05184
  
Karsten Hopp d05184
  /*
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 38,43 ****
Karsten Hopp d05184
--- 50,57 ----
Karsten Hopp d05184
  {
Karsten Hopp d05184
      regengine_T		*engine;
Karsten Hopp d05184
      unsigned		regflags;
Karsten Hopp d05184
+     unsigned		re_engine;   /* automatic, backtracking or nfa engine */
Karsten Hopp d05184
+     unsigned		re_flags;    /* second argument for vim_regcomp() */
Karsten Hopp d05184
  } regprog_T;
Karsten Hopp d05184
  
Karsten Hopp d05184
  /*
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 47,55 ****
Karsten Hopp d05184
   */
Karsten Hopp d05184
  typedef struct
Karsten Hopp d05184
  {
Karsten Hopp d05184
!     /* These two members implement regprog_T */
Karsten Hopp d05184
      regengine_T		*engine;
Karsten Hopp d05184
      unsigned		regflags;
Karsten Hopp d05184
  
Karsten Hopp d05184
      int			regstart;
Karsten Hopp d05184
      char_u		reganch;
Karsten Hopp d05184
--- 61,71 ----
Karsten Hopp d05184
   */
Karsten Hopp d05184
  typedef struct
Karsten Hopp d05184
  {
Karsten Hopp d05184
!     /* These four members implement regprog_T */
Karsten Hopp d05184
      regengine_T		*engine;
Karsten Hopp d05184
      unsigned		regflags;
Karsten Hopp d05184
+     unsigned		re_engine;
Karsten Hopp d05184
+     unsigned		re_flags;    /* second argument for vim_regcomp() */
Karsten Hopp d05184
  
Karsten Hopp d05184
      int			regstart;
Karsten Hopp d05184
      char_u		reganch;
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 81,89 ****
Karsten Hopp d05184
   */
Karsten Hopp d05184
  typedef struct
Karsten Hopp d05184
  {
Karsten Hopp d05184
!     /* These two members implement regprog_T */
Karsten Hopp d05184
      regengine_T		*engine;
Karsten Hopp d05184
      unsigned		regflags;
Karsten Hopp d05184
  
Karsten Hopp d05184
      nfa_state_T		*start;		/* points into state[] */
Karsten Hopp d05184
  
Karsten Hopp d05184
--- 97,107 ----
Karsten Hopp d05184
   */
Karsten Hopp d05184
  typedef struct
Karsten Hopp d05184
  {
Karsten Hopp d05184
!     /* These three members implement regprog_T */
Karsten Hopp d05184
      regengine_T		*engine;
Karsten Hopp d05184
      unsigned		regflags;
Karsten Hopp d05184
+     unsigned		re_engine;
Karsten Hopp d05184
+     unsigned		re_flags;    /* second argument for vim_regcomp() */
Karsten Hopp d05184
  
Karsten Hopp d05184
      nfa_state_T		*start;		/* points into state[] */
Karsten Hopp d05184
  
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 96,104 ****
Karsten Hopp d05184
  #ifdef FEAT_SYN_HL
Karsten Hopp d05184
      int			reghasz;
Karsten Hopp d05184
  #endif
Karsten Hopp d05184
- #ifdef DEBUG
Karsten Hopp d05184
      char_u		*pattern;
Karsten Hopp d05184
- #endif
Karsten Hopp d05184
      int			nsubexp;	/* number of () */
Karsten Hopp d05184
      int			nstate;
Karsten Hopp d05184
      nfa_state_T		state[1];	/* actually longer.. */
Karsten Hopp d05184
--- 114,120 ----
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 151,159 ****
Karsten Hopp d05184
      void	(*regfree)(regprog_T *);
Karsten Hopp d05184
      int		(*regexec_nl)(regmatch_T*, char_u*, colnr_T, int);
Karsten Hopp d05184
      long	(*regexec_multi)(regmmatch_T*, win_T*, buf_T*, linenr_T, colnr_T, proftime_T*);
Karsten Hopp d05184
- #ifdef DEBUG
Karsten Hopp d05184
      char_u	*expr;
Karsten Hopp d05184
- #endif
Karsten Hopp d05184
  };
Karsten Hopp d05184
  
Karsten Hopp d05184
  #endif	/* _REGEXP_H */
Karsten Hopp d05184
--- 167,173 ----
Karsten Hopp d05184
*** ../vim-7.4.496/src/regexp_nfa.c	2014-10-11 12:48:22.541259950 +0200
Karsten Hopp d05184
--- src/regexp_nfa.c	2014-11-05 13:08:43.876870818 +0100
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 5522,5527 ****
Karsten Hopp d05184
--- 5522,5534 ----
Karsten Hopp d05184
  	nextlist->n = 0;	    /* clear nextlist */
Karsten Hopp d05184
  	nextlist->has_pim = FALSE;
Karsten Hopp d05184
  	++nfa_listid;
Karsten Hopp d05184
+ 	if (prog->re_engine == AUTOMATIC_ENGINE && nfa_listid >= NFA_MAX_STATES)
Karsten Hopp d05184
+ 	{
Karsten Hopp d05184
+ 	    /* too many states, retry with old engine */
Karsten Hopp d05184
+ 	    nfa_match = NFA_TOO_EXPENSIVE;
Karsten Hopp d05184
+ 	    goto theend;
Karsten Hopp d05184
+ 	}
Karsten Hopp d05184
+ 
Karsten Hopp d05184
  	thislist->id = nfa_listid;
Karsten Hopp d05184
  	nextlist->id = nfa_listid + 1;
Karsten Hopp d05184
  
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 5704,5709 ****
Karsten Hopp d05184
--- 5711,5721 ----
Karsten Hopp d05184
  			 */
Karsten Hopp d05184
  			result = recursive_regmatch(t->state, NULL, prog,
Karsten Hopp d05184
  						       submatch, m, &listids);
Karsten Hopp d05184
+ 			if (result == NFA_TOO_EXPENSIVE)
Karsten Hopp d05184
+ 			{
Karsten Hopp d05184
+ 			    nfa_match = result;
Karsten Hopp d05184
+ 			    goto theend;
Karsten Hopp d05184
+ 			}
Karsten Hopp d05184
  
Karsten Hopp d05184
  			/* for \@! and \@
Karsten Hopp d05184
  			 * FALSE */
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 5817,5822 ****
Karsten Hopp d05184
--- 5829,5839 ----
Karsten Hopp d05184
  		/* First try matching the pattern. */
Karsten Hopp d05184
  		result = recursive_regmatch(t->state, NULL, prog,
Karsten Hopp d05184
  						       submatch, m, &listids);
Karsten Hopp d05184
+ 		if (result == NFA_TOO_EXPENSIVE)
Karsten Hopp d05184
+ 		{
Karsten Hopp d05184
+ 		    nfa_match = result;
Karsten Hopp d05184
+ 		    goto theend;
Karsten Hopp d05184
+ 		}
Karsten Hopp d05184
  		if (result)
Karsten Hopp d05184
  		{
Karsten Hopp d05184
  		    int bytelen;
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 6760,6765 ****
Karsten Hopp d05184
--- 6777,6783 ----
Karsten Hopp d05184
      int		i;
Karsten Hopp d05184
      regsubs_T	subs, m;
Karsten Hopp d05184
      nfa_state_T	*start = prog->start;
Karsten Hopp d05184
+     int		result;
Karsten Hopp d05184
  #ifdef ENABLE_LOG
Karsten Hopp d05184
      FILE	*f;
Karsten Hopp d05184
  #endif
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 6791,6798 ****
Karsten Hopp d05184
      clear_sub(&m.synt);
Karsten Hopp d05184
  #endif
Karsten Hopp d05184
  
Karsten Hopp d05184
!     if (nfa_regmatch(prog, start, &subs, &m) == FALSE)
Karsten Hopp d05184
  	return 0;
Karsten Hopp d05184
  
Karsten Hopp d05184
      cleanup_subexpr();
Karsten Hopp d05184
      if (REG_MULTI)
Karsten Hopp d05184
--- 6809,6819 ----
Karsten Hopp d05184
      clear_sub(&m.synt);
Karsten Hopp d05184
  #endif
Karsten Hopp d05184
  
Karsten Hopp d05184
!     result = nfa_regmatch(prog, start, &subs, &m);
Karsten Hopp d05184
!     if (result == FALSE)
Karsten Hopp d05184
  	return 0;
Karsten Hopp d05184
+     else if (result == NFA_TOO_EXPENSIVE)
Karsten Hopp d05184
+ 	return result;
Karsten Hopp d05184
  
Karsten Hopp d05184
      cleanup_subexpr();
Karsten Hopp d05184
      if (REG_MULTI)
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 6929,6937 ****
Karsten Hopp d05184
      nfa_nsubexpr = prog->nsubexp;
Karsten Hopp d05184
      nfa_listid = 1;
Karsten Hopp d05184
      nfa_alt_listid = 2;
Karsten Hopp d05184
- #ifdef DEBUG
Karsten Hopp d05184
      nfa_regengine.expr = prog->pattern;
Karsten Hopp d05184
- #endif
Karsten Hopp d05184
  
Karsten Hopp d05184
      if (prog->reganch && col > 0)
Karsten Hopp d05184
  	return 0L;
Karsten Hopp d05184
--- 6950,6956 ----
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 6979,6987 ****
Karsten Hopp d05184
  
Karsten Hopp d05184
      retval = nfa_regtry(prog, col);
Karsten Hopp d05184
  
Karsten Hopp d05184
- #ifdef DEBUG
Karsten Hopp d05184
      nfa_regengine.expr = NULL;
Karsten Hopp d05184
- #endif
Karsten Hopp d05184
  
Karsten Hopp d05184
  theend:
Karsten Hopp d05184
      return retval;
Karsten Hopp d05184
--- 6998,7004 ----
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 7003,7011 ****
Karsten Hopp d05184
      if (expr == NULL)
Karsten Hopp d05184
  	return NULL;
Karsten Hopp d05184
  
Karsten Hopp d05184
- #ifdef DEBUG
Karsten Hopp d05184
      nfa_regengine.expr = expr;
Karsten Hopp d05184
- #endif
Karsten Hopp d05184
  
Karsten Hopp d05184
      init_class_tab();
Karsten Hopp d05184
  
Karsten Hopp d05184
--- 7020,7026 ----
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 7082,7091 ****
Karsten Hopp d05184
      /* Remember whether this pattern has any \z specials in it. */
Karsten Hopp d05184
      prog->reghasz = re_has_z;
Karsten Hopp d05184
  #endif
Karsten Hopp d05184
- #ifdef DEBUG
Karsten Hopp d05184
      prog->pattern = vim_strsave(expr);
Karsten Hopp d05184
      nfa_regengine.expr = NULL;
Karsten Hopp d05184
- #endif
Karsten Hopp d05184
  
Karsten Hopp d05184
  out:
Karsten Hopp d05184
      vim_free(post_start);
Karsten Hopp d05184
--- 7097,7104 ----
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 7099,7107 ****
Karsten Hopp d05184
  #ifdef ENABLE_LOG
Karsten Hopp d05184
      nfa_postfix_dump(expr, FAIL);
Karsten Hopp d05184
  #endif
Karsten Hopp d05184
- #ifdef DEBUG
Karsten Hopp d05184
      nfa_regengine.expr = NULL;
Karsten Hopp d05184
- #endif
Karsten Hopp d05184
      goto out;
Karsten Hopp d05184
  }
Karsten Hopp d05184
  
Karsten Hopp d05184
--- 7112,7118 ----
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 7115,7123 ****
Karsten Hopp d05184
      if (prog != NULL)
Karsten Hopp d05184
      {
Karsten Hopp d05184
  	vim_free(((nfa_regprog_T *)prog)->match_text);
Karsten Hopp d05184
- #ifdef DEBUG
Karsten Hopp d05184
  	vim_free(((nfa_regprog_T *)prog)->pattern);
Karsten Hopp d05184
- #endif
Karsten Hopp d05184
  	vim_free(prog);
Karsten Hopp d05184
      }
Karsten Hopp d05184
  }
Karsten Hopp d05184
--- 7126,7132 ----
Karsten Hopp d05184
*** ../vim-7.4.496/src/testdir/Make_dos.mak	2014-10-21 20:57:11.534295006 +0200
Karsten Hopp d05184
--- src/testdir/Make_dos.mak	2014-11-05 14:14:56.536775091 +0100
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 87,92 ****
Karsten Hopp d05184
--- 87,93 ----
Karsten Hopp d05184
  	-if exist Xfind rd /s /q Xfind
Karsten Hopp d05184
  	-if exist viminfo del viminfo
Karsten Hopp d05184
  	-del test.log
Karsten Hopp d05184
+ 	-if exists benchmark.out del benchmark.out
Karsten Hopp d05184
  
Karsten Hopp d05184
  .in.out:
Karsten Hopp d05184
  	-if exist $*.failed del $*.failed
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 103,105 ****
Karsten Hopp d05184
--- 104,114 ----
Karsten Hopp d05184
  
Karsten Hopp d05184
  nolog:
Karsten Hopp d05184
  	-del test.log
Karsten Hopp d05184
+ 
Karsten Hopp d05184
+ benchmark:
Karsten Hopp d05184
+ 	bench_re_freeze.out
Karsten Hopp d05184
+ 
Karsten Hopp d05184
+ bench_re_freeze.out: bench_re_freeze.vim
Karsten Hopp d05184
+ 	-if exist benchmark.out del benchmark.out
Karsten Hopp d05184
+ 	$(VIMPROG) -u dos.vim -U NONE --noplugin $*.in
Karsten Hopp d05184
+ 	@IF EXIST benchmark.out ( type benchmark.out )
Karsten Hopp d05184
*** ../vim-7.4.496/src/testdir/Make_ming.mak	2014-10-21 20:57:11.534295006 +0200
Karsten Hopp d05184
--- src/testdir/Make_ming.mak	2014-11-05 14:15:09.608774776 +0100
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 12,22 ****
Karsten Hopp d05184
--- 12,24 ----
Karsten Hopp d05184
  DEL = rm -f
Karsten Hopp d05184
  MV = mv
Karsten Hopp d05184
  CP = cp
Karsten Hopp d05184
+ CAT = cat
Karsten Hopp d05184
  DIRSLASH = /
Karsten Hopp d05184
  else
Karsten Hopp d05184
  DEL = del
Karsten Hopp d05184
  MV = rename
Karsten Hopp d05184
  CP = copy
Karsten Hopp d05184
+ CAT = type
Karsten Hopp d05184
  DIRSLASH = \\
Karsten Hopp d05184
  endif
Karsten Hopp d05184
  
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 72,77 ****
Karsten Hopp d05184
--- 74,81 ----
Karsten Hopp d05184
  
Karsten Hopp d05184
  SCRIPTS_GUI = test16.out
Karsten Hopp d05184
  
Karsten Hopp d05184
+ SCRIPTS_BENCH = bench_re_freeze.out
Karsten Hopp d05184
+ 
Karsten Hopp d05184
  .SUFFIXES: .in .out
Karsten Hopp d05184
  
Karsten Hopp d05184
  vimall:	fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS_GUI) $(SCRIPTS32)
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 80,85 ****
Karsten Hopp d05184
--- 84,91 ----
Karsten Hopp d05184
  nongui:	fixff $(SCRIPTS16) $(SCRIPTS)
Karsten Hopp d05184
  	echo ALL DONE
Karsten Hopp d05184
  
Karsten Hopp d05184
+ benchmark: $(SCRIPTS_BENCH)
Karsten Hopp d05184
+ 
Karsten Hopp d05184
  small:
Karsten Hopp d05184
  	echo ALL DONE
Karsten Hopp d05184
  
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 114,116 ****
Karsten Hopp d05184
--- 120,127 ----
Karsten Hopp d05184
  	-$(DEL) X*
Karsten Hopp d05184
  	-$(DEL) test.ok
Karsten Hopp d05184
  	-$(DEL) viminfo
Karsten Hopp d05184
+ 
Karsten Hopp d05184
+ bench_re_freeze.out: bench_re_freeze.vim
Karsten Hopp d05184
+ 	-$(DEL) benchmark.out
Karsten Hopp d05184
+ 	$(VIMPROG) -u dos.vim -U NONE --noplugin $*.in
Karsten Hopp d05184
+ 	$(CAT) benchmark.out
Karsten Hopp d05184
*** ../vim-7.4.496/src/testdir/Make_os2.mak	2014-10-21 20:57:11.538295006 +0200
Karsten Hopp d05184
--- src/testdir/Make_os2.mak	2014-11-05 12:57:59.616886342 +0100
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 50,55 ****
Karsten Hopp d05184
--- 50,57 ----
Karsten Hopp d05184
  		test_signs.out \
Karsten Hopp d05184
  		test_utf8.out
Karsten Hopp d05184
  
Karsten Hopp d05184
+ SCRIPTS_BENCH = bench_re_freeze.out
Karsten Hopp d05184
+ 
Karsten Hopp d05184
  .SUFFIXES: .in .out
Karsten Hopp d05184
  
Karsten Hopp d05184
  all:	/tmp $(SCRIPTS)
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 57,62 ****
Karsten Hopp d05184
--- 59,66 ----
Karsten Hopp d05184
  
Karsten Hopp d05184
  $(SCRIPTS): $(VIMPROG)
Karsten Hopp d05184
  
Karsten Hopp d05184
+ benchmark: $(SCRIPTS_BENCH)
Karsten Hopp d05184
+ 
Karsten Hopp d05184
  clean:
Karsten Hopp d05184
  	-rm -rf *.out Xdotest test.ok tiny.vim small.vim mbyte.vim viminfo
Karsten Hopp d05184
  
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 75,77 ****
Karsten Hopp d05184
--- 79,88 ----
Karsten Hopp d05184
  # Create a directory for temp files
Karsten Hopp d05184
  /tmp:
Karsten Hopp d05184
  	-mkdir /tmp
Karsten Hopp d05184
+ 
Karsten Hopp d05184
+ bench_re_freeze.out: bench_re_freeze.vim
Karsten Hopp d05184
+ 	-del $*.failed test.ok benchmark.out
Karsten Hopp d05184
+ 	copy $*.ok test.ok
Karsten Hopp d05184
+ 	$(VIMPROG) -u os2.vim --noplugin -s dotest.in $*.in
Karsten Hopp d05184
+ 	type benchmark.out
Karsten Hopp d05184
+ 
Karsten Hopp d05184
*** ../vim-7.4.496/src/testdir/Makefile	2014-10-21 20:57:11.538295006 +0200
Karsten Hopp d05184
--- src/testdir/Makefile	2014-11-05 14:15:13.320774687 +0100
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 48,59 ****
Karsten Hopp d05184
--- 48,63 ----
Karsten Hopp d05184
  
Karsten Hopp d05184
  SCRIPTS_GUI = test16.out
Karsten Hopp d05184
  
Karsten Hopp d05184
+ SCRIPTS_BENCH = bench_re_freeze.out
Karsten Hopp d05184
+ 
Karsten Hopp d05184
  .SUFFIXES: .in .out
Karsten Hopp d05184
  
Karsten Hopp d05184
  nongui:	nolog $(SCRIPTS) report
Karsten Hopp d05184
  
Karsten Hopp d05184
  gui:	nolog $(SCRIPTS) $(SCRIPTS_GUI) report
Karsten Hopp d05184
  
Karsten Hopp d05184
+ benchmark: $(SCRIPTS_BENCH)
Karsten Hopp d05184
+ 
Karsten Hopp d05184
  report:
Karsten Hopp d05184
  	@echo
Karsten Hopp d05184
  	@echo 'Test results:'
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 65,71 ****
Karsten Hopp d05184
  $(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG)
Karsten Hopp d05184
  
Karsten Hopp d05184
  RM_ON_RUN = test.out X* viminfo
Karsten Hopp d05184
! RM_ON_START = tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok
Karsten Hopp d05184
  RUN_VIM = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(VALGRIND) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in
Karsten Hopp d05184
  
Karsten Hopp d05184
  clean:
Karsten Hopp d05184
--- 69,75 ----
Karsten Hopp d05184
  $(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG)
Karsten Hopp d05184
  
Karsten Hopp d05184
  RM_ON_RUN = test.out X* viminfo
Karsten Hopp d05184
! RM_ON_START = tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok benchmark.out
Karsten Hopp d05184
  RUN_VIM = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(VALGRIND) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in
Karsten Hopp d05184
  
Karsten Hopp d05184
  clean:
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 120,124 ****
Karsten Hopp d05184
--- 124,137 ----
Karsten Hopp d05184
  
Karsten Hopp d05184
  test60.out: test60.vim
Karsten Hopp d05184
  
Karsten Hopp d05184
+ bench_re_freeze.out: bench_re_freeze.vim
Karsten Hopp d05184
+ 	-rm -rf benchmark.out $(RM_ON_RUN)
Karsten Hopp d05184
+ 	# Sleep a moment to avoid that the xterm title is messed up.
Karsten Hopp d05184
+ 	# 200 msec is sufficient, but only modern sleep supports a fraction of
Karsten Hopp d05184
+ 	# a second, fall back to a second if it fails.
Karsten Hopp d05184
+ 	@-/bin/sh -c "sleep .2 > /dev/null 2>&1 || sleep 1"
Karsten Hopp d05184
+ 	-$(RUN_VIM) $*.in
Karsten Hopp d05184
+ 	@/bin/sh -c "if test -f benchmark.out; then cat benchmark.out; fi"
Karsten Hopp d05184
+ 
Karsten Hopp d05184
  nolog:
Karsten Hopp d05184
  	-rm -f test.log
Karsten Hopp d05184
*** ../vim-7.4.496/src/testdir/samples/re.freeze.txt	1970-01-01 01:00:00.000000000 +0100
Karsten Hopp d05184
--- src/testdir/samples/re.freeze.txt	2014-11-05 11:50:44.176983582 +0100
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 0 ****
Karsten Hopp d05184
--- 1,6 ----
Karsten Hopp d05184
+ :set re=0 or 2
Karsten Hopp d05184
+ Search for the pattern: /\s\+\%#\@
Karsten Hopp d05184
+ vim should not freeze.
Karsten Hopp d05184
+ 
Karsten Hopp d05184
+ <font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font><font face=arial><font color=#ff0000>5</font></font> 
Karsten Hopp d05184
+ 
Karsten Hopp d05184
*** ../vim-7.4.496/src/testdir/bench_re_freeze.in	2014-11-05 14:02:46.420792685 +0100
Karsten Hopp d05184
--- src/testdir/bench_re_freeze.in	2014-11-05 14:24:33.000761201 +0100
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 0 ****
Karsten Hopp d05184
--- 1,13 ----
Karsten Hopp d05184
+ Test for Benchmarking RE engine
Karsten Hopp d05184
+ 
Karsten Hopp d05184
+ STARTTEST
Karsten Hopp d05184
+ :so small.vim
Karsten Hopp d05184
+ :if !has("reltime") | qa! | endif
Karsten Hopp d05184
+ :set nocp cpo&vim
Karsten Hopp d05184
+ :so bench_re_freeze.vim
Karsten Hopp d05184
+ :call Measure('samples/re.freeze.txt', '\s\+\%#\@
Karsten Hopp d05184
+ :/^" Benchmark/,$w! benchmark.out
Karsten Hopp d05184
+ :qa!
Karsten Hopp d05184
+ ENDTEST
Karsten Hopp d05184
+ 
Karsten Hopp d05184
+ " Benchmark_results:
Karsten Hopp d05184
*** ../vim-7.4.496/src/testdir/bench_re_freeze.vim	2014-11-05 14:02:46.432792684 +0100
Karsten Hopp d05184
--- src/testdir/bench_re_freeze.vim	2014-11-05 14:09:15.668783305 +0100
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 0 ****
Karsten Hopp d05184
--- 1,13 ----
Karsten Hopp d05184
+ "Test for benchmarking the RE engine
Karsten Hopp d05184
+ 
Karsten Hopp d05184
+ so small.vim
Karsten Hopp d05184
+ if !has("reltime") | finish | endif
Karsten Hopp d05184
+ func! Measure(file, pattern, arg)
Karsten Hopp d05184
+ 	for re in range(3)
Karsten Hopp d05184
+ 	    let sstart=reltime()
Karsten Hopp d05184
+ 	    let cmd=printf("../vim -u NONE -N --cmd ':set re=%d'".
Karsten Hopp d05184
+ 		\ " -c 'call search(\"%s\", \"\", \"\", 10000)' -c ':q!' %s", re, escape(a:pattern, '\\'), empty(a:arg) ? '' : a:arg)
Karsten Hopp d05184
+ 	    call system(cmd. ' '. a:file)
Karsten Hopp d05184
+ 	    $put =printf('file: %s, re: %d, time: %s', a:file, re, reltimestr(reltime(sstart)))
Karsten Hopp d05184
+ 	endfor
Karsten Hopp d05184
+ endfunc
Karsten Hopp d05184
*** ../vim-7.4.497/Filelist	2014-11-05 13:53:13.188806497 +0100
Karsten Hopp d05184
--- Filelist	2014-11-05 14:11:48.208779629 +0100
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 102,107 ****
Karsten Hopp d05184
--- 102,110 ----
Karsten Hopp d05184
  		src/testdir/pythonx/topmodule/submodule/subsubmodule/subsubsubmodule.py \
Karsten Hopp d05184
  		src/testdir/python_after/*.py \
Karsten Hopp d05184
  		src/testdir/python_before/*.py \
Karsten Hopp d05184
+ 		src/testdir/bench*.in \
Karsten Hopp d05184
+ 		src/testdir/bench*.vim \
Karsten Hopp d05184
+ 		src/testdir/samples.*.txt \
Karsten Hopp d05184
  		src/proto.h \
Karsten Hopp d05184
  		src/proto/blowfish.pro \
Karsten Hopp d05184
  		src/proto/buffer.pro \
Karsten Hopp d05184
*** ../vim-7.4.496/src/version.c	2014-11-05 13:53:13.188806497 +0100
Karsten Hopp d05184
--- src/version.c	2014-11-05 14:02:11.728793520 +0100
Karsten Hopp d05184
***************
Karsten Hopp d05184
*** 743,744 ****
Karsten Hopp d05184
--- 743,746 ----
Karsten Hopp d05184
  {   /* Add new patch number below this line */
Karsten Hopp d05184
+ /**/
Karsten Hopp d05184
+     497,
Karsten Hopp d05184
  /**/
Karsten Hopp d05184
Karsten Hopp d05184
-- 
Karsten Hopp d05184
    With sufficient thrust, pigs fly just fine.
Karsten Hopp d05184
                   -- RFC 1925
Karsten Hopp d05184
Karsten Hopp d05184
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp d05184
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp d05184
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp d05184
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///