2009-12-12 Rodrigo Kumpera <rkumpera@novell.com>
authorRodrigo Kumpera <kumpera@gmail.com>
Sun, 13 Dec 2009 01:17:36 +0000 (01:17 -0000)
committerRodrigo Kumpera <kumpera@gmail.com>
Sun, 13 Dec 2009 01:17:36 +0000 (01:17 -0000)
commit7a55fbab2bea268235409fe0947bb549afcc19fa
tree1feda51a67a517d479ffd5092035264f050ce7b8
parenta946f229ab1fc80ab2a7de675686b461de0854c0
2009-12-12  Rodrigo Kumpera  <rkumpera@novell.com>

To properly support user types, MonoGenericClass has to be used for regular, non SRE,
types as well since otherwise generic instances would not return UT as arguments but
their undelying system type.

* object-internals.h: Change field types of MonoGenericClass and *OnTypeBuilderInst
to reflect the fact that they can have now multiple different types.

* reflection.c (mono_image_get_field_on_inst_token): Handle MonoField.

* reflection.c (mono_image_get_ctor_on_inst_token): Handle MonoCMethod.

* reflection.c (mono_image_get_method_on_inst_token): Handle MonoMethod.

* reflection.c (mono_reflection_register_with_runtime): Init super types
if the image is not dynamic.

* reflection.c (mono_reflection_bind_generic_parameters): In case of a MonoGenericClass,
check if the generic type definition is a TypeBuilder.

* reflection.c (mono_reflection_generic_class_initialize): If the generic type definition
doesn't belong to a dynamic image, skip initialization.

* reflection.c (resolve_object): Properly handle *OnTypeBuilderInst types where their
base definition is not a dynamic type.

svn path=/trunk/mono/; revision=148336
mono/metadata/ChangeLog
mono/metadata/object-internals.h
mono/metadata/reflection.c