2004-07-05 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mono / metadata / icall.c
index 85f996c28a0571ae445ae95632a9efe039112bcc..d0a3f6e0394aa13cfae0b6e3b687d293f8c9ca22 100644 (file)
@@ -1805,6 +1805,13 @@ ves_icall_TypeBuilder_get_IsGenericParameter (MonoReflectionTypeBuilder *tb)
        return FALSE;
 }
 
+static void
+ves_icall_EnumBuilder_setup_enum_type (MonoReflectionType *enumtype,
+                                                                          MonoReflectionType *t)
+{
+       enumtype->type = t->type;
+}
+
 static MonoReflectionType*
 ves_icall_MonoGenericInst_GetParentType (MonoReflectionGenericInst *type)
 {
@@ -4927,7 +4934,7 @@ mono_ArgIterator_IntGetNextArg (MonoArgIterator *iter)
        iter->args = (char*)iter->args + arg_size;
        iter->next_arg++;
 
-       //g_print ("returning arg %d, type 0x%02x of size %d at %p\n", i, res.type->type, arg_size, res.value);
+       /* g_print ("returning arg %d, type 0x%02x of size %d at %p\n", i, res.type->type, arg_size, res.value); */
 
        return res;
 }
@@ -4953,10 +4960,10 @@ mono_ArgIterator_IntGetNextArgT (MonoArgIterator *iter, MonoType *type)
                arg_size = mono_type_stack_size (res.type, &align);
                iter->args = (char*)iter->args + arg_size;
                iter->next_arg++;
-               //g_print ("returning arg %d, type 0x%02x of size %d at %p\n", i, res.type->type, arg_size, res.value);
+               /* g_print ("returning arg %d, type 0x%02x of size %d at %p\n", i, res.type->type, arg_size, res.value); */
                return res;
        }
-       //g_print ("arg type 0x%02x not found\n", res.type->type);
+       /* g_print ("arg type 0x%02x not found\n", res.type->type); */
 
        res.type = NULL;
        res.value = NULL;
@@ -5532,11 +5539,17 @@ static const IcallEntry typebuilder_icalls [] = {
        {"setup_internal_class", mono_reflection_setup_internal_class}
 };
 
+static const IcallEntry enumbuilder_icalls [] = {
+       {"setup_enum_type", ves_icall_EnumBuilder_setup_enum_type}
+};
+
 static const IcallEntry runtimehelpers_icalls [] = {
        {"GetObjectValue", ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_GetObjectValue},
+        /* REMOVEME: no longer needed, just so we dont break things when not needed */
        {"GetOffsetToStringData", ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_GetOffsetToStringData},
        {"InitializeArray", ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray},
-       {"RunClassConstructor", ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor}
+       {"RunClassConstructor", ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor},
+       {"get_OffsetToStringData", ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_GetOffsetToStringData}
 };
 
 static const IcallEntry gchandle_icalls [] = {
@@ -5852,6 +5865,7 @@ static const IcallMap icall_entries [] = {
        {"System.Reflection.Emit.AssemblyBuilder", assemblybuilder_icalls, G_N_ELEMENTS (assemblybuilder_icalls)},
        {"System.Reflection.Emit.CustomAttributeBuilder", customattrbuilder_icalls, G_N_ELEMENTS (customattrbuilder_icalls)},
        {"System.Reflection.Emit.DynamicMethod", dynamicmethod_icalls, G_N_ELEMENTS (dynamicmethod_icalls)},
+       {"System.Reflection.Emit.EnumBuilder", enumbuilder_icalls, G_N_ELEMENTS (enumbuilder_icalls)},
        {"System.Reflection.Emit.GenericTypeParameterBuilder", generictypeparambuilder_icalls, G_N_ELEMENTS (generictypeparambuilder_icalls)},
        {"System.Reflection.Emit.MethodBuilder", methodbuilder_icalls, G_N_ELEMENTS (methodbuilder_icalls)},
        {"System.Reflection.Emit.ModuleBuilder", modulebuilder_icalls, G_N_ELEMENTS (modulebuilder_icalls)},