Author: zoltan
Date: 2008-02-09 21:16:24 -0500 (Sat, 09 Feb 2008)
New Revision: 95353

Modified:
   trunk/mcs/class/System/System.Text.RegularExpressions/ChangeLog
   trunk/mcs/class/System/System.Text.RegularExpressions/interpreter.cs
Log:
2008-02-10  Zoltan Varga  <[EMAIL PROTECTED]>

        * interpreter.cs (Eval): Remove a needless string allocation.


Modified: trunk/mcs/class/System/System.Text.RegularExpressions/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.Text.RegularExpressions/ChangeLog     
2008-02-10 01:50:57 UTC (rev 95352)
+++ trunk/mcs/class/System/System.Text.RegularExpressions/ChangeLog     
2008-02-10 02:16:24 UTC (rev 95353)
@@ -1,3 +1,7 @@
+2008-02-10  Zoltan Varga  <[EMAIL PROTECTED]>
+
+       * interpreter.cs (Eval): Remove a needless string allocation.
+
 2007-12-04  Arina Itkes <[EMAIL PROTECTED]>
 
        * parser.cs: Max value of m for a construct {n,m} is 2147483647.

Modified: trunk/mcs/class/System/System.Text.RegularExpressions/interpreter.cs
===================================================================
--- trunk/mcs/class/System/System.Text.RegularExpressions/interpreter.cs        
2008-02-10 01:50:57 UTC (rev 95352)
+++ trunk/mcs/class/System/System.Text.RegularExpressions/interpreter.cs        
2008-02-10 02:16:24 UTC (rev 95353)
@@ -167,11 +167,10 @@
                                                //      True
                                 
                                                bool reverse = 
((OpFlags)program[pc + 3] & OpFlags.RightToLeft) != 0;
-                                               string substring = GetString 
(pc + 3);
 
                                                if (qs == null) {
                                                        bool ignore = 
((OpFlags)program[pc + 3] & OpFlags.IgnoreCase) != 0;
-
+                                                       string substring = 
GetString (pc + 3);
                                                        qs = new QuickSearch 
(substring, ignore, reverse);
                                                }
                                                while ((anch_reverse && 
anch_ptr >= anch_begin) 
@@ -181,7 +180,7 @@
                                                        {
                                                                anch_ptr = 
qs.Search (text, anch_ptr, anch_begin);
                                                                if (anch_ptr != 
-1)
-                                                                       
anch_ptr += substring.Length ;
+                                                                       
anch_ptr += qs.Length ;
                                                                
                                                        }
                                                        else

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to