g_direct_hash,
class_key_extract,
class_next_value);
- image->field_cache = mono_conc_hashtable_new (&image->lock, NULL, NULL);
+ image->field_cache = mono_conc_hashtable_new (NULL, NULL);
image->typespec_cache = g_hash_table_new (NULL, NULL);
image->memberref_signatures = g_hash_table_new (NULL, NULL);
}
MonoImage *
-mono_image_open_from_data_with_name (char *data, guint32 data_len, gboolean need_copy, MonoImageOpenStatus *status, gboolean refonly, const char *name)
+mono_image_open_from_data_internal (char *data, guint32 data_len, gboolean need_copy, MonoImageOpenStatus *status, gboolean refonly, gboolean metadata_only, const char *name)
{
MonoCLIImageInfo *iinfo;
MonoImage *image;
iinfo = g_new0 (MonoCLIImageInfo, 1);
image->image_info = iinfo;
image->ref_only = refonly;
+ image->metadata_only = metadata_only;
image = do_mono_image_load (image, status, TRUE, TRUE);
if (image == NULL)
return register_image (image);
}
+MonoImage *
+mono_image_open_from_data_with_name (char *data, guint32 data_len, gboolean need_copy, MonoImageOpenStatus *status, gboolean refonly, const char *name)
+{
+ return mono_image_open_from_data_internal (data, data_len, need_copy, status, refonly, FALSE, name);
+}
+
MonoImage *
mono_image_open_from_data_full (char *data, guint32 data_len, gboolean need_copy, MonoImageOpenStatus *status, gboolean refonly)
{
g_hash_table_destroy (hash);
}
+void
+mono_wrapper_caches_free (MonoWrapperCaches *cache)
+{
+ free_hash (cache->delegate_invoke_cache);
+ free_hash (cache->delegate_begin_invoke_cache);
+ free_hash (cache->delegate_end_invoke_cache);
+ free_hash (cache->runtime_invoke_cache);
+ free_hash (cache->runtime_invoke_vtype_cache);
+
+ free_hash (cache->delegate_abstract_invoke_cache);
+
+ free_hash (cache->runtime_invoke_direct_cache);
+ free_hash (cache->managed_wrapper_cache);
+
+ free_hash (cache->native_wrapper_cache);
+ free_hash (cache->native_wrapper_aot_cache);
+ free_hash (cache->native_wrapper_check_cache);
+ free_hash (cache->native_wrapper_aot_check_cache);
+
+ free_hash (cache->native_func_wrapper_aot_cache);
+ free_hash (cache->remoting_invoke_cache);
+ free_hash (cache->synchronized_cache);
+ free_hash (cache->unbox_wrapper_cache);
+ free_hash (cache->cominterop_invoke_cache);
+ free_hash (cache->cominterop_wrapper_cache);
+ free_hash (cache->thunk_invoke_cache);
+}
+
/*
* Returns whether mono_image_close_finish() must be called as well.
* We must unload images in two steps because clearing the domain in
free_hash (image->native_func_wrapper_cache);
free_hash (image->typespec_cache);
- free_hash (image->wrapper_caches.native_wrapper_cache);
- free_hash (image->wrapper_caches.native_wrapper_aot_cache);
- free_hash (image->wrapper_caches.native_wrapper_check_cache);
- free_hash (image->wrapper_caches.native_wrapper_aot_check_cache);
- free_hash (image->wrapper_caches.managed_wrapper_cache);
- free_hash (image->wrapper_caches.delegate_begin_invoke_cache);
- free_hash (image->wrapper_caches.delegate_end_invoke_cache);
- free_hash (image->wrapper_caches.delegate_invoke_cache);
- free_hash (image->wrapper_caches.delegate_abstract_invoke_cache);
- free_hash (image->wrapper_caches.remoting_invoke_cache);
- free_hash (image->wrapper_caches.runtime_invoke_cache);
- free_hash (image->wrapper_caches.runtime_invoke_vtype_cache);
- free_hash (image->wrapper_caches.runtime_invoke_direct_cache);
- free_hash (image->wrapper_caches.synchronized_cache);
- free_hash (image->wrapper_caches.unbox_wrapper_cache);
- free_hash (image->wrapper_caches.cominterop_invoke_cache);
- free_hash (image->wrapper_caches.cominterop_wrapper_cache);
- free_hash (image->wrapper_caches.thunk_invoke_cache);
+ mono_wrapper_caches_free (&image->wrapper_caches);
for (i = 0; i < image->gshared_types_len; ++i)
free_hash (image->gshared_types [i]);