Author: zoltan
Date: 2007-08-28 11:08:49 -0400 (Tue, 28 Aug 2007)
New Revision: 84959

Modified:
   trunk/mono/mono/metadata/ChangeLog
   trunk/mono/mono/metadata/icall-def.h
   trunk/mono/mono/metadata/icall.c
Log:
2007-08-28  Zoltan Varga  <[EMAIL PROTECTED]>

        * icall.c 
(ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor):
 New icall.


Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog  2007-08-28 15:07:43 UTC (rev 84958)
+++ trunk/mono/mono/metadata/ChangeLog  2007-08-28 15:08:49 UTC (rev 84959)
@@ -1,5 +1,9 @@
 2007-08-28  Zoltan Varga  <[EMAIL PROTECTED]>
 
+       * icall.c 
(ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor):
 New icall.
+
+2007-08-28  Zoltan Varga  <[EMAIL PROTECTED]>
+
        * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
        class->max_interface_id in a one place. Fixes transparentproxy.exe test 
on ia64.
 

Modified: trunk/mono/mono/metadata/icall-def.h
===================================================================
--- trunk/mono/mono/metadata/icall-def.h        2007-08-28 15:07:43 UTC (rev 
84958)
+++ trunk/mono/mono/metadata/icall-def.h        2007-08-28 15:08:49 UTC (rev 
84959)
@@ -562,7 +562,8 @@
 ICALL(RUNH_2, "GetOffsetToStringData", 
ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_GetOffsetToStringData)
 ICALL(RUNH_3, "InitializeArray", 
ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray)
 ICALL(RUNH_4, "RunClassConstructor", 
ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor)
-ICALL(RUNH_5, "get_OffsetToStringData", 
ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_GetOffsetToStringData)
+ICALL(RUNH_5, "RunModuleConstructor", 
ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor)
+ICALL(RUNH_6, "get_OffsetToStringData", 
ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_GetOffsetToStringData)
 
 ICALL_TYPE(GCH, "System.Runtime.InteropServices.GCHandle", GCH_1)
 ICALL(GCH_1, "CheckCurrentDomain", GCHandle_CheckCurrentDomain)

Modified: trunk/mono/mono/metadata/icall.c
===================================================================
--- trunk/mono/mono/metadata/icall.c    2007-08-28 15:07:43 UTC (rev 84958)
+++ trunk/mono/mono/metadata/icall.c    2007-08-28 15:08:49 UTC (rev 84959)
@@ -806,6 +806,18 @@
                mono_runtime_class_init (mono_class_vtable (mono_domain_get (), 
klass));
 }
 
+static void
+ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor 
(MonoImage *image)
+{
+       MONO_ARCH_SAVE_REGS;
+
+       mono_image_check_for_module_cctor (image);
+       if (image->has_module_cctor) {
+               MonoClass *module_klass = mono_class_get (image, 
MONO_TOKEN_TYPE_DEF | 1);
+               mono_runtime_class_init (mono_class_vtable (mono_domain_get (), 
module_klass));
+       }
+}
+
 static MonoObject *
 ves_icall_System_Object_MemberwiseClone (MonoObject *this)
 {

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to