Merge System/MonoType.cs into ReferenceSources/RuntimeType.cs, use th… (#3045)
authorZoltan Varga <vargaz@gmail.com>
Thu, 26 May 2016 22:33:41 +0000 (18:33 -0400)
committerZoltan Varga <vargaz@gmail.com>
Thu, 26 May 2016 22:33:41 +0000 (18:33 -0400)
* Merge System/MonoType.cs into ReferenceSources/RuntimeType.cs, use the latter in the runtime code.

* [sdb] Fix a test which referenced System.MonoType.

22 files changed:
mcs/class/Mono.Debugger.Soft/Test/dtest.cs
mcs/class/corlib/ReferenceSources/RuntimeType.cs
mcs/class/corlib/System.Reflection/MonoMethod.cs
mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs
mcs/class/corlib/System/Environment.cs
mcs/class/corlib/System/MonoCustomAttrs.cs
mcs/class/corlib/System/MonoType.cs
mcs/class/corlib/System/RuntimeTypeHandle.cs
mcs/class/corlib/Test/System.Threading/ThreadTest.cs
mcs/class/referencesource/mscorlib/system/rttype.cs
mono/metadata/appdomain.c
mono/metadata/class-internals.h
mono/metadata/domain.c
mono/metadata/icall-def.h
mono/metadata/icall.c
mono/metadata/object-internals.h
mono/metadata/object.c
mono/metadata/reflection.c
mono/metadata/security-core-clr.c
mono/mini/debugger-agent.c
mono/mini/ir-emit.h
mono/mini/trace.c

index 086c6f5f9aa92214c1c9e00bf2ee9d8b98968484..cd0b6ae51ba33ef260f685dae6b0930e66c324ee 100644 (file)
@@ -1424,7 +1424,7 @@ public class DebuggerTests
 
                TypeMirror t = o.Type;
 
-               Assert.AreEqual ("MonoType", t.GetTypeObject ().Type.Name);
+               Assert.AreEqual ("RuntimeType", t.GetTypeObject ().Type.Name);
        }
 
        [Test]
index bedcf1af0c14a5bb94af6c4dc4bfc29dc8fc19a8..a3ede8423d9c91b10492b319a658883e2f9e935a 100644 (file)
@@ -41,14 +41,84 @@ using System.Runtime.Serialization;
 
 namespace System
 {
+       // Contains information about the type which is expensive to compute
+       [StructLayout (LayoutKind.Sequential)]
+       internal class MonoTypeInfo {
+               // this is the displayed form: special characters
+               // ,+*&*[]\ in the identifier portions of the names
+               // have been escaped with a leading backslash (\)
+               public string full_name;
+               public MonoCMethod default_ctor;
+       }
+
+       [StructLayout (LayoutKind.Sequential)]
        partial class RuntimeType
        {
+               [NonSerialized]
+               MonoTypeInfo type_info;
+
                internal Object GenericCache;
 
-               internal virtual MonoCMethod GetDefaultConstructor ()
+               [MethodImplAttribute(MethodImplOptions.InternalCall)]
+               private static extern void type_from_obj (RuntimeType type, Object obj);
+
+               internal RuntimeType (Object obj)
+               {
+                       // this should not be used - lupus
+                       type_from_obj (this, obj);
+
+                       throw new NotImplementedException ();
+               }
+
+               internal MonoCMethod GetDefaultConstructor ()
                {
-                       // TODO: Requires MonoType
-                       throw new NotSupportedException ();
+                       MonoCMethod ctor = null;
+
+                       if (type_info == null)
+                               type_info = new MonoTypeInfo ();
+                       else
+                               ctor = type_info.default_ctor;
+
+                       if (ctor == null) {
+                               var ctors = GetConstructors (BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.DeclaredOnly);
+
+                               for (int i = 0; i < ctors.Length; ++i) {
+                                       if (ctors [i].GetParametersCount () == 0) {
+                                               type_info.default_ctor = ctor = (MonoCMethod) ctors [i];
+                                               break;
+                                       }
+                               }
+                       }
+
+                       return ctor;
+               }
+
+               [MethodImplAttribute(MethodImplOptions.InternalCall)]
+               extern MethodInfo GetCorrespondingInflatedMethod (MethodInfo generic);
+
+               [MethodImplAttribute(MethodImplOptions.InternalCall)]
+               extern ConstructorInfo GetCorrespondingInflatedConstructor (ConstructorInfo generic);
+
+               internal override MethodInfo GetMethod (MethodInfo fromNoninstanciated)
+                {
+                       if (fromNoninstanciated == null)
+                               throw new ArgumentNullException ("fromNoninstanciated");
+                        return GetCorrespondingInflatedMethod (fromNoninstanciated);
+                }
+
+               internal override ConstructorInfo GetConstructor (ConstructorInfo fromNoninstanciated)
+               {
+                       if (fromNoninstanciated == null)
+                               throw new ArgumentNullException ("fromNoninstanciated");
+                        return GetCorrespondingInflatedConstructor (fromNoninstanciated);
+               }
+
+               internal override FieldInfo GetField (FieldInfo fromNoninstanciated)
+               {
+                       /* create sensible flags from given FieldInfo */
+                       BindingFlags flags = fromNoninstanciated.IsStatic ? BindingFlags.Static : BindingFlags.Instance;
+                       flags |= fromNoninstanciated.IsPublic ? BindingFlags.Public : BindingFlags.NonPublic;
+                       return GetField (fromNoninstanciated.Name, flags);
                }
 
                string GetDefaultMemberName ()
@@ -586,12 +656,6 @@ namespace System
                        get;
                }
 
-               public override string FullName {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-               }
-
                public extern override string Name {
                        [MethodImplAttribute(MethodImplOptions.InternalCall)]
                        get;
@@ -624,5 +688,32 @@ namespace System
                        get { return get_core_clr_security_level () == 1; }
                }
 #endif
+
+               public override int GetHashCode()
+               {
+                       Type t = UnderlyingSystemType;
+                       if (t != null && t != this)
+                               return t.GetHashCode ();
+                       return (int)_impl.Value;
+               }
+
+               public override string FullName {
+                       get {
+                               string fullName;
+                               // This doesn't need locking
+                               if (type_info == null)
+                                       type_info = new MonoTypeInfo ();
+                               if ((fullName = type_info.full_name) == null)
+                                       fullName = type_info.full_name = getFullName (true, false);
+
+                               return fullName;
+                       }
+               }
+
+               internal override bool IsUserType {
+                       get {
+                               return false;
+                       }
+               }
        }
 }
