#include <mono/utils/mono-codeman.h>
#include <mono/utils/mono-hash.h>
#include <mono/utils/mono-compiler.h>
+#include <mono/utils/mono-internal-hash.h>
#include <mono/io-layer/io-layer.h>
extern CRITICAL_SECTION mono_delegate_section;
int loader_optimization;
MonoBoolean disallow_binding_redirects;
MonoBoolean disallow_code_downloads;
+ MonoObject *activation_arguments; /* it is System.Object in 1.x, ActivationArguments in 2.0 */
+ MonoObject *domain_initializer;
+ MonoArray *domain_initializer_args;
+ MonoObject *application_trust; /* it is System.Object in 1.x, ApplicationTrust in 2.0 */
+ MonoBoolean disallow_appbase_probe;
+ MonoArray *configuration_bytes;
} MonoAppDomainSetup;
-typedef GArray MonoJitInfoTable;
+typedef struct _MonoJitInfoTable MonoJitInfoTable;
+typedef struct _MonoJitInfoTableChunk MonoJitInfoTableChunk;
+
+#define MONO_JIT_INFO_TABLE_CHUNK_SIZE 64
+
+struct _MonoJitInfoTableChunk
+{
+ int refcount;
+ volatile int num_elements;
+ volatile gint8 *last_code_end;
+ MonoJitInfo * volatile data [MONO_JIT_INFO_TABLE_CHUNK_SIZE];
+};
+
+struct _MonoJitInfoTable
+{
+ int num_chunks;
+ MonoJitInfoTableChunk *chunks [MONO_ZERO_LEN_ARRAY];
+};
+
+typedef GArray MonoAotModuleInfoTable;
typedef struct {
guint32 flags;
} MonoJitExceptionInfo;
struct _MonoJitInfo {
+ /* NOTE: These first two elements (method and
+ next_jit_code_hash) must be in the same order and at the
+ same offset as in RuntimeMethod, because of the jit_code_hash
+ internal hash table in MonoDomain. */
MonoMethod *method;
+ struct _MonoJitInfo *next_jit_code_hash;
gpointer code_start;
guint32 used_regs;
int code_size;
MONO_APPDOMAIN_UNLOADED
} MonoAppDomainState;
+typedef struct _MonoJitCodeHash MonoJitCodeHash;
+
struct _MonoDomain {
CRITICAL_SECTION lock;
MonoMemPool *mp;
guint32 state;
/* Needed by Thread:GetDomainID() */
gint32 domain_id;
+ gint32 shadow_serial;
GSList *domain_assemblies;
MonoAssembly *entry_assembly;
char *friendly_name;
GHashTable *class_vtable_hash;
/* maps remote class key -> MonoRemoteClass */
GHashTable *proxy_vtable_hash;
- GHashTable *jit_code_hash;
+ MonoInternalHashTable jit_code_hash;
/* maps MonoMethod -> MonoJitDynamicMethodInfo */
GHashTable *dynamic_code_hash;
- MonoJitInfoTable *jit_info_table;
+ MonoJitInfoTable *
+ volatile jit_info_table;
/* Used when loading assemblies */
gchar **search_path;
+ gchar *private_bin_path;
+
/* Used by remoting proxies */
MonoMethod *create_proxy_for_type_method;
MonoMethod *private_invoke_method;
GHashTable *jump_trampoline_hash;
GHashTable *jit_trampoline_hash;
GHashTable *delegate_trampoline_hash;
+ GHashTable *delegate_invoke_impl_with_target_hash;
+ GHashTable *delegate_invoke_impl_no_target_hash;
/*
* This must be a GHashTable, since these objects can't be finalized
* if the hashtable contains a GC visible reference to them.
#define mono_domain_assemblies_lock(domain) EnterCriticalSection(&(domain)->assemblies_lock)
#define mono_domain_assemblies_unlock(domain) LeaveCriticalSection(&(domain)->assemblies_lock)
+void
+mono_init_com_types (void) MONO_INTERNAL;
+
void
mono_cleanup (void) MONO_INTERNAL;
typedef MonoJitInfo *(*MonoJitInfoFindInAot) (MonoDomain *domain, MonoImage *image, gpointer addr);
void mono_install_jit_info_find_in_aot (MonoJitInfoFindInAot func) MONO_INTERNAL;
+void
+mono_jit_code_hash_init (MonoInternalHashTable *jit_code_hash) MONO_INTERNAL;
+
MonoAppDomain *
ves_icall_System_AppDomain_getCurDomain (void) MONO_INTERNAL;
void
mono_assembly_name_free (MonoAssemblyName *aname) MONO_INTERNAL;
+MonoImage *mono_assembly_open_from_bundle (const char *filename,
+ MonoImageOpenStatus *status,
+ gboolean refonly) MONO_INTERNAL;
+
void
mono_domain_add_class_static_data (MonoDomain *domain, MonoClass *klass, gpointer data, guint32 *bitmap);