2006-05-01 Rafael Teixeira <rafaelteixeirabr@hotmail.com>
[mono.git] / mcs / gmcs / rootcontext.cs
index b0f4bd2a3c8de495ab1b7c0099e27d1e46127396..f5ad0c98a628e98b442f466f84a483d464fe13c3 100644 (file)
@@ -85,6 +85,7 @@ namespace Mono.CSharp {
                public static string StrongNameKeyContainer;
                public static bool StrongNameDelaySign;
 
+               public static bool BrokenCircularDeps;
                //
                // If set, enable XML documentation generation
                //
@@ -297,7 +298,9 @@ namespace Mono.CSharp {
                        TypeContainer root = Tree.Types;
 
                        TypeManager.object_type = BootstrapCorlib_ResolveClass (root, "System.Object");
+                       TypeManager.system_object_expr.Type = TypeManager.object_type;
                        TypeManager.value_type = BootstrapCorlib_ResolveClass (root, "System.ValueType");
+                       TypeManager.system_valuetype_expr.Type = TypeManager.value_type;
                        TypeManager.attribute_type = BootstrapCorlib_ResolveClass (root, "System.Attribute");
                        TypeManager.indexer_name_type = BootstrapCorlib_ResolveClass (root, "System.Runtime.CompilerServices.IndexerNameAttribute");
                        
@@ -322,8 +325,7 @@ namespace Mono.CSharp {
                                // Generic types
                                //
                                "System.Collections.Generic.IEnumerator`1",
-                               "System.Collections.Generic.IEnumerable`1",
-                               "System.INullableValue"
+                               "System.Collections.Generic.IEnumerable`1"
                        };
 
                        foreach (string iname in interfaces_first_stage)
@@ -387,7 +389,6 @@ namespace Mono.CSharp {
                                "System.Runtime.InteropServices.DllImportAttribute",
                                "System.Runtime.CompilerServices.MethodImplAttribute",
                                "System.Runtime.InteropServices.MarshalAsAttribute",
-                               "System.Runtime.CompilerServices.NewConstraintAttribute",
                                "System.Runtime.CompilerServices.CompilerGeneratedAttribute",
                                "System.Runtime.CompilerServices.FixedBufferAttribute",
                                "System.Diagnostics.ConditionalAttribute",
@@ -497,7 +498,7 @@ namespace Mono.CSharp {
                {
                        DeclSpace ds = (DeclSpace) root.GetDefinition (name);
 
-                       ds.DefineMembers (root);
+                       ds.DefineMembers ();
                        ds.Define ();
                }
                
@@ -524,35 +525,20 @@ namespace Mono.CSharp {
                        if (type_container_resolve_order != null){
                                foreach (TypeContainer tc in type_container_resolve_order)
                                        tc.ResolveType ();
-                               if (RootContext.StdLib){
-                                       foreach (TypeContainer tc in type_container_resolve_order)
-                                               tc.DefineMembers (root);
-
-                               } else {
-                                       foreach (TypeContainer tc in type_container_resolve_order) {
-                                               // When compiling corlib, these types have already been
-                                               // populated from BootCorlib_PopulateCoreTypes ().
-                                               if (((tc.Name == "System.Object") ||
-                                                       (tc.Name == "System.Attribute") ||
-                                                       (tc.Name == "System.ValueType") ||
-                                                       (tc.Name == "System.Runtime.CompilerServices.IndexerNameAttribute")))
-                                               continue;
-
-                                               tc.DefineMembers (root);
-                                       }
-                               } 
+                               foreach (TypeContainer tc in type_container_resolve_order)
+                                       tc.DefineMembers ();
                        }
 
                        ArrayList delegates = root.Delegates;
                        if (delegates != null){
                                foreach (Delegate d in delegates)
-                                       d.DefineMembers (root);
+                                       d.DefineMembers ();
                        }
 
                        ArrayList enums = root.Enums;
                        if (enums != null){
                                foreach (Enum en in enums)
-                                       en.DefineMembers (root);
+                                       en.DefineMembers ();
                        }
 
                        //