[corlib] Added icall Assembly.GetAotId
authorMarcos Henrich <marcos.henrich@xamarin.com>
Fri, 20 May 2016 10:54:59 +0000 (11:54 +0100)
committerMarcos Henrich <marcos.henrich@xamarin.com>
Fri, 8 Jul 2016 21:38:22 +0000 (22:38 +0100)
mcs/class/corlib/System.Reflection/Assembly.cs
mono/metadata/icall-def.h
mono/metadata/icall.c

index f75802198eb67a4197a3349dfec49280b206c666..c90059d3a87432239118d0ab5d144e5bcac1a03e 100644 (file)
@@ -138,6 +138,9 @@ namespace System.Reflection {
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                private extern string InternalImageRuntimeVersion ();
 
+               [MethodImplAttribute (MethodImplOptions.InternalCall)]
+               static internal extern string GetAotId ();
+
                // SECURITY: this should be the only caller to icall get_code_base
                private string GetCodeBase (bool escaped)
                {
index d6012ab507175149f0239b2dd78039e4c2b84c50..9da2c8308df60fff663c26e1bd506914d954bf1b 100644 (file)
@@ -459,6 +459,7 @@ ICALL(OBJ_3, "MemberwiseClone", ves_icall_System_Object_MemberwiseClone)
 
 ICALL_TYPE(ASSEM, "System.Reflection.Assembly", ASSEM_1)
 ICALL(ASSEM_1, "FillName", ves_icall_System_Reflection_Assembly_FillName)
+ICALL(ASSEM_1a, "GetAotId", ves_icall_System_Reflection_Assembly_GetAotId)
 ICALL(ASSEM_2, "GetCallingAssembly", ves_icall_System_Reflection_Assembly_GetCallingAssembly)
 ICALL(ASSEM_3, "GetEntryAssembly", ves_icall_System_Reflection_Assembly_GetEntryAssembly)
 ICALL(ASSEM_4, "GetExecutingAssembly", ves_icall_System_Reflection_Assembly_GetExecutingAssembly)
index c294eb0a49d59df6c855071f52980de8a79537e6..5a1acf229f7a30857d743b3fecf8437dab638a86 100644 (file)
@@ -4899,6 +4899,14 @@ ves_icall_System_Reflection_Assembly_GetManifestResourceNames (MonoReflectionAss
        return result;
 }
 
+ICALL_EXPORT MonoString*
+ves_icall_System_Reflection_Assembly_GetAotId ()
+{
+       guint8* aotid = &mono_domain_get ()->entry_assembly->image->aotid;
+       
+       return mono_string_new (mono_domain_get (), mono_guid_to_string(aotid));
+}
+
 static MonoObject*
 create_version (MonoDomain *domain, guint32 major, guint32 minor, guint32 build, guint32 revision, MonoError *error)
 {