* class.h (MonoGenericInst): Added `int count_ifaces'.
* iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
`ginst->count_ifaces' instead `klass->interface_count' since we
may get called before the vtable is created.
* loader.c (mono_method_get_param_names): If we're a generic
instance, return and don't initialize the class.
* reflection.c (mono_reflection_setup_generic_class): Don't call
ensure_runtime_vtable().
(mono_reflection_bind_generic_parameters): Set
`ginst->count_ifaces'.
svn path=/trunk/mono/; revision=24001
+2004-03-13 Martin Baulig <martin@ximian.com>
+
+ * class.h (MonoGenericInst): Added `int count_ifaces'.
+
+ * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
+ `ginst->count_ifaces' instead `klass->interface_count' since we
+ may get called before the vtable is created.
+
+ * loader.c (mono_method_get_param_names): If we're a generic
+ instance, return and don't initialize the class.
+
+ * reflection.c (mono_reflection_setup_generic_class): Don't call
+ ensure_runtime_vtable().
+ (mono_reflection_bind_generic_parameters): Set
+ `ginst->count_ifaces'.
+
2004-03-11 Jackson Harper <jackson@ximian.com>
* icall.c:
struct _MonoGenericInst {
MonoClass *klass;
MonoType *parent;
+ int count_ifaces;
MonoType **ifaces;
MonoType *nested_in;
GList *nested;
klass = mono_class_from_mono_type (ginst->generic_type);
- res = mono_array_new (domain, System_Reflection_MonoGenericInst, klass->interface_count);
+ res = mono_array_new (domain, System_Reflection_MonoGenericInst, ginst->count_ifaces);
- for (i = 0; i < klass->interface_count; i++) {
+ for (i = 0; i < ginst->count_ifaces; i++) {
MonoReflectionType *iface = mono_type_get_object (domain, ginst->ifaces [i]);
mono_array_set (res, gpointer, i, iface);
for (i = 0; i < method->signature->param_count; ++i)
names [i] = "";
- mono_class_init (klass);
-
if (klass->generic_inst) /* copy the names later */
return;
+ mono_class_init (klass);
+
if (klass->image->dynamic) {
MonoReflectionMethodAux *method_aux =
mono_g_hash_table_lookup (
MonoReflectionGenericParam *gparam = mono_array_get (tb->generic_params, gpointer, i);
klass->gen_params [i] = *gparam->type.type->data.generic_param;
}
-
- ensure_runtime_vtable (klass);
}
/*
else
icount = klass->interface_count;
ginst->ifaces = g_new0 (MonoType *, icount);
+ ginst->count_ifaces = icount;
for (i = 0; i < icount; i++) {
MonoReflectionType *itype;