[runtime] Fix the RESOLTION_SCOPE->RESOLUTION_SCOPE typo.
authorZoltan Varga <vargaz@gmail.com>
Wed, 10 Sep 2014 23:06:15 +0000 (19:06 -0400)
committerZoltan Varga <vargaz@gmail.com>
Wed, 10 Sep 2014 23:07:04 +0000 (19:07 -0400)
mono/metadata/class.c
mono/metadata/reflection.c
mono/metadata/row-indexes.h

index ec4c2285739f19cd17821f8b1beba25a2f6c966f..240792536d330ec81651be3dab69f25e0769067a 100644 (file)
@@ -191,9 +191,9 @@ mono_class_from_typeref_checked (MonoImage *image, guint32 type_token, MonoError
        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.
@@ -203,13 +203,13 @@ mono_class_from_typeref_checked (MonoImage *image, guint32 type_token, MonoError
                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;
 
@@ -246,7 +246,7 @@ mono_class_from_typeref_checked (MonoImage *image, guint32 type_token, MonoError
                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;
        }
 
@@ -7100,18 +7100,18 @@ mono_assembly_name_from_token (MonoImage *image, guint32 type_token)
                }
                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:
index e74fe3f0d6543de326ff90c6442243e0a5d0a9b6..3ea728173df57959291e24b51ed79d795ed686d4 100644 (file)
@@ -2256,8 +2256,8 @@ resolution_scope_from_image (MonoDynamicImage *assembly, MonoImage *image)
                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;
@@ -2299,8 +2299,8 @@ resolution_scope_from_image (MonoDynamicImage *assembly, MonoImage *image)
        } 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;
 }
@@ -2390,7 +2390,7 @@ mono_image_typedef_or_ref_full (MonoDynamicImage *assembly, MonoType *type, gboo
                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);
        }
@@ -3824,8 +3824,8 @@ add_exported_type (MonoReflectionAssemblyBuilder *assemblyb, MonoDynamicImage *a
                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;
        }
 
index 4b4ca6dbc961417bf764d270169f8321b66c8adc..74fbf6b35c5aa791a7e9d511b220d329b655174f 100644 (file)
@@ -419,6 +419,16 @@ enum {
        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,