X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmetadata%2Fdomain.c;h=a3ba4a76e0492b35533b95791df77c3eab1a235c;hb=b2cf10659d74681988ad53c18f368c007990d829;hp=da3b6930aafef0036aee4ecf3e6091fbc60dc6ca;hpb=32f2f7c898abd259b447eb318e9664e518ea6807;p=mono.git diff --git a/mono/metadata/domain.c b/mono/metadata/domain.c index da3b6930aaf..a3ba4a76e04 100644 --- a/mono/metadata/domain.c +++ b/mono/metadata/domain.c @@ -707,9 +707,6 @@ mono_init_internal (const char *filename, const char *exe_filename, const char * mono_defaults.systemtype_class = mono_class_load_from_name ( mono_defaults.corlib, "System", "Type"); - mono_defaults.monotype_class = mono_class_load_from_name ( - mono_defaults.corlib, "System", "MonoType"); - mono_defaults.runtimetype_class = mono_class_load_from_name ( mono_defaults.corlib, "System", "RuntimeType"); @@ -783,7 +780,7 @@ mono_init_internal (const char *filename, const char *exe_filename, const char * mono_assembly_load_friends (ass); - mono_defaults.handleref_class = mono_class_load_from_name ( + mono_defaults.handleref_class = mono_class_try_load_from_name ( mono_defaults.corlib, "System.Runtime.InteropServices", "HandleRef"); mono_defaults.attribute_class = mono_class_load_from_name ( @@ -1054,7 +1051,7 @@ unregister_vtable_reflection_type (MonoVTable *vtable) { MonoObject *type = (MonoObject *)vtable->type; - if (type->vtable->klass != mono_defaults.monotype_class) + if (type->vtable->klass != mono_defaults.runtimetype_class) MONO_GC_UNREGISTER_ROOT_IF_MOVING (vtable->type); } @@ -1169,12 +1166,6 @@ mono_domain_free (MonoDomain *domain, gboolean force) g_slist_free (domain->domain_assemblies); domain->domain_assemblies = NULL; - /* - * Send this after the assemblies have been unloaded and the domain is still in a - * usable state. - */ - mono_profiler_appdomain_event (domain, MONO_PROFILE_END_UNLOAD); - if (free_domain_hook) free_domain_hook (domain); @@ -1426,58 +1417,6 @@ mono_domain_code_commit (MonoDomain *domain, void *data, int size, int newsize) mono_domain_unlock (domain); } -#if defined(__native_client_codegen__) && defined(__native_client__) -/* - * Given the temporary buffer (allocated by mono_domain_code_reserve) into which - * we are generating code, return a pointer to the destination in the dynamic - * code segment into which the code will be copied when mono_domain_code_commit - * is called. - * LOCKING: Acquires the domain lock. - */ -void * -nacl_domain_get_code_dest (MonoDomain *domain, void *data) -{ - void *dest; - mono_domain_lock (domain); - dest = nacl_code_manager_get_code_dest (domain->code_mp, data); - mono_domain_unlock (domain); - return dest; -} - -/* - * Convenience function which calls mono_domain_code_commit to validate and copy - * the code. The caller sets *buf_base and *buf_size to the start and size of - * the buffer (allocated by mono_domain_code_reserve), and *code_end to the byte - * after the last instruction byte. On return, *buf_base will point to the start - * of the copied in the code segment, and *code_end will point after the end of - * the copied code. - */ -void -nacl_domain_code_validate (MonoDomain *domain, guint8 **buf_base, int buf_size, guint8 **code_end) -{ - guint8 *tmp = nacl_domain_get_code_dest (domain, *buf_base); - mono_domain_code_commit (domain, *buf_base, buf_size, *code_end - *buf_base); - *code_end = tmp + (*code_end - *buf_base); - *buf_base = tmp; -} - -#else - -/* no-op versions of Native Client functions */ - -void * -nacl_domain_get_code_dest (MonoDomain *domain, void *data) -{ - return data; -} - -void -nacl_domain_code_validate (MonoDomain *domain, guint8 **buf_base, int buf_size, guint8 **code_end) -{ -} - -#endif - /* * mono_domain_code_foreach: * Iterate over the code thunks of the code manager of @domain.