Author: miguel
Date: 2007-07-12 18:54:01 -0400 (Thu, 12 Jul 2007)
New Revision: 81913

Modified:
   trunk/mcs/mcs/ChangeLog
   trunk/mcs/mcs/statement.cs
Log:
2007-07-12  Miguel de Icaza  <[EMAIL PROTECTED]>

        * statement.cs (Using.EmitLocalVariableDecls): We were leaving
        values on the stack on the call to Emit.   Use EmitStatement if
        possible, or using Emit + Pop if not possible.   Fixes #82064



Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog     2007-07-12 22:48:24 UTC (rev 81912)
+++ trunk/mcs/mcs/ChangeLog     2007-07-12 22:54:01 UTC (rev 81913)
@@ -1,3 +1,9 @@
+2007-07-12  Miguel de Icaza  <[EMAIL PROTECTED]>
+
+       * statement.cs (Using.EmitLocalVariableDecls): We were leaving
+       values on the stack on the call to Emit.   Use EmitStatement if
+       possible, or using Emit + Pop if not possible.   Fixes #82064
+
 2007-07-12  Raja R Harinath  <[EMAIL PROTECTED]>
 
        * expression.cs (Invocation.IsApplicable): Reorganize slightly to

Modified: trunk/mcs/mcs/statement.cs
===================================================================
--- trunk/mcs/mcs/statement.cs  2007-07-12 22:48:24 UTC (rev 81912)
+++ trunk/mcs/mcs/statement.cs  2007-07-12 22:54:01 UTC (rev 81913)
@@ -4468,8 +4468,15 @@
                        int i = 0;
 
                        for (i = 0; i < assign.Length; i++) {
-                               assign [i].Emit (ec);
+                               ExpressionStatement es = assign [i] as 
ExpressionStatement;
 
+                               if (es != null)
+                                       es.EmitStatement (ec);
+                               else {
+                                       assign [i].Emit (ec);
+                                       ig.Emit (OpCodes.Pop);
+                               }
+
                                if (emit_finally)
                                        ig.BeginExceptionBlock ();
                        }

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

Reply via email to