2009-12-12 Rodrigo Kumpera <rkumpera@novell.com>
commitb2712aee52ed3ff45fed3ca5a7849fa06adba393
authorkumpera <kumpera@e3ebcda4-bce8-0310-ba0a-eca2169e7518>
Sun, 13 Dec 2009 01:17:36 +0000 (13 01:17 +0000)
committerkumpera <kumpera@e3ebcda4-bce8-0310-ba0a-eca2169e7518>
Sun, 13 Dec 2009 01:17:36 +0000 (13 01:17 +0000)
tree0e69d638357f917eb285be4d748dc2d710a67128
parent908e06af13da9d982d13474b4e06dbd42b2db308
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.

git-svn-id: svn+ssh://mono-cvs.ximian.com/source/trunk/mono@148336 e3ebcda4-bce8-0310-ba0a-eca2169e7518
mono/metadata/ChangeLog
mono/metadata/object-internals.h
mono/metadata/reflection.c