index 04c0c5670863215cc7f35d8bec6d2db80fca9b72..c93233dfffb57af19d0eaa9cc7092a2125e01739 100644 (file)
@@ -438,7 +438,7 @@ namespace System.Reflection {
                        foreach (Type type in methodInstantiation) {
                                if (type == null)
                                        throw new ArgumentNullException ();
-                               if (!(type is MonoType))
+                               if (!(type is RuntimeType))
                                        hasUserType = true;
                        }
 
index bc424ce5e2d7d40c6d6a12cc4aa88eec2f7eb76f..1b35fe1ee90b75337e05ce72f68a2e9017a9bc7f 100644 (file)
@@ -477,7 +477,7 @@ namespace System.Runtime.Remoting
                public static bool IsMethodOverloaded(IMethodMessage msg)
                {
                        const BindingFlags bfinst = BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance;
-                       MonoType type = (MonoType) msg.MethodBase.DeclaringType;
+                       RuntimeType type = (RuntimeType) msg.MethodBase.DeclaringType;
                        return type.GetMethodsByName (msg.MethodName, bfinst, false, type).Length > 1;
                }
 
index 0952e5528fc7a39b92ed8a268c67f53bd94fc6f6..1db3482d019ccc57b6e6278a032da87be42b94f8 100644 (file)
@@ -57,7 +57,7 @@ namespace System {
                 * of icalls, do not require an increment.
                 */
 #pragma warning disable 169
-               private const int mono_corlib_version = 147;
+               private const int mono_corlib_version = 148;
 #pragma warning restore 169
 
                [ComVisible (true)]
index 76b5b15e0417f6caa8d12149a8569c9e83d6eca3..8894ec98c98a6508329ec496e6dd3248269c1208 100644 (file)
@@ -49,14 +49,14 @@ namespace System
                [ThreadStatic]
                static Dictionary<Type, AttributeUsageAttribute> usage_cache;
 
-               /* Treat as user types all corlib types extending System.Type that are not MonoType and TypeBuilder */
+               /* Treat as user types all corlib types extending System.Type that are not RuntimeType and TypeBuilder */
                static bool IsUserCattrProvider (object obj)
                {
                        Type type = obj as Type;
 #if !FULL_AOT_RUNTIME
-                       if ((type is MonoType) || (type is TypeBuilder))
+                       if ((type is RuntimeType) || (type is TypeBuilder))
 #else
-                       if (type is MonoType)
+                       if (type is RuntimeType)
 #endif
                                return false;
                        if ((obj is Type))
index 0fd8fa7ec75a560f46db6323a72c2fb252bb92d3..efc24746ceccbaddda1f7f0c492acda35d2e17b5 100644 (file)
@@ -48,110 +48,11 @@ using System.Runtime;
 
 namespace System
 {
-       // Contains information about the type which is expensive to compute
-       [StructLayout (LayoutKind.Sequential)]
-       internal class MonoTypeInfo {
-               // this is the displayed form: special characters
-               // ,+*&*[]\ in the identifier portions of the names
-               // have been escaped with a leading backslash (\)
-               public string full_name;
-               public MonoCMethod default_ctor;
-       }
-
+       // Dummy type kept because lots of external code uses
+       // this to check whenever it is running on mono.
        [Serializable]
        [StructLayout (LayoutKind.Sequential)]
        class MonoType : RuntimeType, ISerializable
        {
-               [NonSerialized]
-               MonoTypeInfo type_info;
-
-               [MethodImplAttribute(MethodImplOptions.InternalCall)]
-               private static extern void type_from_obj (MonoType type, Object obj);
-               
-               internal MonoType (Object obj)
-               {
-                       // this should not be used - lupus
-                       type_from_obj (this, obj);
-                       
-                       throw new NotImplementedException ();
-               }
-
-               internal override MonoCMethod GetDefaultConstructor ()
-               {
-                       MonoCMethod ctor = null;
-                       
-                       if (type_info == null)
-                               type_info = new MonoTypeInfo ();
-                       else
-                               ctor = type_info.default_ctor;
-
-                       if (ctor == null) {
-                               var ctors = GetConstructors (BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.DeclaredOnly);
-
-                               for (int i = 0; i < ctors.Length; ++i) {
-                                       if (ctors [i].GetParametersCount () == 0) {
-                                               type_info.default_ctor = ctor = (MonoCMethod) ctors [i];
-                                               break;
-                                       }
-                               }
-                       }
-
-                       return ctor;
-               }
-
-               [MethodImplAttribute(MethodImplOptions.InternalCall)]
-               extern MethodInfo GetCorrespondingInflatedMethod (MethodInfo generic);
-
-               [MethodImplAttribute(MethodImplOptions.InternalCall)]
-               extern ConstructorInfo GetCorrespondingInflatedConstructor (ConstructorInfo generic);
-
-               internal override MethodInfo GetMethod (MethodInfo fromNoninstanciated)
-                {
-                       if (fromNoninstanciated == null)
-                               throw new ArgumentNullException ("fromNoninstanciated");
-                        return GetCorrespondingInflatedMethod (fromNoninstanciated);
-                }
-
-               internal override ConstructorInfo GetConstructor (ConstructorInfo fromNoninstanciated)
-               {
-                       if (fromNoninstanciated == null)
-                               throw new ArgumentNullException ("fromNoninstanciated");
-                        return GetCorrespondingInflatedConstructor (fromNoninstanciated);
-               }
-
-               internal override FieldInfo GetField (FieldInfo fromNoninstanciated)
-               {
-                       /* create sensible flags from given FieldInfo */
-                       BindingFlags flags = fromNoninstanciated.IsStatic ? BindingFlags.Static : BindingFlags.Instance;
-                       flags |= fromNoninstanciated.IsPublic ? BindingFlags.Public : BindingFlags.NonPublic;
-                       return GetField (fromNoninstanciated.Name, flags);
-               }
-
-               public override int GetHashCode()
-               {
-                       Type t = UnderlyingSystemType;
-                       if (t != null && t != this)
-                               return t.GetHashCode ();
-                       return (int)_impl.Value;
-               }
-
-               public override string FullName {
-                       get {
-                               string fullName;
-                               // This doesn't need locking
-                               if (type_info == null)
-                                       type_info = new MonoTypeInfo ();
-                               if ((fullName = type_info.full_name) == null)
-                                       fullName = type_info.full_name = getFullName (true, false);
-
-                               return fullName;
-                       }
-               }
-
-               internal override bool IsUserType {
-                       get {
-                               return false;
-                       }
-               }
        }
 }
index 479e867f5016a6fb66aca5ba7fb37274cd0fcc88..eb6c42f097648ff77d290c66f24e2a600768da87 100644 (file)
@@ -62,7 +62,7 @@ namespace System
                        if (info == null)
                                throw new ArgumentNullException ("info");
 
-                       MonoType mt = ((MonoType) info.GetValue ("TypeObj", typeof (MonoType)));
+                       RuntimeType mt = ((RuntimeType) info.GetValue ("TypeObj", typeof (RuntimeType)));
                        value = mt.TypeHandle.Value;
                        if (value == IntPtr.Zero)
                                throw new SerializationException (Locale.GetText ("Insufficient state."));
@@ -82,7 +82,7 @@ namespace System
                        if (value == IntPtr.Zero)
                                throw new SerializationException ("Object fields may not be properly initialized");
 
-                       info.AddValue ("TypeObj", Type.GetTypeHandle (this), typeof (MonoType));
+                       info.AddValue ("TypeObj", Type.GetTypeHandle (this), typeof (RuntimeType));
                }
 
                [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.Success)]
index e532913ff24a2632ef221276cea3ef03e1d96367..a869f7191f7daf9d8ba55795b459e8f909b117a2 100644 (file)
@@ -109,7 +109,7 @@ namespace MonoTests.System.Threading
                        }
 
                        // check a class in mscorlib to determine if we're running on Mono
