Author: zoltan
Date: 2005-03-11 08:22:30 -0500 (Fri, 11 Mar 2005)
New Revision: 41694
Modified:
trunk/mono/mono/metadata/ChangeLog
trunk/mono/mono/metadata/object.c
Log:
2005-03-11 Zoltan Varga <[EMAIL PROTECTED]>
* object.c (compute_class_bitmap): Add support for generics. Fixes
#73527.
Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog 2005-03-11 13:14:14 UTC (rev 41693)
+++ trunk/mono/mono/metadata/ChangeLog 2005-03-11 13:22:30 UTC (rev 41694)
@@ -1,3 +1,8 @@
+2005-03-11 Zoltan Varga <[EMAIL PROTECTED]>
+
+ * object.c (compute_class_bitmap): Add support for generics. Fixes
+ #73527.
+
2005-03-10 Zoltan Varga <[EMAIL PROTECTED]>
* reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
Modified: trunk/mono/mono/metadata/object.c
===================================================================
--- trunk/mono/mono/metadata/object.c 2005-03-11 13:14:14 UTC (rev 41693)
+++ trunk/mono/mono/metadata/object.c 2005-03-11 13:22:30 UTC (rev 41694)
@@ -461,6 +461,8 @@
for (p = class; p != NULL; p = p->parent) {
gpointer iter = NULL;
while ((field = mono_class_get_fields (p, &iter))) {
+ MonoType *type;
+
if (field->type->attrs & (FIELD_ATTRIBUTE_STATIC |
FIELD_ATTRIBUTE_HAS_FIELD_RVA))
continue;
/* FIXME: should not happen, flag as type load error */
@@ -470,11 +472,13 @@
pos = field->offset / sizeof (gpointer);
pos += offset;
- switch (field->type->type) {
+ type = mono_type_get_underlying_type (field->type);
+ switch (type->type) {
/* FIXME: _I and _U and _PTR should be removed
eventually */
case MONO_TYPE_I:
case MONO_TYPE_U:
case MONO_TYPE_PTR:
+ case MONO_TYPE_FNPTR:
case MONO_TYPE_STRING:
case MONO_TYPE_SZARRAY:
case MONO_TYPE_CLASS:
@@ -493,7 +497,21 @@
}
break;
}
+ case MONO_TYPE_I1:
+ case MONO_TYPE_U1:
+ case MONO_TYPE_I2:
+ case MONO_TYPE_U2:
+ case MONO_TYPE_I4:
+ case MONO_TYPE_U4:
+ case MONO_TYPE_I8:
+ case MONO_TYPE_U8:
+ case MONO_TYPE_R4:
+ case MONO_TYPE_R8:
+ case MONO_TYPE_BOOLEAN:
+ case MONO_TYPE_CHAR:
+ break;
default:
+ g_assert_not_reached ();
break;
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches