name = mono_metadata_string_heap (image, cols [MONO_TYPEREF_NAME]);
nspace = mono_metadata_string_heap (image, cols [MONO_TYPEREF_NAMESPACE]);
- idx = cols [MONO_TYPEREF_SCOPE] >> MONO_RESOLTION_SCOPE_BITS;
- switch (cols [MONO_TYPEREF_SCOPE] & MONO_RESOLTION_SCOPE_MASK) {
- case MONO_RESOLTION_SCOPE_MODULE:
+ idx = cols [MONO_TYPEREF_SCOPE] >> MONO_RESOLUTION_SCOPE_BITS;
+ switch (cols [MONO_TYPEREF_SCOPE] & MONO_RESOLUTION_SCOPE_MASK) {
+ case MONO_RESOLUTION_SCOPE_MODULE:
/*
LAMESPEC The spec says that a null module resolution scope should go through the exported type table.
This is not the observed behavior of existing implementations.
res = mono_class_from_name (image, nspace, name); /*FIXME proper error handling*/
goto done;
- case MONO_RESOLTION_SCOPE_MODULEREF:
+ case MONO_RESOLUTION_SCOPE_MODULEREF:
module = mono_image_load_module (image, idx);
if (module)
res = mono_class_from_name (module, nspace, name); /*FIXME proper error handling*/
goto done;
- case MONO_RESOLTION_SCOPE_TYPEREF: {
+ case MONO_RESOLUTION_SCOPE_TYPEREF: {
MonoClass *enclosing;
GList *tmp;
g_warning ("TypeRef ResolutionScope not yet handled (%d) for %s.%s in image %s", idx, nspace, name, image->name);
goto done;
}
- case MONO_RESOLTION_SCOPE_ASSEMBLYREF:
+ case MONO_RESOLUTION_SCOPE_ASSEMBLYREF:
break;
}
}
mono_metadata_decode_row (t, idx-1, cols, MONO_TYPEREF_SIZE);
- idx = cols [MONO_TYPEREF_SCOPE] >> MONO_RESOLTION_SCOPE_BITS;
- switch (cols [MONO_TYPEREF_SCOPE] & MONO_RESOLTION_SCOPE_MASK) {
- case MONO_RESOLTION_SCOPE_MODULE:
+ idx = cols [MONO_TYPEREF_SCOPE] >> MONO_RESOLUTION_SCOPE_BITS;
+ switch (cols [MONO_TYPEREF_SCOPE] & MONO_RESOLUTION_SCOPE_MASK) {
+ case MONO_RESOLUTION_SCOPE_MODULE:
/* FIXME: */
return g_strdup ("");
- case MONO_RESOLTION_SCOPE_MODULEREF:
+ case MONO_RESOLUTION_SCOPE_MODULEREF:
/* FIXME: */
return g_strdup ("");
- case MONO_RESOLTION_SCOPE_TYPEREF:
+ case MONO_RESOLUTION_SCOPE_TYPEREF:
/* FIXME: */
return g_strdup ("");
- case MONO_RESOLTION_SCOPE_ASSEMBLYREF:
+ case MONO_RESOLUTION_SCOPE_ASSEMBLYREF:
mono_assembly_get_assemblyref (image, idx - 1, &aname);
return mono_stringify_assembly_name (&aname);
default:
values = table->values + token * MONO_MODULEREF_SIZE;
values [MONO_MODULEREF_NAME] = string_heap_insert (&assembly->sheap, image->module_name);
- token <<= MONO_RESOLTION_SCOPE_BITS;
- token |= MONO_RESOLTION_SCOPE_MODULEREF;
+ token <<= MONO_RESOLUTION_SCOPE_BITS;
+ token |= MONO_RESOLUTION_SCOPE_MODULEREF;
g_hash_table_insert (assembly->handleref, image, GUINT_TO_POINTER (token));
return token;
} else {
values [MONO_ASSEMBLYREF_PUBLIC_KEY] = 0;
}
- token <<= MONO_RESOLTION_SCOPE_BITS;
- token |= MONO_RESOLTION_SCOPE_ASSEMBLYREF;
+ token <<= MONO_RESOLUTION_SCOPE_BITS;
+ token |= MONO_RESOLUTION_SCOPE_ASSEMBLYREF;
g_hash_table_insert (assembly->handleref, image, GUINT_TO_POINTER (token));
return token;
}
enclosing = mono_image_typedef_or_ref_full (assembly, &klass->nested_in->byval_arg, FALSE);
/* get the typeref idx of the enclosing type */
enclosing >>= MONO_TYPEDEFORREF_BITS;
- scope = (enclosing << MONO_RESOLTION_SCOPE_BITS) | MONO_RESOLTION_SCOPE_TYPEREF;
+ scope = (enclosing << MONO_RESOLUTION_SCOPE_BITS) | MONO_RESOLUTION_SCOPE_TYPEREF;
} else {
scope = resolution_scope_from_image (assembly, klass->image);
}
forwarder = FALSE;
} else {
scope = resolution_scope_from_image (assembly, klass->image);
- g_assert ((scope & MONO_RESOLTION_SCOPE_MASK) == MONO_RESOLTION_SCOPE_ASSEMBLYREF);
- scope_idx = scope >> MONO_RESOLTION_SCOPE_BITS;
+ g_assert ((scope & MONO_RESOLUTION_SCOPE_MASK) == MONO_RESOLUTION_SCOPE_ASSEMBLYREF);
+ scope_idx = scope >> MONO_RESOLUTION_SCOPE_BITS;
impl = (scope_idx << MONO_IMPLEMENTATION_BITS) + MONO_IMPLEMENTATION_ASSEMBLYREF;
}
MONO_CUSTOM_ATTR_TYPE_MASK = 7
};
+enum {
+ MONO_RESOLUTION_SCOPE_MODULE,
+ MONO_RESOLUTION_SCOPE_MODULEREF,
+ MONO_RESOLUTION_SCOPE_ASSEMBLYREF,
+ MONO_RESOLUTION_SCOPE_TYPEREF,
+ MONO_RESOLUTION_SCOPE_BITS = 2,
+ MONO_RESOLUTION_SCOPE_MASK = 3
+};
+
+/* Kept for compatibility since this is a public header file */
enum {
MONO_RESOLTION_SCOPE_MODULE,
MONO_RESOLTION_SCOPE_MODULEREF,