+2003-09-07 Martin Baulig <martin@ximian.com>
+
+ * class.c (mono_class_init): If we're a generic instance, inflate
+ all our methods instead of loading them from the image.
+ (mono_class_from_generic): Set `class->methods = gklass->methods'.
+
2003-09-07 Martin Baulig <martin@ximian.com>
* mono-debug-debugger.c: Added support for constructors.
class->methods [1] = ctor;
}
} else {
- class->methods = g_new (MonoMethod*, class->method.count);
- for (i = 0; i < class->method.count; ++i) {
- class->methods [i] = mono_get_method (class->image,
- MONO_TOKEN_METHOD_DEF | (i + class->method.first + 1), class);
- }
if (class->generic_inst) {
for (i = 0; i < class->method.count; ++i) {
class->methods [i] = inflate_generic_method (class->methods [i], class->generic_inst->data.generic_inst, NULL);
class->methods [i]->klass = class;
/*g_print ("inflated method %s in %s\n", class->methods [i]->name, class->name);*/
}
+ } else {
+ class->methods = g_new (MonoMethod*, class->method.count);
+ for (i = 0; i < class->method.count; ++i) {
+ class->methods [i] = mono_get_method (class->image,
+ MONO_TOKEN_METHOD_DEF | (i + class->method.first + 1), class);
+ }
}
}
class->field = gklass->field;
class->method = gklass->method;
+ class->methods = gklass->methods;
/*g_print ("instantiating class from %s.%s to %s\n", gklass->name_space, gklass->name, class->name);
g_print ("methods: %d, fields: %d\n", class->method.count, class->field.count);*/