From d88424370f59e5dfaab106bc86f82d586d6cf4f9 Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Thu, 26 May 2016 18:33:41 -0400 Subject: [PATCH] =?utf8?q?Merge=20System/MonoType.cs=20into=20ReferenceSou?= =?utf8?q?rces/RuntimeType.cs,=20use=20th=E2=80=A6=20(#3045)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * Merge System/MonoType.cs into ReferenceSources/RuntimeType.cs, use the latter in the runtime code. * [sdb] Fix a test which referenced System.MonoType. --- mcs/class/Mono.Debugger.Soft/Test/dtest.cs | 2 +- .../corlib/ReferenceSources/RuntimeType.cs | 109 ++++++++++++++++-- .../corlib/System.Reflection/MonoMethod.cs | 2 +- .../RemotingServices.cs | 2 +- mcs/class/corlib/System/Environment.cs | 2 +- mcs/class/corlib/System/MonoCustomAttrs.cs | 6 +- mcs/class/corlib/System/MonoType.cs | 103 +---------------- mcs/class/corlib/System/RuntimeTypeHandle.cs | 4 +- .../Test/System.Threading/ThreadTest.cs | 2 +- .../referencesource/mscorlib/system/rttype.cs | 2 + mono/metadata/appdomain.c | 2 +- mono/metadata/class-internals.h | 1 - mono/metadata/domain.c | 5 +- mono/metadata/icall-def.h | 52 ++++----- mono/metadata/icall.c | 66 +++++------ mono/metadata/object-internals.h | 1 + mono/metadata/object.c | 8 +- mono/metadata/reflection.c | 10 +- mono/metadata/security-core-clr.c | 2 +- mono/mini/debugger-agent.c | 2 +- mono/mini/ir-emit.h | 4 +- mono/mini/trace.c | 2 +- 22 files changed, 189 insertions(+), 200 deletions(-) diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs index 086c6f5f9aa..cd0b6ae51ba 100644 --- a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs +++ b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs @@ -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] diff --git a/mcs/class/corlib/ReferenceSources/RuntimeType.cs b/mcs/class/corlib/ReferenceSources/RuntimeType.cs index bedcf1af0c1..a3ede8423d9 100644 --- a/mcs/class/corlib/ReferenceSources/RuntimeType.cs +++ b/mcs/class/corlib/ReferenceSources/RuntimeType.cs @@ -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; + } + } } } diff --git a/mcs/class/corlib/System.Reflection/MonoMethod.cs b/mcs/class/corlib/System.Reflection/MonoMethod.cs index 04c0c567086..c93233dfffb 100644 --- a/mcs/class/corlib/System.Reflection/MonoMethod.cs +++ b/mcs/class/corlib/System.Reflection/MonoMethod.cs @@ -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; } diff --git a/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs b/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs index bc424ce5e2d..1b35fe1ee90 100644 --- a/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs +++ b/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs @@ -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; } diff --git a/mcs/class/corlib/System/Environment.cs b/mcs/class/corlib/System/Environment.cs index 0952e5528fc..1db3482d019 100644 --- a/mcs/class/corlib/System/Environment.cs +++ b/mcs/class/corlib/System/Environment.cs @@ -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)] diff --git a/mcs/class/corlib/System/MonoCustomAttrs.cs b/mcs/class/corlib/System/MonoCustomAttrs.cs index 76b5b15e041..8894ec98c98 100644 --- a/mcs/class/corlib/System/MonoCustomAttrs.cs +++ b/mcs/class/corlib/System/MonoCustomAttrs.cs @@ -49,14 +49,14 @@ namespace System [ThreadStatic] static Dictionary 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)) diff --git a/mcs/class/corlib/System/MonoType.cs b/mcs/class/corlib/System/MonoType.cs index 0fd8fa7ec75..efc24746cec 100644 --- a/mcs/class/corlib/System/MonoType.cs +++ b/mcs/class/corlib/System/MonoType.cs @@ -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; - } - } } } diff --git a/mcs/class/corlib/System/RuntimeTypeHandle.cs b/mcs/class/corlib/System/RuntimeTypeHandle.cs index 479e867f501..eb6c42f0976 100644 --- a/mcs/class/corlib/System/RuntimeTypeHandle.cs +++ b/mcs/class/corlib/System/RuntimeTypeHandle.cs @@ -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)] diff --git a/mcs/class/corlib/Test/System.Threading/ThreadTest.cs b/mcs/class/corlib/Test/System.Threading/ThreadTest.cs index e532913ff24..a869f7191f7 100644 --- a/mcs/class/corlib/Test/System.Threading/ThreadTest.cs +++ b/mcs/class/corlib/Test/System.Threading/ThreadTest.cs @@ -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; } diff --git a/mcs/class/referencesource/mscorlib/system/rttype.cs b/mcs/class/referencesource/mscorlib/system/rttype.cs index 176fef96c62..5e3d732b8e2 100644 --- a/mcs/class/referencesource/mscorlib/system/rttype.cs +++ b/mcs/class/referencesource/mscorlib/system/rttype.cs @@ -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) diff --git a/mono/metadata/appdomain.c b/mono/metadata/appdomain.c index 31558618504..7d5efc30c10 100644 --- a/mono/metadata/appdomain.c +++ b/mono/metadata/appdomain.c @@ -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 { diff --git a/mono/metadata/class-internals.h b/mono/metadata/class-internals.h index dcd856692c2..b8f4aca8f8e 100644 --- a/mono/metadata/class-internals.h +++ b/mono/metadata/class-internals.h @@ -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; diff --git a/mono/metadata/domain.c b/mono/metadata/domain.c index 26ab2d2d9b5..a3ba4a76e04 100644 --- a/mono/metadata/domain.c +++ b/mono/metadata/domain.c @@ -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); } diff --git a/mono/metadata/icall-def.h b/mono/metadata/icall-def.h index c659b843ce2..ae1706e2aaf 100644 --- a/mono/metadata/icall-def.h +++ b/mono/metadata/icall-def.h @@ -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) diff --git a/mono/metadata/icall.c b/mono/metadata/icall.c index 8d13d5c5d53..aac703ffb7b 100644 --- a/mono/metadata/icall.c +++ b/mono/metadata/icall.c @@ -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; diff --git a/mono/metadata/object-internals.h b/mono/metadata/object-internals.h index 8c727448a2d..69769c496e3 100644 --- a/mono/metadata/object-internals.h +++ b/mono/metadata/object-internals.h @@ -263,6 +263,7 @@ struct _MonoReflectionType { MonoType *type; }; +/* This corresponds to System.RuntimeType */ typedef struct { MonoReflectionType type; MonoObject *type_info; diff --git a/mono/metadata/object.c b/mono/metadata/object.c index 7afcc00ad7c..60f73bddcd4 100644 --- a/mono/metadata/object.c +++ b/mono/metadata/object.c @@ -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. */ diff --git a/mono/metadata/reflection.c b/mono/metadata/reflection.c index 70725ccaeed..ea021437b8d 100644 --- a/mono/metadata/reflection.c +++ b/mono/metadata/reflection.c @@ -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); diff --git a/mono/metadata/security-core-clr.c b/mono/metadata/security-core-clr.c index 3fe3ac04867..e3143cc564f 100644 --- a/mono/metadata/security-core-clr.c +++ b/mono/metadata/security-core-clr.c @@ -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) diff --git a/mono/mini/debugger-agent.c b/mono/mini/debugger-agent.c index a4303eae8ad..c92713a0c6f 100644 --- a/mono/mini/debugger-agent.c +++ b/mono/mini/debugger-agent.c @@ -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); diff --git a/mono/mini/ir-emit.h b/mono/mini/ir-emit.h index 8f7b81b30a2..abfa1ffe73b 100644 --- a/mono/mini/ir-emit.h +++ b/mono/mini/ir-emit.h @@ -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) diff --git a/mono/mini/trace.c b/mono/mini/trace.c index d8e4437b75d..98f89d63500 100644 --- a/mono/mini/trace.c +++ b/mono/mini/trace.c @@ -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); -- 2.25.1