소스 검색

2002-07-03 Martin Baulig <[email protected]>

	* AssemblyBuilder.cs (corlib_object_type, corlib_value_type): Moved
	these fields up after the last entry in MonoReflectionAssemblyBuilder
	in reflection.h.

	* TypeBuilder.cs (IsValueTypeImpl): Use the AssemblyBuilder's
	`corlib_value_type' instead of `typeof (System.ValueType)'.
	(DefineNestedType): Use the AssemblyBuilder's `corlib_object_type'
	instead of `typeof (object)'.

svn path=/trunk/mcs/; revision=5573
Martin Baulig 23 년 전
부모
커밋
07fd75b332

+ 2 - 2
mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs

@@ -26,10 +26,10 @@ namespace System.Reflection.Emit {
 		private string name;
 		private string dir;
 		private CustomAttributeBuilder[] cattrs;
-		private int[] table_indexes;
-		internal ArrayList methods;
 		internal Type corlib_object_type = typeof (System.Object);
 		internal Type corlib_value_type = typeof (System.ValueType);
+		private int[] table_indexes;
+		internal ArrayList methods;
 
 		[MethodImplAttribute(MethodImplOptions.InternalCall)]
 		private static extern void basic_init (AssemblyBuilder ab);

+ 11 - 0
mcs/class/corlib/System.Reflection.Emit/ChangeLog

@@ -1,3 +1,14 @@
+2002-07-03  Martin Baulig  <[email protected]>
+
+	* AssemblyBuilder.cs (corlib_object_type, corlib_value_type): Moved
+	these fields up after the last entry in MonoReflectionAssemblyBuilder
+	in reflection.h.
+
+	* TypeBuilder.cs (IsValueTypeImpl): Use the AssemblyBuilder's
+	`corlib_value_type' instead of `typeof (System.ValueType)'.
+	(DefineNestedType): Use the AssemblyBuilder's `corlib_object_type'
+	instead of `typeof (object)'.
+
 2002-07-02  Martin Baulig  <[email protected]>
 
 	* AssemblyBuilder.cs (corlib_object_type, corlib_value_type): New

+ 3 - 3
mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs

@@ -165,11 +165,11 @@ namespace System.Reflection.Emit {
 		[MonoTODO]
 		public TypeBuilder DefineNestedType (string name) {
 			// FIXME: LAMESPEC: what other attributes should we use here as default?
-			return DefineNestedType (name, TypeAttributes.Public, typeof(object), null);
+			return DefineNestedType (name, TypeAttributes.Public, pmodule.assemblyb.corlib_object_type, null);
 		}
 
 		public TypeBuilder DefineNestedType (string name, TypeAttributes attr) {
-			return DefineNestedType (name, attr, typeof(object), null);
+			return DefineNestedType (name, attr, pmodule.assemblyb.corlib_object_type, null);
 		}
 
 		public TypeBuilder DefineNestedType (string name, TypeAttributes attr, Type parent) {
@@ -573,7 +573,7 @@ namespace System.Reflection.Emit {
 		}
 		protected override bool IsValueTypeImpl () {
 			// test this one
-			return type_is_subtype_of (this, typeof (System.ValueType), false);
+			return type_is_subtype_of (this, pmodule.assemblyb.corlib_value_type, false);
 		}
 		
 		public override RuntimeTypeHandle TypeHandle { get { return _impl; } }