-
-
- /// <summary>
- /// Resolves the core types in the compiler when compiling with --nostdlib
- /// </summary>
- static public void ResolveCore ()
- {
- 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");
-
- string [] interfaces_first_stage = {
- "System.IComparable", "System.ICloneable",
- "System.IConvertible",
-
- "System.Collections.IEnumerable",
- "System.Collections.ICollection",
- "System.Collections.IEnumerator",
- "System.Collections.IList",
- "System.IAsyncResult",
- "System.IDisposable",
-
- "System.Runtime.Serialization.ISerializable",
-
- "System.Reflection.IReflect",
- "System.Reflection.ICustomAttributeProvider",
-#if GMCS_SOURCE
- "System.Runtime.InteropServices._Exception",
-
- //
- // Generic types
- //
- "System.Collections.Generic.IEnumerator`1",
- "System.Collections.Generic.IEnumerable`1"
-#endif
- };
-
- foreach (string iname in interfaces_first_stage)
- BootstrapCorlib_ResolveInterface (root, iname);
-
- //
- // These are the base value types
- //
- string [] structs_first_stage = {
- "System.Byte", "System.SByte",
- "System.Int16", "System.UInt16",
- "System.Int32", "System.UInt32",
- "System.Int64", "System.UInt64",
- };
-
- foreach (string cname in structs_first_stage)
- BootstrapCorlib_ResolveStruct (root, cname);
-
- //
- // Now, we can load the enumerations, after this point,
- // we can use enums.
- //
- TypeManager.InitEnumUnderlyingTypes ();
-
- string [] structs_second_stage = {
- "System.Single", "System.Double",
- "System.Char", "System.Boolean",
- "System.Decimal", "System.Void",
- "System.RuntimeFieldHandle",
- "System.RuntimeArgumentHandle",
- "System.RuntimeTypeHandle",
- "System.IntPtr",
- "System.TypedReference",
- "System.ArgIterator"
- };
-
- foreach (string cname in structs_second_stage)
- BootstrapCorlib_ResolveStruct (root, cname);
-
- //
- // These are classes that depends on the core interfaces
- //
- string [] classes_second_stage = {
- "System.Enum",
- "System.String",
- "System.Array",
- "System.Reflection.MemberInfo",
- "System.Type",
- "System.Exception",
-#if GMCS_SOURCE
- "System.Activator",
-#endif
-
- //
- // These are not really important in the order, but they
- // are used by the compiler later on (typemanager/CoreLookupType-d)
- //
- "System.Runtime.CompilerServices.RuntimeHelpers",
- "System.Reflection.DefaultMemberAttribute",
- "System.Threading.Monitor",
- "System.Threading.Interlocked",
-
- "System.AttributeUsageAttribute",
- "System.Runtime.InteropServices.DllImportAttribute",
- "System.Runtime.CompilerServices.MethodImplAttribute",
- "System.Runtime.InteropServices.MarshalAsAttribute",
-#if GMCS_SOURCE
- "System.Runtime.CompilerServices.CompilerGeneratedAttribute",
- "System.Runtime.CompilerServices.FixedBufferAttribute",
-#endif
- "System.Diagnostics.ConditionalAttribute",
- "System.ObsoleteAttribute",
- "System.ParamArrayAttribute",
- "System.CLSCompliantAttribute",
- "System.Security.UnverifiableCodeAttribute",
- "System.Security.Permissions.SecurityAttribute",
- "System.Runtime.CompilerServices.DecimalConstantAttribute",
- "System.Runtime.InteropServices.InAttribute",
- "System.Runtime.InteropServices.OutAttribute",
- "System.Runtime.InteropServices.StructLayoutAttribute",
- "System.Runtime.InteropServices.FieldOffsetAttribute",
-#if GMCS_SOURCE
- "System.Runtime.InteropServices.DefaultCharSetAttribute",
-#endif
- "System.InvalidOperationException",
- "System.NotSupportedException",
- "System.MarshalByRefObject",
- "System.Security.CodeAccessPermission",
- "System.Runtime.CompilerServices.RequiredAttributeAttribute",
- "System.Runtime.InteropServices.GuidAttribute",
- "System.Reflection.AssemblyCultureAttribute"
- };
-
- foreach (string cname in classes_second_stage)
- BootstrapCorlib_ResolveClass (root, cname);
-#if GMCS_SOURCE
- BootstrapCorlib_ResolveStruct (root, "System.Nullable`1");
-#endif
- BootstrapCorlib_ResolveDelegate (root, "System.AsyncCallback");