Author: martin
Date: 2005-04-12 08:02:41 -0400 (Tue, 12 Apr 2005)
New Revision: 42820

Modified:
   trunk/mcs/gmcs/ChangeLog
   trunk/mcs/gmcs/anonymous.cs
   trunk/mcs/gmcs/codegen.cs
Log:
**** Merged r40457 from MCS ****


Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog    2005-04-12 11:49:10 UTC (rev 42819)
+++ trunk/mcs/gmcs/ChangeLog    2005-04-12 12:02:41 UTC (rev 42820)
@@ -1,3 +1,13 @@
+2005-01-30  Miguel de Icaza  <[EMAIL PROTECTED]>
+ 
+       * anonymous.cs (CreateMethodHost): If there Scope.ScopeTypeBuilder
+       is null it means that there has been no need to capture anything,
+       so we just create a sibling.
+
+       Renamed `EmitHelperClasses' to `EmitAnonymousHelperClasses'
+
+       Just a partial fix.  The other half is fairly elusive.
+       
 2005-02-10  Raja R Harinath  <[EMAIL PROTECTED]>
 
        Fix #52586, cs0121-4.cs.

Modified: trunk/mcs/gmcs/anonymous.cs
===================================================================
--- trunk/mcs/gmcs/anonymous.cs 2005-04-12 11:49:10 UTC (rev 42819)
+++ trunk/mcs/gmcs/anonymous.cs 2005-04-12 12:02:41 UTC (rev 42820)
@@ -113,7 +113,8 @@
                        //
                        
                        TypeBuilder current_type = ec.TypeContainer.TypeBuilder;
-                       TypeBuilder type_host = Scope == null ? current_type : 
Scope.ScopeTypeBuilder;
+                       TypeBuilder type_host = (Scope == null ) // || 
Scope.ScopeTypeBuilder == null)
+                               ? current_type : Scope.ScopeTypeBuilder;
 
                        if (current_type == null)
                                throw new Exception ("The current_type is 
null");
@@ -657,7 +658,7 @@
        public class CaptureContext {
                public static int count;
                public int cc_id;
-               Location loc;
+               public Location loc;
                
                //
                // Points to the toplevel block that owns this CaptureContext
@@ -948,7 +949,7 @@
                        return false;
                }
 
-               public void EmitHelperClasses (EmitContext ec)
+               public void EmitAnonymousHelperClasses (EmitContext ec)
                {
                        if (topmost != null){
                                topmost.NeedThis = HaveCapturedFields;
@@ -956,7 +957,7 @@
                        } 
                }
 
-               public void CloseHelperClasses ()
+               public void CloseAnonymousHelperClasses ()
                {
                        if (topmost != null)
                                topmost.CloseTypes ();

Modified: trunk/mcs/gmcs/codegen.cs
===================================================================
--- trunk/mcs/gmcs/codegen.cs   2005-04-12 11:49:10 UTC (rev 42819)
+++ trunk/mcs/gmcs/codegen.cs   2005-04-12 12:02:41 UTC (rev 42820)
@@ -560,7 +560,6 @@
 
                public void CaptureParameter (string name, Type t, int idx)
                {
-                       
                        capture_context.AddParameter (this, 
CurrentAnonymousMethod, name, t, idx);
                }
                
@@ -624,7 +623,7 @@
                public void EmitMeta (ToplevelBlock b, InternalParameters ip)
                {
                        if (capture_context != null)
-                               capture_context.EmitHelperClasses (this);
+                               capture_context.EmitAnonymousHelperClasses 
(this);
                        b.EmitMeta (this);
 
                        if (HasReturnLabel)
@@ -768,7 +767,7 @@
                        // Close pending helper classes if we are the toplevel
                        //
                        if (capture_context != null && 
capture_context.ParentToplevel == null)
-                               capture_context.CloseHelperClasses ();
+                               capture_context.CloseAnonymousHelperClasses ();
                }
 
                /// <summary>

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

Reply via email to