Author: raja
Date: 2006-05-18 07:49:06 -0400 (Thu, 18 May 2006)
New Revision: 60814

Modified:
   trunk/mcs/gmcs/ChangeLog
   trunk/mcs/gmcs/statement.cs
   trunk/mcs/mcs/ChangeLog
   trunk/mcs/mcs/statement.cs
Log:
* mcs/statement.cs (Block.Resolve): Always depend on flow-branching to
determine unreachability.  Kill workaround that originally emitted
only one statement after an "unreachable" label (see infloop in
test-515.cs).
* gmcs/statement.cs: Likewise.


Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog    2006-05-18 11:02:03 UTC (rev 60813)
+++ trunk/mcs/gmcs/ChangeLog    2006-05-18 11:49:06 UTC (rev 60814)
@@ -1,5 +1,10 @@
 2006-05-18  Raja R Harinath  <[EMAIL PROTECTED]>
 
+       * statement.cs (Block.Resolve): Always depend on flow-branching to
+       determine unreachability.  Kill workaround that originally emitted
+       only one statement after an "unreachable" label (see infloop in
+       test-515.cs).
+
        Fix #77869, #76148, #77755, #75255 and a host of other bugs.
        This is still "wrong", but anything better would probably need a
        multi-pass algorithm.

Modified: trunk/mcs/gmcs/statement.cs
===================================================================
--- trunk/mcs/gmcs/statement.cs 2006-05-18 11:02:03 UTC (rev 60813)
+++ trunk/mcs/gmcs/statement.cs 2006-05-18 11:49:06 UTC (rev 60814)
@@ -1931,10 +1931,10 @@
                                        statements [ix] = EmptyStatement.Value;
 
                                num_statements = ix + 1;
-                               if (s is LabeledStatement)
-                                       unreachable = false;
-                               else
-                                       unreachable = 
ec.CurrentBranching.CurrentUsageVector.Reachability.IsUnreachable;
+
+                               unreachable = 
ec.CurrentBranching.CurrentUsageVector.Reachability.IsUnreachable;
+                               if (unreachable && s is LabeledStatement)
+                                       throw new InternalErrorException 
("should not happen");
                        }
 
                        Report.Debug (4, "RESOLVE BLOCK DONE", StartLocation,

Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog     2006-05-18 11:02:03 UTC (rev 60813)
+++ trunk/mcs/mcs/ChangeLog     2006-05-18 11:49:06 UTC (rev 60814)
@@ -1,5 +1,10 @@
 2006-05-18  Raja R Harinath  <[EMAIL PROTECTED]>
 
+       * statement.cs (Block.Resolve): Always depend on flow-branching to
+       determine unreachability.  Kill workaround that originally emitted
+       only one statement after an "unreachable" label (see infloop in
+       test-515.cs).
+
        Fix #77869, #76148, #77755, #75255 and a host of other bugs.
        This is still "wrong", but anything better would probably need a
        multi-pass algorithm.

Modified: trunk/mcs/mcs/statement.cs
===================================================================
--- trunk/mcs/mcs/statement.cs  2006-05-18 11:02:03 UTC (rev 60813)
+++ trunk/mcs/mcs/statement.cs  2006-05-18 11:49:06 UTC (rev 60814)
@@ -1936,10 +1936,10 @@
                                        statements [ix] = EmptyStatement.Value;
 
                                num_statements = ix + 1;
-                               if (s is LabeledStatement)
-                                       unreachable = false;
-                               else
-                                       unreachable = 
ec.CurrentBranching.CurrentUsageVector.Reachability.IsUnreachable;
+
+                               unreachable = 
ec.CurrentBranching.CurrentUsageVector.Reachability.IsUnreachable;
+                               if (unreachable && s is LabeledStatement)
+                                       throw new InternalErrorException 
("should not happen");
                        }
 
                        Report.Debug (4, "RESOLVE BLOCK DONE", StartLocation,

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

Reply via email to