fname = mono_metadata_string_heap (image, cols [MONO_MEMBERREF_NAME]);
if (!mono_verifier_verify_memberref_field_signature (image, cols [MONO_MEMBERREF_SIGNATURE], NULL)) {
- mono_error_set_bad_image (error, image, "Bad field '%s' signature 0x%08x", class_index, token);
+ mono_error_set_bad_image (error, image, "Bad field '%u' signature 0x%08x", class_index, token);
return NULL;
}
klass = mono_class_get_and_inflate_typespec_checked (image, MONO_TOKEN_TYPE_SPEC | nindex, context, error);
break;
default:
- mono_error_set_bad_image (error, image, "Bad field field '%s' signature 0x%08x", class_index, token);
+ mono_error_set_bad_image (error, image, "Bad field field '%u' signature 0x%08x", class_index, token);
}
if (!klass)
}
}
- if (field && field->parent && !field->parent->generic_class && !field->parent->generic_container) {
+ if (field && field->parent && !mono_class_is_ginst (field->parent) && !field->parent->generic_container) {
mono_image_lock (image);
mono_conc_hashtable_insert (image->field_cache, GUINT_TO_POINTER (token), field);
mono_image_unlock (image);
/* Search directly in the metadata to avoid calling setup_methods () */
mono_error_init (error);
- /* FIXME: !from_class->generic_class condition causes test failures. */
- if (klass->type_token && !image_is_dynamic (klass->image) && !klass->methods && !klass->rank && klass == from_class && !from_class->generic_class) {
+ /* FIXME: !mono_class_is_ginst (from_class) condition causes test failures. */
+ if (klass->type_token && !image_is_dynamic (klass->image) && !klass->methods && !klass->rank && klass == from_class && !mono_class_is_ginst (from_class)) {
for (i = 0; i < klass->method.count; ++i) {
guint32 cols [MONO_METHOD_SIZE];
MonoMethod *method;
return mono_method_signature_checked (method, error);
}
- if (method->klass->generic_class)
+ if (mono_class_is_ginst (method->klass))
return mono_method_signature_checked (method, error);
if (image_is_dynamic (image)) {
type = &klass->byval_arg;
if (type->type != MONO_TYPE_ARRAY && type->type != MONO_TYPE_SZARRAY) {
- MonoClass *in_class = klass->generic_class ? klass->generic_class->container_class : klass;
+ MonoClass *in_class = mono_class_is_ginst (klass) ? mono_class_get_generic_class (klass)->container_class : klass;
method = find_method (in_class, NULL, mname, sig, klass, error);
break;
}
klass = method->klass;
- if (klass->generic_class) {
+ if (mono_class_is_ginst (klass)) {
g_assert (method->is_inflated);
method = ((MonoMethodInflated *) method)->declaring;
}
- new_context.class_inst = klass->generic_class ? klass->generic_class->context.class_inst : NULL;
+ new_context.class_inst = mono_class_is_ginst (klass) ? mono_class_get_generic_class (klass)->context.class_inst : NULL;
new_context.method_inst = inst;
method = mono_class_inflate_generic_method_full_checked (method, klass, &new_context, error);
return res;
}
+void
+mono_loader_register_module (const char *name, MonoDl *module)
+{
+ if (!global_module_map)
+ global_module_map = g_hash_table_new (g_str_hash, g_str_equal);
+ g_hash_table_insert (global_module_map, g_strdup (name), module);
+}
+
static MonoDl *internal_module;
static gboolean
g_assert (method != NULL);
g_assert (method->wrapper_type != MONO_WRAPPER_NONE);
- if (method->is_inflated)
- method = ((MonoMethodInflated *) method)->declaring;
data = (void **)((MonoMethodWrapper *)method)->method_data;
g_assert (data != NULL);
g_assert (id <= GPOINTER_TO_UINT (*data));
AsyncStackWalkUserData ud = { func, user_data };
mono_sigctx_to_monoctx (initial_sig_context, &ctx);
- mono_get_eh_callbacks ()->mono_walk_stack_with_ctx (async_stack_walk_adapter, NULL, MONO_UNWIND_SIGNAL_SAFE, &ud);
+ mono_get_eh_callbacks ()->mono_walk_stack_with_ctx (async_stack_walk_adapter, &ctx, MONO_UNWIND_SIGNAL_SAFE, &ud);
}
static gboolean
sig = mono_metadata_blob_heap (img, sig_offset = mono_metadata_decode_row_col (&img->tables [MONO_TABLE_METHOD], idx - 1, MONO_METHOD_SIGNATURE));
- g_assert (!m->klass->generic_class);
+ g_assert (!mono_class_is_ginst (m->klass));
container = mono_method_get_generic_container (m);
if (!container)
container = m->klass->generic_container;