* class.c (inflate_generic_signature): Copy `generic_param_count'.
(inflate_generic_header): Copy `gen_params'.
* icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
New interncall.
* metadata.c (mono_metadata_parse_method_signature): Actually set
the `method->generic_param_count' here.
(mono_metadata_load_generic_params): Initialize `pklass' to NULL.
svn path=/trunk/mono/; revision=19101
+2003-10-16 Martin Baulig <martin@ximian.com>
+
+ * class.c (inflate_generic_signature): Copy `generic_param_count'.
+ (inflate_generic_header): Copy `gen_params'.
+
+ * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
+ New interncall.
+
+ * metadata.c (mono_metadata_parse_method_signature): Actually set
+ the `method->generic_param_count' here.
+ (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
+
2003-10-15 Zoltan Varga <vargaz@freemail.hu>
* object.h: Add a new field to TypedRef to simplify the implementation
res->hasthis = sig->hasthis;
res->explicit_this = sig->explicit_this;
res->call_convention = sig->call_convention;
+ res->generic_param_count = sig->generic_param_count;
return res;
}
res->init_locals = header->init_locals;
res->num_locals = header->num_locals;
res->clauses = header->clauses;
+ res->gen_params = header->gen_params;
for (i = 0; i < header->num_locals; ++i) {
res->locals [i] = inflate_generic_type (header->locals [i], tgen, mgen);
}
return mono_method_get_object (mono_object_domain (type), method, klass);
}
+static gboolean
+ves_icall_MethodInfo_get_IsGenericMethodDefinition (MonoReflectionMethod *method)
+{
+ MonoMethodNormal *mn;
+
+ MONO_ARCH_SAVE_REGS;
+
+ if ((method->method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL) ||
+ (method->method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL))
+ return FALSE;
+
+ mn = (MonoMethodNormal *) method->method;
+ return mn->header->gen_params != NULL;
+}
static MonoObject *
ves_icall_InternalInvoke (MonoReflectionMethod *method, MonoObject *this, MonoArray *params)
"System.MonoType::get_IsGenericParameter", ves_icall_MonoType_get_IsGenericParameter,
"System.MonoType::get_DeclaringMethod", ves_icall_MonoType_get_DeclaringMethod,
+ /* Method generics icalls */
+ "System.Reflection.MethodInfo::get_IsGenericMethodDefinition", ves_icall_MethodInfo_get_IsGenericMethodDefinition,
+
/*
* System.Reflection.FieldInfo
method->hasthis = hasthis;
method->explicit_this = explicit_this;
method->call_convention = call_convention;
+ method->generic_param_count = gen_param_count;
if (call_convention != 0xa)
method->ret = mono_metadata_parse_type (m, MONO_PARSE_RET, ret_attrs, ptr, &ptr);
n = 1;
do {
params = g_realloc (params, sizeof (MonoGenericParam) * n);
+ params [n - 1].pklass = NULL;
params [n - 1].method = method;
params [n - 1].flags = cols [MONO_GENERICPARAM_FLAGS];
params [n - 1].num = cols [MONO_GENERICPARAM_NUMBER];