Author: miguel
Date: 2007-03-06 17:37:04 -0500 (Tue, 06 Mar 2007)
New Revision: 73853
Modified:
trunk/mono/mono/metadata/class-internals.h
trunk/mono/mono/metadata/class.c
trunk/mono/mono/metadata/metadata.c
trunk/mono/mono/metadata/reflection.c
Log:
Revert Paolo's fix, this one fixes the build
Modified: trunk/mono/mono/metadata/class-internals.h
===================================================================
--- trunk/mono/mono/metadata/class-internals.h 2007-03-06 22:27:18 UTC (rev
73852)
+++ trunk/mono/mono/metadata/class-internals.h 2007-03-06 22:37:04 UTC (rev
73853)
@@ -354,8 +354,9 @@
*/
struct _MonoGenericInst {
guint id; /* unique ID for debugging */
- guint type_argc : 24; /* number of type arguments */
+ guint type_argc : 22; /* number of type arguments */
guint is_open : 1; /* if this is an open type */
+ guint is_reference : 1; /* if this is a reference type */
MonoType **type_argv;
};
Modified: trunk/mono/mono/metadata/class.c
===================================================================
--- trunk/mono/mono/metadata/class.c 2007-03-06 22:27:18 UTC (rev 73852)
+++ trunk/mono/mono/metadata/class.c 2007-03-06 22:37:04 UTC (rev 73853)
@@ -2893,6 +2893,7 @@
nginst = g_new0 (MonoGenericInst, 1);
nginst->type_argc = container->type_argc;
nginst->type_argv = g_new0 (MonoType *, nginst->type_argc);
+ nginst->is_reference = 1;
nginst->is_open = 1;
for (i = 0; i < nginst->type_argc; i++) {
Modified: trunk/mono/mono/metadata/metadata.c
===================================================================
--- trunk/mono/mono/metadata/metadata.c 2007-03-06 22:27:18 UTC (rev 73852)
+++ trunk/mono/mono/metadata/metadata.c 2007-03-06 22:37:04 UTC (rev 73853)
@@ -1390,7 +1390,7 @@
const MonoGenericInst *b = (const MonoGenericInst *) kb;
int i;
- if ((a->is_open != b->is_open) || (a->type_argc != b->type_argc))
+ if ((a->is_open != b->is_open) || (a->type_argc != b->type_argc) ||
(a->is_reference != b->is_reference))
return FALSE;
for (i = 0; i < a->type_argc; ++i) {
if (!do_mono_metadata_type_equal (a->type_argv [i],
b->type_argv [i], FALSE))
@@ -1959,12 +1959,15 @@
nginst = g_new0 (MonoGenericInst, 1);
nginst->type_argc = ginst->type_argc;
nginst->type_argv = g_new0 (MonoType*, nginst->type_argc);
+ nginst->is_reference = 1;
for (i = 0; i < nginst->type_argc; i++) {
MonoType *t = mono_class_inflate_generic_type (ginst->type_argv
[i], context);
if (!nginst->is_open)
nginst->is_open = mono_class_is_open_constructed_type
(t);
+ if (nginst->is_reference)
+ nginst->is_reference = MONO_TYPE_IS_REFERENCE (t);
nginst->type_argv [i] = t;
}
@@ -1982,6 +1985,7 @@
ginst = g_new0 (MonoGenericInst, 1);
ginst->type_argc = count;
ginst->type_argv = g_new0 (MonoType*, count);
+ ginst->is_reference = 1;
for (i = 0; i < ginst->type_argc; i++) {
MonoType *t = mono_metadata_parse_type_full (m, container,
MONO_PARSE_TYPE, 0, ptr, &ptr);
@@ -1994,6 +1998,8 @@
ginst->type_argv [i] = t;
if (!ginst->is_open)
ginst->is_open = mono_class_is_open_constructed_type
(t);
+ if (ginst->is_reference)
+ ginst->is_reference = MONO_TYPE_IS_REFERENCE (t);
}
if (rptr)
@@ -3369,7 +3375,8 @@
{
int i;
- if ((g1->inst->type_argc != g2->inst->type_argc) || (g1->is_dynamic !=
g2->is_dynamic))
+ if ((g1->inst->type_argc != g2->inst->type_argc) || (g1->is_dynamic !=
g2->is_dynamic) ||
+ (g1->inst->is_reference != g2->inst->is_reference))
return FALSE;
if (!mono_metadata_class_equal (g1->container_class,
g2->container_class, signature_only))
return FALSE;
Modified: trunk/mono/mono/metadata/reflection.c
===================================================================
--- trunk/mono/mono/metadata/reflection.c 2007-03-06 22:27:18 UTC (rev
73852)
+++ trunk/mono/mono/metadata/reflection.c 2007-03-06 22:37:04 UTC (rev
73853)
@@ -8696,12 +8696,15 @@
gclass->inst->type_argc = type_argc;
gclass->inst->type_argv = g_new0 (MonoType *, gclass->inst->type_argc);
+ gclass->inst->is_reference = 1;
for (i = 0; i < gclass->inst->type_argc; ++i) {
MonoType *t = dup_type (types [i]);
if (!gclass->inst->is_open)
gclass->inst->is_open =
mono_class_is_open_constructed_type (t);
+ if (gclass->inst->is_reference)
+ gclass->inst->is_reference = MONO_TYPE_IS_REFERENCE (t);
gclass->inst->type_argv [i] = t;
}
@@ -8747,12 +8750,15 @@
gclass->inst = g_new0 (MonoGenericInst, 1);
gclass->inst->type_argc = type_argc;
gclass->inst->type_argv = g_new0 (MonoType *, gclass->inst->type_argc);
+ gclass->inst->is_reference = 1;
for (i = 0; i < gclass->inst->type_argc; ++i) {
MonoType *t = dup_type (types [i]);
if (!gclass->inst->is_open)
gclass->inst->is_open =
mono_class_is_open_constructed_type (t);
+ if (gclass->inst->is_reference)
+ gclass->inst->is_reference = MONO_TYPE_IS_REFERENCE (t);
gclass->inst->type_argv [i] = t;
}
@@ -8770,6 +8776,7 @@
gclass->inst = g_new0 (MonoGenericInst, 1);
gclass->inst->type_argc = kgclass->inst->type_argc;
gclass->inst->type_argv = g_new0 (MonoType *,
gclass->inst->type_argc);
+ gclass->inst->is_reference = 1;
for (i = 0; i < gclass->inst->type_argc; i++) {
MonoType *t = kgclass->inst->type_argv [i];
@@ -8778,6 +8785,9 @@
if (!gclass->inst->is_open)
gclass->inst->is_open =
mono_class_is_open_constructed_type (t);
+ if (gclass->inst->is_reference)
+ gclass->inst->is_reference =
MONO_TYPE_IS_REFERENCE (t);
+
gclass->inst->type_argv [i] = t;
}
@@ -8863,12 +8873,15 @@
ginst = g_new0 (MonoGenericInst,1 );
ginst->type_argc = count;
ginst->type_argv = g_new0 (MonoType *, count);
+ ginst->is_reference = 1;
for (i = 0; i < count; i++) {
MonoReflectionType *garg = mono_array_get (types, gpointer, i);
ginst->type_argv [i] = dup_type (garg->type);
if (!ginst->is_open)
ginst->is_open = mono_class_is_open_constructed_type
(ginst->type_argv [i]);
+ if (ginst->is_reference)
+ ginst->is_reference = MONO_TYPE_IS_REFERENCE
(ginst->type_argv [i]);
}
ginst = mono_metadata_lookup_generic_inst (ginst);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches