Author: raja
Date: 2007-04-04 10:46:59 -0400 (Wed, 04 Apr 2007)
New Revision: 75393

Modified:
   trunk/mcs/class/System/System.Text.RegularExpressions/ChangeLog
   trunk/mcs/class/System/System.Text.RegularExpressions/interpreter.cs
Log:
* interpreter.cs (Eval) <OpCode.Reference>: Distribute for loop inside if.
for () if (a) s1; else s2; => if (a) for () s1; else for () s2;


Modified: trunk/mcs/class/System/System.Text.RegularExpressions/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.Text.RegularExpressions/ChangeLog     
2007-04-04 14:38:47 UTC (rev 75392)
+++ trunk/mcs/class/System/System.Text.RegularExpressions/ChangeLog     
2007-04-04 14:46:59 UTC (rev 75393)
@@ -1,3 +1,9 @@
+2007-04-04  Raja R Harinath  <[EMAIL PROTECTED]>
+
+       * interpreter.cs (Eval) <OpCode.Reference>: Distribute for loop
+       inside if.
+       for () if (a) s1; else s2; => if (a) for () s1; else for () s2;
+
 2007-04-03  Raja R Harinath  <[EMAIL PROTECTED]>
 
        * Regex.cs (~Regex): Don't define in NET_2_0 profile.

Modified: trunk/mcs/class/System/System.Text.RegularExpressions/interpreter.cs
===================================================================
--- trunk/mcs/class/System/System.Text.RegularExpressions/interpreter.cs        
2007-04-04 14:38:47 UTC (rev 75392)
+++ trunk/mcs/class/System/System.Text.RegularExpressions/interpreter.cs        
2007-04-04 14:46:59 UTC (rev 75393)
@@ -306,12 +306,13 @@
                                                goto Fail;
 
                                        pc += 2;
-                                       for (int i = 0; i < len; ++ i) {
-                                               if (ignore) {
+                                       if (ignore) {
+                                               for (int i = 0; i < len; ++ i) {
                                                        if (Char.ToLower 
(text[ptr + i]) != Char.ToLower (text[str + i]))
                                                                goto Fail;
                                                }
-                                               else {
+                                       } else {
+                                               for (int i = 0; i < len; ++ i) {
                                                        if (text[ptr + i] != 
text[str + i])
                                                                goto Fail;
                                                }

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

Reply via email to