free_hash (image->native_wrapper_aot_cache);
free_hash (image->pinvoke_scopes);
free_hash (image->pinvoke_scope_filenames);
- free_hash (image->gsharedvt_types);
+ for (i = 0; i < image->gshared_types_len; ++i)
+ free_hash (image->gshared_types [i]);
+ g_free (image->gshared_types);
/* The ownership of signatures is not well defined */
g_hash_table_destroy (image->memberref_signatures);
GHashTable *pinvoke_scope_filenames;
/* Indexed by MonoGenericParam pointers */
- GHashTable *gsharedvt_types;
+ GHashTable **gshared_types;
+ /* The length of the above array */
+ int gshared_types_len;
/*
* No other runtime locks must be taken while holding this lock.
image = par->owner->image;
mono_image_lock (image);
- if (!image->gsharedvt_types)
- image->gsharedvt_types = g_hash_table_new (NULL, NULL);
- res = g_hash_table_lookup (image->gsharedvt_types, par);
+ if (!image->gshared_types) {
+ image->gshared_types_len = 1;
+ image->gshared_types [0] = g_hash_table_new (NULL, NULL);
+ }
+ res = g_hash_table_lookup (image->gshared_types [0], par);
mono_image_unlock (image);
if (res)
return res;
if (par->owner) {
mono_image_lock (image);
/* Duplicates are ok */
- g_hash_table_insert (image->gsharedvt_types, par, res);
+ g_hash_table_insert (image->gshared_types [0], par, res);
mono_image_unlock (image);
}