-                       if (Type.GetType ("System.MonoType", false) != null)
+                       if (Type.GetType ("Mono.Runtime", false) != null)
                                is_mono = true;
                }
 
index 176fef96c62f09214d81dfd1d262182e3f8501a0..5e3d732b8e237f2a3852d83b798ff2b15eb6bea3 100644 (file)
@@ -5028,10 +5028,12 @@ namespace System
             return obj == (object)this;
         }
 
+#if !MONO
         public override int GetHashCode() 
         {
             return RuntimeHelpers.GetHashCode(this);
         }
+#endif
 
 #if !FEATURE_CORECLR
         public static bool operator ==(RuntimeType left, RuntimeType right)
index 3155861850469b91e0902c7dc8c015dc59b091d9..7d5efc30c109ccb33e29840b6e0489675f9a2c88 100644 (file)
@@ -81,7 +81,7 @@
  * Changes which are already detected at runtime, like the addition
  * of icalls, do not require an increment.
  */
-#define MONO_CORLIB_VERSION 147
+#define MONO_CORLIB_VERSION 148
 
 typedef struct
 {
index dcd856692c28b2d71ab285e5d336f2118cffd8be..b8f4aca8f8e091ad0aad3cd9c60628a61c5a5327 100644 (file)
@@ -1097,7 +1097,6 @@ typedef struct {
        MonoClass *fieldhandle_class;
        MonoClass *methodhandle_class;
        MonoClass *systemtype_class;
-       MonoClass *monotype_class;
        MonoClass *runtimetype_class;
        MonoClass *exception_class;
        MonoClass *threadabortexception_class;
index 26ab2d2d9b55a1d96d1d3360ecb4c6c484779824..a3ba4a76e0492b35533b95791df77c3eab1a235c 100644 (file)
@@ -707,9 +707,6 @@ mono_init_internal (const char *filename, const char *exe_filename, const char *
        mono_defaults.systemtype_class = mono_class_load_from_name (
                 mono_defaults.corlib, "System", "Type");
 
-       mono_defaults.monotype_class = mono_class_load_from_name (
-                mono_defaults.corlib, "System", "MonoType");
-
        mono_defaults.runtimetype_class = mono_class_load_from_name (
                 mono_defaults.corlib, "System", "RuntimeType");
 
@@ -1054,7 +1051,7 @@ unregister_vtable_reflection_type (MonoVTable *vtable)
 {
        MonoObject *type = (MonoObject *)vtable->type;
 
-       if (type->vtable->klass != mono_defaults.monotype_class)
+       if (type->vtable->klass != mono_defaults.runtimetype_class)
                MONO_GC_UNREGISTER_ROOT_IF_MOVING (vtable->type);
 }
 
index c659b843ce27cddc9d068c12de977128c45fef2d..ae1706e2aafbe370bd3d06544777b98a810c6820 100644 (file)
@@ -398,11 +398,6 @@ ICALL(MCATTR_1, "GetCustomAttributesDataInternal", ves_icall_MonoCustomAttrs_Get
 ICALL(MCATTR_2, "GetCustomAttributesInternal", custom_attrs_get_by_type)
 ICALL(MCATTR_3, "IsDefinedInternal", custom_attrs_defined_internal)
 
-ICALL_TYPE(MTYPE, "System.MonoType", MTYPE_1)
-ICALL(MTYPE_1, "GetCorrespondingInflatedConstructor", ves_icall_MonoType_GetCorrespondingInflatedMethod)
-ICALL(MTYPE_2, "GetCorrespondingInflatedMethod", ves_icall_MonoType_GetCorrespondingInflatedMethod)
-ICALL(MTYPE_3, "type_from_obj", ves_icall_MonoType_type_from_obj)
-
 #ifndef DISABLE_SOCKETS
 ICALL_TYPE(NDNS, "System.Net.Dns", NDNS_1)
 ICALL(NDNS_1, "GetHostByAddr_internal(string,string&,string[]&,string[]&)", ves_icall_System_Net_Dns_GetHostByAddr_internal)
@@ -737,32 +732,35 @@ ICALL(MHAN_1, "GetFunctionPointer", ves_icall_RuntimeMethodHandle_GetFunctionPoi
 
 ICALL_TYPE(RT, "System.RuntimeType", RT_1)
 ICALL(RT_1, "CreateInstanceInternal", ves_icall_System_Activator_CreateInstanceInternal)
-ICALL(RT_2, "GetConstructors_internal", ves_icall_Type_GetConstructors_internal)
-ICALL(RT_3, "GetEvents_internal", ves_icall_Type_GetEvents_internal)
-ICALL(RT_5, "GetFields_internal", ves_icall_Type_GetFields_internal)
-ICALL(RT_6, "GetGenericArgumentsInternal", ves_icall_MonoType_GetGenericArguments)
-ICALL(RT_7, "GetGenericParameterAttributes", ves_icall_Type_GetGenericParameterAttributes)
-ICALL(RT_8, "GetGenericParameterConstraints_impl", ves_icall_Type_GetGenericParameterConstraints)
-ICALL(RT_9, "GetGenericParameterPosition", ves_icall_Type_GetGenericParameterPosition)
-ICALL(RT_10, "GetInterfaceMapData", ves_icall_Type_GetInterfaceMapData)
-ICALL(RT_11, "GetInterfaces", ves_icall_Type_GetInterfaces)
-ICALL(RT_12, "GetMethodsByName", ves_icall_Type_GetMethodsByName)
-ICALL(RT_13, "GetNestedTypes_internal", ves_icall_Type_GetNestedTypes)
-ICALL(RT_14, "GetPacking", ves_icall_Type_GetPacking)
-ICALL(RT_15, "GetPropertiesByName", ves_icall_Type_GetPropertiesByName)
+ICALL(RT_2, "GetConstructors_internal", ves_icall_RuntimeType_GetConstructors_internal)
+ICALL(RT_30, "GetCorrespondingInflatedConstructor", ves_icall_RuntimeType_GetCorrespondingInflatedMethod)
+ICALL(RT_31, "GetCorrespondingInflatedMethod", ves_icall_RuntimeType_GetCorrespondingInflatedMethod)
+ICALL(RT_3, "GetEvents_internal", ves_icall_RuntimeType_GetEvents_internal)
+ICALL(RT_5, "GetFields_internal", ves_icall_RuntimeType_GetFields_internal)
+ICALL(RT_6, "GetGenericArgumentsInternal", ves_icall_RuntimeType_GetGenericArguments)
+ICALL(RT_7, "GetGenericParameterAttributes", ves_icall_RuntimeType_GetGenericParameterAttributes)
+ICALL(RT_8, "GetGenericParameterConstraints_impl", ves_icall_RuntimeType_GetGenericParameterConstraints)
+ICALL(RT_9, "GetGenericParameterPosition", ves_icall_RuntimeType_GetGenericParameterPosition)
+ICALL(RT_10, "GetInterfaceMapData", ves_icall_RuntimeType_GetInterfaceMapData)
+ICALL(RT_11, "GetInterfaces", ves_icall_RuntimeType_GetInterfaces)
+ICALL(RT_12, "GetMethodsByName", ves_icall_RuntimeType_GetMethodsByName)
+ICALL(RT_13, "GetNestedTypes_internal", ves_icall_RuntimeType_GetNestedTypes)
+ICALL(RT_14, "GetPacking", ves_icall_RuntimeType_GetPacking)
+ICALL(RT_15, "GetPropertiesByName", ves_icall_RuntimeType_GetPropertiesByName)
 ICALL(RT_16, "GetTypeCodeImplInternal", ves_icall_type_GetTypeCodeInternal)
 ICALL(RT_28, "IsTypeExportedToWindowsRuntime", ves_icall_System_RuntimeType_IsTypeExportedToWindowsRuntime)
 ICALL(RT_29, "IsWindowsRuntimeObjectType", ves_icall_System_RuntimeType_IsWindowsRuntimeObjectType)
-ICALL(RT_17, "MakeGenericType", ves_icall_Type_MakeGenericType)
-ICALL(RT_18, "MakePointerType", ves_icall_Type_MakePointerType)
+ICALL(RT_17, "MakeGenericType", ves_icall_RuntimeType_MakeGenericType)
+ICALL(RT_18, "MakePointerType", ves_icall_RuntimeType_MakePointerType)
 ICALL(RT_19, "getFullName", ves_icall_System_MonoType_getFullName)
-ICALL(RT_21, "get_DeclaringMethod", ves_icall_MonoType_get_DeclaringMethod)
-ICALL(RT_22, "get_DeclaringType", ves_icall_MonoType_get_DeclaringType)
-ICALL(RT_23, "get_Name", ves_icall_MonoType_get_Name)
-ICALL(RT_24, "get_Namespace", ves_icall_MonoType_get_Namespace)
-ICALL(RT_25, "get_core_clr_security_level", vell_icall_MonoType_get_core_clr_security_level)
-ICALL(RT_26, "make_array_type", ves_icall_Type_make_array_type)
-ICALL(RT_27, "make_byref_type", ves_icall_Type_make_byref_type)
+ICALL(RT_21, "get_DeclaringMethod", ves_icall_RuntimeType_get_DeclaringMethod)
+ICALL(RT_22, "get_DeclaringType", ves_icall_RuntimeType_get_DeclaringType)
+ICALL(RT_23, "get_Name", ves_icall_RuntimeType_get_Name)
+ICALL(RT_24, "get_Namespace", ves_icall_RuntimeType_get_Namespace)
+ICALL(RT_25, "get_core_clr_security_level", vell_icall_RuntimeType_get_core_clr_security_level)
+ICALL(RT_26, "make_array_type", ves_icall_RuntimeType_make_array_type)
+ICALL(RT_27, "make_byref_type", ves_icall_RuntimeType_make_byref_type)
+ICALL(RT_32, "type_from_obj", ves_icall_RuntimeType_type_from_obj)
 
 ICALL_TYPE(RTH, "System.RuntimeTypeHandle", RTH_1)
 ICALL(RTH_1, "GetArrayRank", ves_icall_RuntimeTypeHandle_GetArrayRank)
index 8d13d5c5d53f9ee22aa857169c83b67b156711e5..aac703ffb7bc55b0e804ad27509ea6f049ed9588 100644 (file)
@@ -1211,7 +1211,7 @@ ves_icall_System_Object_GetType (MonoObject *obj)
 }
 
 ICALL_EXPORT void
-ves_icall_MonoType_type_from_obj (MonoReflectionType *mtype, MonoObject *obj)
+ves_icall_RuntimeType_type_from_obj (MonoReflectionType *mtype, MonoObject *obj)
 {
        mtype->type = &obj->vtable->klass->byval_arg;
        g_assert (mtype->type->type);
@@ -2401,7 +2401,7 @@ get_interfaces_hash (gconstpointer v1)
 }
 
 ICALL_EXPORT MonoArray*
-ves_icall_Type_GetInterfaces (MonoReflectionType* type)
+ves_icall_RuntimeType_GetInterfaces (MonoReflectionType* type)
 {
        MonoError error;
        MonoClass *klass = mono_class_from_mono_type (type->type);
@@ -2432,14 +2432,14 @@ ves_icall_Type_GetInterfaces (MonoReflectionType* type)
        if (len == 0) {
                g_hash_table_destroy (iface_hash);
                if (!data.domain->empty_types) {
-                       data.domain->empty_types = mono_array_new_cached (data.domain, mono_defaults.monotype_class, 0, &error);
+                       data.domain->empty_types = mono_array_new_cached (data.domain, mono_defaults.runtimetype_class, 0, &error);
                        if (!is_ok (&error))
                                goto fail;
                }
                return data.domain->empty_types;
        }
 
-       data.iface_array = mono_array_new_cached (data.domain, mono_defaults.monotype_class, len, &error);
+       data.iface_array = mono_array_new_cached (data.domain, mono_defaults.runtimetype_class, len, &error);
        if (!is_ok (&error))
                goto fail;
        g_hash_table_foreach (iface_hash, fill_iface_array, &data);
@@ -2456,7 +2456,7 @@ fail:
 }
 
 ICALL_EXPORT void
-ves_icall_Type_GetInterfaceMapData (MonoReflectionType *type, MonoReflectionType *iface, MonoArray **targets, MonoArray **methods)
+ves_icall_RuntimeType_GetInterfaceMapData (MonoReflectionType *type, MonoReflectionType *iface, MonoArray **targets, MonoArray **methods)
 {
        gboolean variance_used;
        MonoClass *klass = mono_class_from_mono_type (type->type);
@@ -2507,7 +2507,7 @@ ves_icall_Type_GetInterfaceMapData (MonoReflectionType *type, MonoReflectionType
 }
 
 ICALL_EXPORT void
-ves_icall_Type_GetPacking (MonoReflectionType *type, guint32 *packing, guint32 *size)
+ves_icall_RuntimeType_GetPacking (MonoReflectionType *type, guint32 *packing, guint32 *size)
 {
        MonoError error;
        MonoClass *klass = mono_class_from_mono_type (type->type);
@@ -2641,7 +2641,7 @@ ves_icall_RuntimeTypeHandle_GetAssembly (MonoReflectionType *type)
 }
 
 ICALL_EXPORT MonoReflectionType*
-ves_icall_MonoType_get_DeclaringType (MonoReflectionType *type)
+ves_icall_RuntimeType_get_DeclaringType (MonoReflectionType *type)
 {
        MonoError error;
        MonoReflectionType *ret;
@@ -2670,7 +2670,7 @@ ves_icall_MonoType_get_DeclaringType (MonoReflectionType *type)
 }
 
 ICALL_EXPORT MonoString*
-ves_icall_MonoType_get_Name (MonoReflectionType *type)
+ves_icall_RuntimeType_get_Name (MonoReflectionType *type)
 {
        MonoDomain *domain = mono_domain_get (); 
        MonoClass *klass = mono_class_from_mono_type (type->type);
@@ -2688,7 +2688,7 @@ ves_icall_MonoType_get_Name (MonoReflectionType *type)
 }
 
 ICALL_EXPORT MonoString*
-ves_icall_MonoType_get_Namespace (MonoReflectionType *type)
+ves_icall_RuntimeType_get_Namespace (MonoReflectionType *type)
 {
        MonoDomain *domain = mono_domain_get (); 
        MonoClass *klass = mono_class_from_mono_type (type->type);
@@ -2724,7 +2724,7 @@ create_type_array (MonoDomain *domain, MonoBoolean runtimeTypeArray, int count,
 }
 
 ICALL_EXPORT MonoArray*
-ves_icall_MonoType_GetGenericArguments (MonoReflectionType *type, MonoBoolean runtimeTypeArray)
+ves_icall_RuntimeType_GetGenericArguments (MonoReflectionType *type, MonoBoolean runtimeTypeArray)
 {
        MonoError error;
        MonoReflectionType *rt;
@@ -2816,7 +2816,7 @@ ves_icall_RuntimeTypeHandle_GetGenericTypeDefinition_impl (MonoReflectionType *t
 }
 
 ICALL_EXPORT MonoReflectionType*
-ves_icall_Type_MakeGenericType (MonoReflectionType *type, MonoArray *type_array)
+ves_icall_RuntimeType_MakeGenericType (MonoReflectionType *type, MonoArray *type_array)
 {
        MonoError error;
        MonoReflectionType *ret;
@@ -2874,7 +2874,7 @@ ves_icall_RuntimeTypeHandle_HasInstantiation (MonoReflectionType *type)
 }
 
 ICALL_EXPORT gint32
-ves_icall_Type_GetGenericParameterPosition (MonoReflectionType *type)
+ves_icall_RuntimeType_GetGenericParameterPosition (MonoReflectionType *type)
 {
        if (!IS_MONOTYPE (type))
                return -1;
@@ -2885,7 +2885,7 @@ ves_icall_Type_GetGenericParameterPosition (MonoReflectionType *type)
 }
 
 ICALL_EXPORT GenericParameterAttributes
-ves_icall_Type_GetGenericParameterAttributes (MonoReflectionType *type)
+ves_icall_RuntimeType_GetGenericParameterAttributes (MonoReflectionType *type)
 {
        g_assert (IS_MONOTYPE (type));
        g_assert (is_generic_parameter (type->type));
@@ -2893,7 +2893,7 @@ ves_icall_Type_GetGenericParameterAttributes (MonoReflectionType *type)
 }
 
 ICALL_EXPORT MonoArray *
-ves_icall_Type_GetGenericParameterConstraints (MonoReflectionType *type)
+ves_icall_RuntimeType_GetGenericParameterConstraints (MonoReflectionType *type)
 {
        MonoError error;
        MonoReflectionType *rt;
@@ -2910,7 +2910,7 @@ ves_icall_Type_GetGenericParameterConstraints (MonoReflectionType *type)
        for (count = 0, ptr = param_info->constraints; ptr && *ptr; ptr++, count++)
                ;
 
-       res = mono_array_new_checked (domain, mono_defaults.monotype_class, count, &error);
+       res = mono_array_new_checked (domain, mono_defaults.runtimetype_class, count, &error);
        if (mono_error_set_pending_exception (&error))
                return NULL;
        for (i = 0; i < count; i++) {
@@ -2945,7 +2945,7 @@ ves_icall_EnumBuilder_setup_enum_type (MonoReflectionType *enumtype,
 }
 
 ICALL_EXPORT MonoReflectionMethod*
-ves_icall_MonoType_GetCorrespondingInflatedMethod (MonoReflectionType *type, 
+ves_icall_RuntimeType_GetCorrespondingInflatedMethod (MonoReflectionType *type, 
                                                    MonoReflectionMethod* generic)
 {
        MonoDomain *domain; 
@@ -2975,7 +2975,7 @@ ves_icall_MonoType_GetCorrespondingInflatedMethod (MonoReflectionType *type,
 }
 
 ICALL_EXPORT MonoReflectionMethod *
-ves_icall_MonoType_get_DeclaringMethod (MonoReflectionType *ref_type)
+ves_icall_RuntimeType_get_DeclaringMethod (MonoReflectionType *ref_type)
 {
        MonoMethod *method;
        MonoType *type = ref_type->type;
@@ -3776,7 +3776,7 @@ enum {
 };
 
 ICALL_EXPORT MonoArray*
-ves_icall_Type_GetFields_internal (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoReflectionType *reftype)
+ves_icall_RuntimeType_GetFields_internal (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoReflectionType *reftype)
 {
        MonoError error;
        MonoDomain *domain; 
@@ -4003,7 +4003,7 @@ loader_error:
 }
 
 ICALL_EXPORT MonoArray*
-ves_icall_Type_GetMethodsByName (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoBoolean ignore_case, MonoReflectionType *reftype)
+ves_icall_RuntimeType_GetMethodsByName (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoBoolean ignore_case, MonoReflectionType *reftype)
 {
        static MonoClass *MethodInfo_array;
        MonoError error;
@@ -4071,7 +4071,7 @@ failure:
 }
 
 ICALL_EXPORT MonoArray*
-ves_icall_Type_GetConstructors_internal (MonoReflectionType *type, guint32 bflags, MonoReflectionType *reftype)
+ves_icall_RuntimeType_GetConstructors_internal (MonoReflectionType *type, guint32 bflags, MonoReflectionType *reftype)
 {
        MonoDomain *domain; 
        MonoClass *startklass, *klass, *refklass;
@@ -4207,7 +4207,7 @@ property_accessor_nonpublic (MonoMethod* accessor, gboolean start_klass)
 }
 
 ICALL_EXPORT MonoArray*
-ves_icall_Type_GetPropertiesByName (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoBoolean ignore_case, MonoReflectionType *reftype)
+ves_icall_RuntimeType_GetPropertiesByName (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoBoolean ignore_case, MonoReflectionType *reftype)
 {
        MonoError error;
        MonoDomain *domain; 
@@ -4350,7 +4350,7 @@ event_equal (MonoEvent *event1, MonoEvent *event2)
 }
 
 ICALL_EXPORT MonoArray*
-ves_icall_Type_GetEvents_internal (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoReflectionType *reftype)
+ves_icall_RuntimeType_GetEvents_internal (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoReflectionType *reftype)
 {
        MonoError error;
        MonoDomain *domain; 
@@ -4483,7 +4483,7 @@ failure:
 }
 
 ICALL_EXPORT MonoArray*
-ves_icall_Type_GetNestedTypes (MonoReflectionType *type, MonoString *name, guint32 bflags)
+ves_icall_RuntimeType_GetNestedTypes (MonoReflectionType *type, MonoString *name, guint32 bflags)
 {
        MonoError error;
        MonoReflectionType *rt;
@@ -4500,7 +4500,7 @@ ves_icall_Type_GetNestedTypes (MonoReflectionType *type, MonoString *name, guint
 
        domain = ((MonoObject *)type)->vtable->domain;
        if (type->type->byref) {
-               MonoArray *result = mono_array_new_cached (domain, mono_defaults.monotype_class, 0, &error);
+               MonoArray *result = mono_array_new_cached (domain, mono_defaults.runtimetype_class, 0, &error);
                mono_error_set_pending_exception (&error);
                return result;
        }
@@ -4549,7 +4549,7 @@ ves_icall_Type_GetNestedTypes (MonoReflectionType *type, MonoString *name, guint
                mono_ptr_array_append (tmp_array, (MonoObject*) rt);
        }
 
-       res = mono_array_new_cached (domain, mono_defaults.monotype_class, mono_ptr_array_size (tmp_array), &error);
+       res = mono_array_new_cached (domain, mono_defaults.runtimetype_class, mono_ptr_array_size (tmp_array), &error);
        if (!is_ok (&error))
                goto leave;
 
@@ -5454,7 +5454,7 @@ ves_icall_System_MonoType_getFullName (MonoReflectionType *object, gboolean full
 }
 
 ICALL_EXPORT int
-vell_icall_MonoType_get_core_clr_security_level (MonoReflectionType *rfield)
+vell_icall_RuntimeType_get_core_clr_security_level (MonoReflectionType *rfield)
 {
        MonoError error;
        MonoClass *klass = mono_class_from_mono_type (rfield->type);
@@ -5743,7 +5743,7 @@ mono_module_get_types (MonoDomain *domain, MonoImage *image, MonoArray **excepti
        } else {
                count = tdef->rows - 1;
        }
-       res = mono_array_new_checked (domain, mono_defaults.monotype_class, count, error);
+       res = mono_array_new_checked (domain, mono_defaults.runtimetype_class, count, error);
        return_val_if_nok (error, NULL);
        *exceptions = mono_array_new_checked (domain, mono_defaults.exception_class, count, error);
        return_val_if_nok (error, NULL);
@@ -5810,14 +5810,14 @@ ves_icall_System_Reflection_Assembly_GetTypes (MonoReflectionAssembly *assembly,
                                        len1 = mono_array_length (res);
                                        len2 = mono_array_length (res2);
 
-                                       res3 = mono_array_new_checked (domain, mono_defaults.monotype_class, len1 + len2, &error);
+                                       res3 = mono_array_new_checked (domain, mono_defaults.runtimetype_class, len1 + len2, &error);
                                        if (mono_error_set_pending_exception (&error))
                                                return NULL;
                                        mono_array_memcpy_refs (res3, 0, res, 0, len1);
                                        mono_array_memcpy_refs (res3, len1, res2, 0, len2);
                                        res = res3;
 
-                                       ex3 = mono_array_new_checked (domain, mono_defaults.monotype_class, len1 + len2, &error);
+                                       ex3 = mono_array_new_checked (domain, mono_defaults.runtimetype_class, len1 + len2, &error);
                                        if (mono_error_set_pending_exception (&error))
                                                return NULL;
                                        mono_array_memcpy_refs (ex3, 0, exceptions, 0, len1);
@@ -6005,7 +6005,7 @@ ves_icall_System_Reflection_Module_InternalGetTypes (MonoReflectionModule *modul
        int i;
 
        if (!module->image) {
-               MonoArray *arr = mono_array_new_checked (mono_object_domain (module), mono_defaults.monotype_class, 0, &error);
+               MonoArray *arr = mono_array_new_checked (mono_object_domain (module), mono_defaults.runtimetype_class, 0, &error);
                mono_error_set_pending_exception (&error);
                return arr;
        } else {
@@ -6460,7 +6460,7 @@ check_for_invalid_type (MonoClass *klass, MonoError *error)
 
 }
 ICALL_EXPORT MonoReflectionType *
-ves_icall_Type_make_array_type (MonoReflectionType *type, int rank)
+ves_icall_RuntimeType_make_array_type (MonoReflectionType *type, int rank)
 {
        MonoError error;
        MonoReflectionType *ret;
@@ -6482,7 +6482,7 @@ ves_icall_Type_make_array_type (MonoReflectionType *type, int rank)
 }
 
 ICALL_EXPORT MonoReflectionType *
-ves_icall_Type_make_byref_type (MonoReflectionType *type)
+ves_icall_RuntimeType_make_byref_type (MonoReflectionType *type)
 {
        MonoError error;
        MonoReflectionType *ret;
@@ -6504,7 +6504,7 @@ ves_icall_Type_make_byref_type (MonoReflectionType *type)
 }
 
 ICALL_EXPORT MonoReflectionType *
-ves_icall_Type_MakePointerType (MonoReflectionType *type)
+ves_icall_RuntimeType_MakePointerType (MonoReflectionType *type)
 {
        MonoError error;
        MonoReflectionType *ret;
index 8c727448a2d5449c4b960f2f586c79ba7efc753e..69769c496e34ebcf39f86047ae1617fba137b0c1 100644 (file)
@@ -263,6 +263,7 @@ struct _MonoReflectionType {
        MonoType  *type;
 };
 
+/* This corresponds to System.RuntimeType */
 typedef struct {
        MonoReflectionType type;
        MonoObject *type_info;
index 7afcc00ad7c2c7001f3bca5d9f0ec26a3df1270f..60f73bddcd426770c0dfc4623d8fc19c2758e25c 100644 (file)
@@ -2216,7 +2216,7 @@ mono_class_create_runtime_vtable (MonoDomain *domain, MonoClass *klass, MonoErro
         * re-acquire them and check if another thread has created the vtable in the meantime.
         */
        /* Special case System.MonoType to avoid infinite recursion */
-       if (klass != mono_defaults.monotype_class) {
+       if (klass != mono_defaults.runtimetype_class) {
                vt->type = mono_type_get_object_checked (domain, &klass->byval_arg, error);
                if (!is_ok (error)) {
                        mono_domain_unlock (domain);
@@ -2224,7 +2224,7 @@ mono_class_create_runtime_vtable (MonoDomain *domain, MonoClass *klass, MonoErro
                        return NULL;
                }
 
-               if (mono_object_get_class ((MonoObject *)vt->type) != mono_defaults.monotype_class)
+               if (mono_object_get_class ((MonoObject *)vt->type) != mono_defaults.runtimetype_class)
                        /* This is unregistered in
                           unregister_vtable_reflection_type() in
                           domain.c. */
@@ -2275,7 +2275,7 @@ mono_class_create_runtime_vtable (MonoDomain *domain, MonoClass *klass, MonoErro
                klass->runtime_info = runtime_info;
        }
 
-       if (klass == mono_defaults.monotype_class) {
+       if (klass == mono_defaults.runtimetype_class) {
                vt->type = mono_type_get_object_checked (domain, &klass->byval_arg, error);
                if (!is_ok (error)) {
                        mono_domain_unlock (domain);
@@ -2283,7 +2283,7 @@ mono_class_create_runtime_vtable (MonoDomain *domain, MonoClass *klass, MonoErro
                        return NULL;
                }
 
-               if (mono_object_get_class ((MonoObject *)vt->type) != mono_defaults.monotype_class)
+               if (mono_object_get_class ((MonoObject *)vt->type) != mono_defaults.runtimetype_class)
                        /* This is unregistered in
                           unregister_vtable_reflection_type() in
                           domain.c. */
index 70725ccaeed771c01c908b14ef7eac1a64e5432a..ea021437b8da6a1c960346406a7478e2e3c54b8a 100644 (file)
@@ -5602,7 +5602,7 @@ mono_image_create_token (MonoDynamicImage *assembly, MonoObject *obj,
                        return_val_if_nok (error, 0);
                        token = mono_metadata_token_from_dor (mono_image_typedef_or_ref (assembly, type));
                }
-       } else if (strcmp (klass->name, "MonoType") == 0) {
+       } else if (strcmp (klass->name, "RuntimeType") == 0) {
                MonoType *type = mono_reflection_type_get_handle ((MonoReflectionType *)obj, error);
                return_val_if_nok (error, 0);
                MonoClass *mc = mono_class_from_mono_type (type);
@@ -7269,7 +7269,7 @@ mono_type_get_object_checked (MonoDomain *domain, MonoType *type, MonoError *err
                }
        }
        /* This is stored in vtables/JITted code so it has to be pinned */
-       res = (MonoReflectionType *)mono_object_new_pinned (domain, mono_defaults.monotype_class, error);
+       res = (MonoReflectionType *)mono_object_new_pinned (domain, mono_defaults.runtimetype_class, error);
        if (!mono_error_ok (error))
                return NULL;
 
@@ -8897,7 +8897,7 @@ mono_reflection_get_token_checked (MonoObject *obj, MonoError *error)
        } else if (strcmp (klass->name, "TypeBuilder") == 0) {
                MonoReflectionTypeBuilder *tb = (MonoReflectionTypeBuilder *)obj;
                token = tb->table_idx | MONO_TOKEN_TYPE_DEF;
-       } else if (strcmp (klass->name, "MonoType") == 0) {
+       } else if (strcmp (klass->name, "RuntimeType") == 0) {
                MonoType *type = mono_reflection_type_get_handle ((MonoReflectionType*)obj, error);
                return_val_if_nok (error, 0);
                MonoClass *mc = mono_class_from_mono_type (type);
@@ -10340,7 +10340,7 @@ mono_reflection_get_custom_attrs_info_checked (MonoObject *obj, MonoError *error
        mono_error_init (error);
 
        klass = obj->vtable->klass;
-       if (klass == mono_defaults.monotype_class) {
+       if (klass == mono_defaults.runtimetype_class) {
                MonoType *type = mono_reflection_type_get_handle ((MonoReflectionType *)obj, error);
                return_val_if_nok (error, NULL);
                klass = mono_class_from_mono_type (type);
@@ -13848,7 +13848,7 @@ resolve_object (MonoImage *image, MonoObject *obj, MonoClass **handle_class, Mon
                return_val_if_nok (error, NULL);
                *handle_class = mono_defaults.string_class;
                g_assert (result);
-       } else if (strcmp (obj->vtable->klass->name, "MonoType") == 0) {
+       } else if (strcmp (obj->vtable->klass->name, "RuntimeType") == 0) {
                MonoType *type = mono_reflection_type_get_handle ((MonoReflectionType*)obj, error);
                return_val_if_nok (error, NULL);
                MonoClass *mc = mono_class_from_mono_type (type);
index 3fe3ac04867adab1867989d2365fc0a644e5e930..e3143cc564f100c57a79be6b7903fd167127eaaf 100644 (file)
@@ -363,7 +363,7 @@ get_caller_no_reflection_related (MonoMethod *m, gint32 no, gint32 ilo, gboolean
 
                /* unlike most Invoke* cases InvokeMember is not inside System.Reflection[.Emit] but is SecuritySafeCritical */
                if (((*kname == 'T') && (strcmp (kname, "Type") == 0)) || 
-                       ((*kname == 'M') && (strcmp (kname, "MonoType")) == 0)) {
+                       ((*kname == 'R') && (strcmp (kname, "RuntimeType")) == 0)) {
 
                        /* if calling InvokeMember then we can't stop the stackwalk here and need to look at the caller */
                        if (strcmp (m->name, "InvokeMember") == 0)
index a4303eae8ad5f21757c05aaca08d3c782dea4d8d..c92713a0c6f35f8438808ee2670a6aa3c152c097 100644 (file)
@@ -7787,7 +7787,7 @@ field_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
 static void
 buffer_add_cattr_arg (Buffer *buf, MonoType *t, MonoDomain *domain, MonoObject *val)
 {
-       if (val && val->vtable->klass == mono_defaults.monotype_class) {
+       if (val && val->vtable->klass == mono_defaults.runtimetype_class) {
                /* Special case these so the client doesn't have to handle Type objects */
                
                buffer_add_byte (buf, VALUE_TYPE_ID_TYPE);
index 8f7b81b30a217b43f87cf259b4fd02b59454e039..abfa1ffe73b3cf93737bc63885693e13034587f3 100644 (file)
@@ -262,7 +262,7 @@ alloc_dreg (MonoCompile *cfg, MonoStackType stack_type)
 
 #define NEW_LDSTRLITCONST(cfg,dest,val) NEW_AOTCONST ((cfg), (dest), MONO_PATCH_INFO_LDSTR_LIT, (val))
 
-#define NEW_TYPE_FROM_HANDLE_CONST(cfg,dest,image,token,generic_context) NEW_AOTCONST_TOKEN ((cfg), (dest), MONO_PATCH_INFO_TYPE_FROM_HANDLE, (image), (token), (generic_context), STACK_OBJ, mono_defaults.monotype_class)
+#define NEW_TYPE_FROM_HANDLE_CONST(cfg,dest,image,token,generic_context) NEW_AOTCONST_TOKEN ((cfg), (dest), MONO_PATCH_INFO_TYPE_FROM_HANDLE, (image), (token), (generic_context), STACK_OBJ, mono_defaults.runtimetype_class)
 
 #define NEW_LDTOKENCONST(cfg,dest,image,token,generic_context) NEW_AOTCONST_TOKEN ((cfg), (dest), MONO_PATCH_INFO_LDTOKEN, (image), (token), (generic_context), STACK_PTR, NULL)
 
@@ -448,7 +448,7 @@ handle_gsharedvt_ldaddr (MonoCompile *cfg)
 
 #define EMIT_NEW_LDSTRLITCONST(cfg,dest,val) do { NEW_AOTCONST ((cfg), (dest), MONO_PATCH_INFO_LDSTR_LIT, (val)); MONO_ADD_INS ((cfg)->cbb, (dest)); } while (0)
 
-#define EMIT_NEW_TYPE_FROM_HANDLE_CONST(cfg,dest,image,token,generic_context) do { NEW_AOTCONST_TOKEN ((cfg), (dest), MONO_PATCH_INFO_TYPE_FROM_HANDLE, (image), (token), (generic_context), STACK_OBJ, mono_defaults.monotype_class); MONO_ADD_INS ((cfg)->cbb, (dest)); } while (0)
+#define EMIT_NEW_TYPE_FROM_HANDLE_CONST(cfg,dest,image,token,generic_context) do { NEW_AOTCONST_TOKEN ((cfg), (dest), MONO_PATCH_INFO_TYPE_FROM_HANDLE, (image), (token), (generic_context), STACK_OBJ, mono_defaults.runtimetype_class); MONO_ADD_INS ((cfg)->cbb, (dest)); } while (0)
 
 #define EMIT_NEW_LDTOKENCONST(cfg,dest,image,token,generic_context) do { NEW_AOTCONST_TOKEN ((cfg), (dest), MONO_PATCH_INFO_LDTOKEN, (image), (token), (generic_context), STACK_PTR, NULL); MONO_ADD_INS ((cfg)->cbb, (dest)); } while (0)
 
index d8e4437b75d5ddb7836dbee0230e052f673744d6..98f89d63500b7fe89ea677a7bbe041a911dd4a00 100644 (file)
@@ -534,7 +534,7 @@ mono_trace_enter_method (MonoMethod *method, char *ebp)
                                        g_free (as);
                                } else if (klass == mono_defaults.int32_class) {
                                        printf ("[INT32:%p:%d], ", o, *(gint32 *)((char *)o + sizeof (MonoObject)));
-                               } else if (klass == mono_defaults.monotype_class) {
+                               } else if (klass == mono_defaults.runtimetype_class) {
                                        printf ("[TYPE:%s], ", mono_type_full_name (((MonoReflectionType*)o)->type));
                                } else
                                        printf ("[%s.%s:%p], ", klass->name_space, klass->name, o);