Revert "Merge branch 'master' of https://github.com/mono/mono"
[mono.git] / mono / metadata / domain-internals.h
1 /*
2  * Appdomain-related internal data structures and functions.
3  * Copyright 2012 Xamarin Inc (http://www.xamarin.com)
4  */
5 #ifndef __MONO_METADATA_DOMAIN_INTERNALS_H__
6 #define __MONO_METADATA_DOMAIN_INTERNALS_H__
7
8 #include <mono/metadata/appdomain.h>
9 #include <mono/metadata/mempool.h>
10 #include <mono/metadata/lock-tracer.h>
11 #include <mono/utils/mono-codeman.h>
12 #include <mono/metadata/mono-hash.h>
13 #include <mono/utils/mono-compiler.h>
14 #include <mono/utils/mono-internal-hash.h>
15 #include <mono/io-layer/io-layer.h>
16 #include <mono/metadata/mempool-internals.h>
17
18 extern CRITICAL_SECTION mono_delegate_section;
19 extern CRITICAL_SECTION mono_strtod_mutex;
20
21 /*
22  * If this is set, the memory belonging to appdomains is not freed when a domain is
23  * unloaded, and assemblies loaded by the appdomain are not unloaded either. This
24  * allows us to use typed gc in non-default appdomains too, leading to increased
25  * performance.
26  */ 
27 extern gboolean mono_dont_free_domains;
28
29 /* This is a copy of System.AppDomainSetup */
30 typedef struct {
31         MonoObject object;
32         MonoString *application_base;
33         MonoString *application_name;
34         MonoString *cache_path;
35         MonoString *configuration_file;
36         MonoString *dynamic_base;
37         MonoString *license_file;
38         MonoString *private_bin_path;
39         MonoString *private_bin_path_probe;
40         MonoString *shadow_copy_directories;
41         MonoString *shadow_copy_files;
42         MonoBoolean publisher_policy;
43         MonoBoolean path_changed;
44         int loader_optimization;
45         MonoBoolean disallow_binding_redirects;
46         MonoBoolean disallow_code_downloads;
47         MonoObject *activation_arguments; /* it is System.Object in 1.x, ActivationArguments in 2.0 */
48         MonoObject *domain_initializer;
49         MonoObject *application_trust; /* it is System.Object in 1.x, ApplicationTrust in 2.0 */
50         MonoArray *domain_initializer_args;
51         MonoBoolean disallow_appbase_probe;
52         MonoArray *configuration_bytes;
53         MonoArray *serialized_non_primitives;
54 } MonoAppDomainSetup;
55
56 typedef struct _MonoJitInfoTable MonoJitInfoTable;
57 typedef struct _MonoJitInfoTableChunk MonoJitInfoTableChunk;
58
59 #define MONO_JIT_INFO_TABLE_CHUNK_SIZE          64
60
61 struct _MonoJitInfoTableChunk
62 {
63         int                    refcount;
64         volatile int           num_elements;
65         volatile gint8        *last_code_end;
66         MonoJitInfo * volatile data [MONO_JIT_INFO_TABLE_CHUNK_SIZE];
67 };
68
69 struct _MonoJitInfoTable
70 {
71         MonoDomain             *domain;
72         int                     num_chunks;
73         MonoJitInfoTableChunk  *chunks [MONO_ZERO_LEN_ARRAY];
74 };
75
76 #define MONO_SIZEOF_JIT_INFO_TABLE (sizeof (struct _MonoJitInfoTable) - MONO_ZERO_LEN_ARRAY * SIZEOF_VOID_P)
77
78 typedef GArray MonoAotModuleInfoTable;
79
80 typedef struct {
81         guint32  flags;
82         gint32   exvar_offset;
83         gpointer try_start;
84         gpointer try_end;
85         gpointer handler_start;
86         union {
87                 MonoClass *catch_class;
88                 gpointer filter;
89                 gpointer handler_end;
90         } data;
91 } MonoJitExceptionInfo;
92
93 /*
94  * Contains information about the type arguments for generic shared methods.
95  */
96 typedef struct {
97         /*
98          * If not NULL, determines whenever the class type arguments of the gshared method are references or vtypes.
99          * The array length is equal to class_inst->type_argv.
100          */
101         gboolean *var_is_vt;
102         /* Same for method type parameters */
103         gboolean *mvar_is_vt;
104 } MonoGenericSharingContext;
105
106 /* Simplified DWARF location list entry */
107 typedef struct {
108         /* Whenever the value is in a register */
109         gboolean is_reg;
110         /*
111          * If is_reg is TRUE, the register which contains the value. Otherwise
112          * the base register.
113          */
114         int reg;
115         /*
116          * If is_reg is FALSE, the offset of the stack location relative to 'reg'.
117          * Otherwise, 0.
118          */
119         int offset;
120         /*
121          * Offsets of the PC interval where the value is in this location.
122          */
123         int from, to;
124 } MonoDwarfLocListEntry;
125
126 typedef struct
127 {
128         MonoGenericSharingContext *generic_sharing_context;
129         int nlocs;
130         MonoDwarfLocListEntry *locations;
131         gint32 this_offset;
132         guint8 this_reg;
133         gboolean has_this:1;
134         gboolean this_in_reg:1;
135 } MonoGenericJitInfo;
136
137 /*
138 A try block hole is used to represent a non-contiguous part of
139 of a segment of native code protected by a given .try block.
140 Usually, a try block is defined as a contiguous segment of code.
141 But in some cases it's needed to have some parts of it to not be protected.
142 For example, given "try {} finally {}", the code in the .try block to call
143 the finally part looks like:
144
145 try {
146     ...
147         call finally_block
148         adjust stack
149         jump outside try block
150         ...
151 } finally {
152         ...
153 }
154
155 The instructions between the call and the jump should not be under the try block since they happen
156 after the finally block executes, which means if an async exceptions happens at that point we would
157 execute the finally clause twice. So, to avoid this, we introduce a hole in the try block to signal
158 that those instructions are not protected.
159 */
160 typedef struct
161 {
162         guint32 offset;
163         guint16 clause;
164         guint16 length;
165 } MonoTryBlockHoleJitInfo;
166
167 typedef struct
168 {
169         guint16 num_holes;
170         MonoTryBlockHoleJitInfo holes [MONO_ZERO_LEN_ARRAY];
171 } MonoTryBlockHoleTableJitInfo;
172
173 typedef struct
174 {
175         guint32 stack_size;
176 } MonoArchEHJitInfo;
177
178 typedef struct {
179         gboolean    cas_inited:1;
180         gboolean    cas_class_assert:1;
181         gboolean    cas_class_deny:1;
182         gboolean    cas_class_permitonly:1;
183         gboolean    cas_method_assert:1;
184         gboolean    cas_method_deny:1;
185         gboolean    cas_method_permitonly:1;
186 } MonoMethodCasInfo;
187
188 struct _MonoJitInfo {
189         /* NOTE: These first two elements (method and
190            next_jit_code_hash) must be in the same order and at the
191            same offset as in RuntimeMethod, because of the jit_code_hash
192            internal hash table in MonoDomain. */
193         union {
194                 MonoMethod *method;
195                 MonoImage *image;
196                 gpointer aot_info;
197         } d;
198         struct _MonoJitInfo *next_jit_code_hash;
199         gpointer    code_start;
200         /* This might contain an id for the unwind info instead of a register mask */
201         guint32     used_regs;
202         int         code_size;
203         guint32     num_clauses:15;
204         /* Whenever the code is domain neutral or 'shared' */
205         gboolean    domain_neutral:1;
206         gboolean    has_cas_info:1;
207         gboolean    has_generic_jit_info:1;
208         gboolean    has_try_block_holes:1;
209         gboolean    has_arch_eh_info:1;
210         gboolean    from_aot:1;
211         gboolean    from_llvm:1;
212         gboolean    dbg_hidden_inited:1;
213         gboolean    dbg_hidden:1;
214         /* Whenever this jit info was loaded in async context */
215         gboolean    async:1;
216         gboolean    dbg_step_through_inited:1;
217         gboolean    dbg_step_through:1;
218
219         /* FIXME: Embed this after the structure later*/
220         gpointer    gc_info; /* Currently only used by SGen */
221         
222         MonoJitExceptionInfo clauses [MONO_ZERO_LEN_ARRAY];
223         /* There is an optional MonoGenericJitInfo after the clauses */
224         /* There is an optional MonoTryBlockHoleTableJitInfo after MonoGenericJitInfo clauses*/
225         /* There is an optional MonoArchEHJitInfo after MonoTryBlockHoleTableJitInfo */
226 };
227
228 #define MONO_SIZEOF_JIT_INFO (offsetof (struct _MonoJitInfo, clauses))
229
230 struct _MonoAppContext {
231         MonoObject obj;
232         gint32 domain_id;
233         gint32 context_id;
234         gpointer *static_data;
235 };
236
237 /* Lock-free allocator */
238 typedef struct {
239         guint8 *mem;
240         gpointer prev;
241         int size, pos;
242 } LockFreeMempoolChunk;
243
244 typedef struct {
245         LockFreeMempoolChunk *current, *chunks;
246 } LockFreeMempool;
247
248 /*
249  * We have two unloading states because the domain
250  * must remain fully functional while AppDomain::DomainUnload is
251  * processed.
252  * After that unloading began and all domain facilities are teared down
253  * such as execution of new threadpool jobs.  
254  */
255 typedef enum {
256         MONO_APPDOMAIN_CREATED,
257         MONO_APPDOMAIN_UNLOADING_START,
258         MONO_APPDOMAIN_UNLOADING,
259         MONO_APPDOMAIN_UNLOADED
260 } MonoAppDomainState;
261
262 typedef struct _MonoThunkFreeList {
263         guint32 size;
264         int length;             /* only valid for the wait list */
265         struct _MonoThunkFreeList *next;
266 } MonoThunkFreeList;
267
268 typedef struct _MonoJitCodeHash MonoJitCodeHash;
269
270 typedef struct _MonoTlsDataRecord MonoTlsDataRecord;
271 struct _MonoTlsDataRecord {
272         MonoTlsDataRecord *next;
273         guint32 tls_offset;
274         guint32 size;
275 };
276
277 struct _MonoDomain {
278         /*
279          * This lock must never be taken before the loader lock,
280          * i.e. if both are taken by the same thread, the loader lock
281          * must taken first.
282          */
283         CRITICAL_SECTION    lock;
284         MonoMemPool        *mp;
285         MonoCodeManager    *code_mp;
286         /*
287          * keep all the managed objects close to each other for the precise GC
288          * For the Boehm GC we additionally keep close also other GC-tracked pointers.
289          */
290 #define MONO_DOMAIN_FIRST_OBJECT setup
291         MonoAppDomainSetup *setup;
292         MonoAppDomain      *domain;
293         MonoAppContext     *default_context;
294         MonoException      *out_of_memory_ex;
295         MonoException      *null_reference_ex;
296         MonoException      *stack_overflow_ex;
297         /* typeof (void) */
298         MonoObject         *typeof_void;
299         /* Ephemeron Tombstone*/
300         MonoObject         *ephemeron_tombstone;
301         /* new MonoType [0] */
302         MonoArray          *empty_types;
303         /* 
304          * The fields between FIRST_GC_TRACKED and LAST_GC_TRACKED are roots, but
305          * not object references.
306          */
307 #define MONO_DOMAIN_FIRST_GC_TRACKED env
308         MonoGHashTable     *env;
309         MonoGHashTable     *ldstr_table;
310         /* hashtables for Reflection handles */
311         MonoGHashTable     *type_hash;
312         MonoGHashTable     *refobject_hash;
313         /* a GC-tracked array to keep references to the static fields of types */
314         gpointer           *static_data_array;
315         /* maps class -> type initialization exception object */
316         MonoGHashTable    *type_init_exception_hash;
317         /* maps delegate trampoline addr -> delegate object */
318         MonoGHashTable     *delegate_hash_table;
319 #define MONO_DOMAIN_LAST_GC_TRACKED delegate_hash_table
320         guint32            state;
321         /* Needed by Thread:GetDomainID() */
322         gint32             domain_id;
323         gint32             shadow_serial;
324         unsigned char      inet_family_hint; // used in socket-io.c as a cache
325         GSList             *domain_assemblies;
326         MonoAssembly       *entry_assembly;
327         char               *friendly_name;
328         GPtrArray          *class_vtable_array;
329         /* maps remote class key -> MonoRemoteClass */
330         GHashTable         *proxy_vtable_hash;
331         /* Protected by 'jit_code_hash_lock' */
332         MonoInternalHashTable jit_code_hash;
333         CRITICAL_SECTION    jit_code_hash_lock;
334         int                 num_jit_info_tables;
335         MonoJitInfoTable * 
336           volatile          jit_info_table;
337         /*
338          * Contains information about AOT loaded code.
339          * Only used in the root domain.
340          */
341         MonoJitInfoTable *
342           volatile          aot_modules;
343         GSList             *jit_info_free_queue;
344         /* Used when loading assemblies */
345         gchar **search_path;
346         gchar *private_bin_path;
347         LockFreeMempool *lock_free_mp;
348         
349         /* Used by remoting proxies */
350         MonoMethod         *create_proxy_for_type_method;
351         MonoMethod         *private_invoke_method;
352         /* Used to store offsets of thread and context static fields */
353         GHashTable         *special_static_fields;
354         MonoTlsDataRecord  *tlsrec_list;
355         /* 
356          * This must be a GHashTable, since these objects can't be finalized
357          * if the hashtable contains a GC visible reference to them.
358          */
359         GHashTable         *finalizable_objects_hash;
360
361         /* Protects the three hashes above */
362         CRITICAL_SECTION   finalizable_objects_hash_lock;
363         /* Used when accessing 'domain_assemblies' */
364         CRITICAL_SECTION    assemblies_lock;
365
366         GHashTable         *method_rgctx_hash;
367
368         GHashTable         *generic_virtual_cases;
369         MonoThunkFreeList **thunk_free_lists;
370
371         GHashTable     *generic_virtual_thunks;
372
373         /* Information maintained by the JIT engine */
374         gpointer runtime_info;
375
376         /*thread pool jobs, used to coordinate shutdown.*/
377         volatile int                    threadpool_jobs;
378         HANDLE                          cleanup_semaphore;
379         
380         /* Contains the compiled runtime invoke wrapper used by finalizers */
381         gpointer            finalize_runtime_invoke;
382
383         /* Contains the compiled runtime invoke wrapper used by async resylt creation to capture thread context*/
384         gpointer            capture_context_runtime_invoke;
385
386         /* Contains the compiled method used by async resylt creation to capture thread context*/
387         gpointer            capture_context_method;
388
389         /* Assembly bindings, the per-domain part */
390         GSList *assembly_bindings;
391         gboolean assembly_bindings_parsed;
392
393         /* Used by socket-io.c */
394         /* These are domain specific, since the assembly can be unloaded */
395         MonoImage *socket_assembly;
396         MonoClass *sockaddr_class;
397         MonoClassField *sockaddr_data_field;
398
399         /* Used by threadpool.c */
400         MonoImage *system_image;
401         MonoClass *corlib_asyncresult_class;
402         MonoClass *socket_class;
403         MonoClass *ad_unloaded_ex_class;
404         MonoClass *process_class;
405
406         /* Cache function pointers for architectures  */
407         /* that require wrappers */
408         GHashTable *ftnptrs_hash;
409
410         guint32 execution_context_field_offset;
411 };
412
413 typedef struct  {
414         guint16 major, minor, build, revision;
415 } AssemblyVersionSet;
416
417 /* MonoRuntimeInfo: Contains information about versions supported by this runtime */
418 typedef struct  {
419         const char runtime_version [12];
420         const char framework_version [4];
421         const AssemblyVersionSet version_sets [4];
422 } MonoRuntimeInfo;
423
424 #define mono_domain_lock(domain) mono_locks_acquire(&(domain)->lock, DomainLock)
425 #define mono_domain_unlock(domain) mono_locks_release(&(domain)->lock, DomainLock)
426 #define mono_domain_assemblies_lock(domain) mono_locks_acquire(&(domain)->assemblies_lock, DomainAssembliesLock)
427 #define mono_domain_assemblies_unlock(domain) mono_locks_release(&(domain)->assemblies_lock, DomainAssembliesLock)
428 #define mono_domain_jit_code_hash_lock(domain) mono_locks_acquire(&(domain)->jit_code_hash_lock, DomainJitCodeHashLock)
429 #define mono_domain_jit_code_hash_unlock(domain) mono_locks_release(&(domain)->jit_code_hash_lock, DomainJitCodeHashLock)
430
431 typedef MonoDomain* (*MonoLoadFunc) (const char *filename, const char *runtime_version);
432
433 void
434 mono_install_runtime_load  (MonoLoadFunc func) MONO_INTERNAL;
435
436 MonoDomain*
437 mono_runtime_load (const char *filename, const char *runtime_version) MONO_INTERNAL;
438
439 typedef void (*MonoCreateDomainFunc) (MonoDomain *domain);
440
441 void
442 mono_install_create_domain_hook (MonoCreateDomainFunc func) MONO_INTERNAL;
443
444 typedef void (*MonoFreeDomainFunc) (MonoDomain *domain);
445
446 void
447 mono_install_free_domain_hook (MonoFreeDomainFunc func) MONO_INTERNAL;
448
449 void 
450 mono_cleanup (void) MONO_INTERNAL;
451
452 void
453 mono_close_exe_image (void) MONO_INTERNAL;
454
455 void
456 mono_jit_info_table_add    (MonoDomain *domain, MonoJitInfo *ji) MONO_INTERNAL;
457
458 void
459 mono_jit_info_table_remove (MonoDomain *domain, MonoJitInfo *ji) MONO_INTERNAL;
460
461 void
462 mono_jit_info_add_aot_module (MonoImage *image, gpointer start, gpointer end) MONO_INTERNAL;
463
464 MonoGenericJitInfo*
465 mono_jit_info_get_generic_jit_info (MonoJitInfo *ji) MONO_INTERNAL;
466
467 MonoGenericSharingContext*
468 mono_jit_info_get_generic_sharing_context (MonoJitInfo *ji) MONO_INTERNAL;
469
470 void
471 mono_jit_info_set_generic_sharing_context (MonoJitInfo *ji, MonoGenericSharingContext *gsctx) MONO_INTERNAL;
472
473 char *
474 mono_make_shadow_copy (const char *filename) MONO_INTERNAL;
475
476 gboolean
477 mono_is_shadow_copy_enabled (MonoDomain *domain, const gchar *dir_name) MONO_INTERNAL;
478
479 gpointer
480 mono_domain_alloc  (MonoDomain *domain, guint size) MONO_INTERNAL;
481
482 gpointer
483 mono_domain_alloc0 (MonoDomain *domain, guint size) MONO_INTERNAL;
484
485 gpointer
486 mono_domain_alloc0_lock_free (MonoDomain *domain, guint size) MONO_INTERNAL;
487
488 void*
489 mono_domain_code_reserve (MonoDomain *domain, int size) MONO_LLVM_INTERNAL;
490
491 void*
492 mono_domain_code_reserve_align (MonoDomain *domain, int size, int alignment) MONO_INTERNAL;
493
494 void
495 mono_domain_code_commit (MonoDomain *domain, void *data, int size, int newsize) MONO_INTERNAL;
496
497 void *
498 nacl_domain_get_code_dest (MonoDomain *domain, void *data) MONO_INTERNAL;
499
500 void 
501 nacl_domain_code_validate (MonoDomain *domain, guint8 **buf_base, int buf_size, guint8 **code_end) MONO_INTERNAL;
502
503 void
504 mono_domain_code_foreach (MonoDomain *domain, MonoCodeManagerFunc func, void *user_data) MONO_INTERNAL;
505
506 void
507 mono_domain_unset (void) MONO_INTERNAL;
508
509 void
510 mono_domain_set_internal_with_options (MonoDomain *domain, gboolean migrate_exception) MONO_INTERNAL;
511
512 MonoTryBlockHoleTableJitInfo*
513 mono_jit_info_get_try_block_hole_table_info (MonoJitInfo *ji) MONO_INTERNAL;
514
515 MonoArchEHJitInfo*
516 mono_jit_info_get_arch_eh_info (MonoJitInfo *ji) MONO_INTERNAL;
517
518 MonoMethodCasInfo*
519 mono_jit_info_get_cas_info (MonoJitInfo *ji) MONO_INTERNAL;
520
521 /* 
522  * Installs a new function which is used to return a MonoJitInfo for a method inside
523  * an AOT module.
524  */
525 typedef MonoJitInfo *(*MonoJitInfoFindInAot)         (MonoDomain *domain, MonoImage *image, gpointer addr);
526 void          mono_install_jit_info_find_in_aot (MonoJitInfoFindInAot func) MONO_INTERNAL;
527
528 void
529 mono_jit_code_hash_init (MonoInternalHashTable *jit_code_hash) MONO_INTERNAL;
530
531 MonoAppDomain *
532 ves_icall_System_AppDomain_getCurDomain            (void) MONO_INTERNAL;
533
534 MonoAppDomain *
535 ves_icall_System_AppDomain_getRootDomain           (void) MONO_INTERNAL;
536
537 MonoAppDomain *
538 ves_icall_System_AppDomain_createDomain            (MonoString         *friendly_name,
539                                                     MonoAppDomainSetup *setup) MONO_INTERNAL;
540
541 MonoObject *
542 ves_icall_System_AppDomain_GetData                 (MonoAppDomain *ad, 
543                                                     MonoString    *name) MONO_INTERNAL;
544
545 MonoReflectionAssembly *
546 ves_icall_System_AppDomain_LoadAssemblyRaw         (MonoAppDomain *ad,
547                                                     MonoArray *raw_assembly, 
548                                                     MonoArray *raw_symbol_store,
549                                                     MonoObject *evidence,
550                                                     MonoBoolean refonly) MONO_INTERNAL;
551
552 void
553 ves_icall_System_AppDomain_SetData                 (MonoAppDomain *ad, 
554                                                     MonoString    *name, 
555                                                     MonoObject    *data) MONO_INTERNAL;
556
557 MonoAppDomainSetup *
558 ves_icall_System_AppDomain_getSetup                (MonoAppDomain *ad) MONO_INTERNAL;
559
560 MonoString *
561 ves_icall_System_AppDomain_getFriendlyName         (MonoAppDomain *ad) MONO_INTERNAL;
562
563 MonoArray *
564 ves_icall_System_AppDomain_GetAssemblies           (MonoAppDomain *ad,
565                                                     MonoBoolean refonly) MONO_INTERNAL;
566
567 MonoReflectionAssembly *
568 ves_icall_System_Reflection_Assembly_LoadFrom      (MonoString *fname,
569                                                     MonoBoolean refonly) MONO_INTERNAL;
570
571 MonoReflectionAssembly *
572 ves_icall_System_AppDomain_LoadAssembly            (MonoAppDomain *ad, 
573                                                     MonoString *assRef,
574                                                     MonoObject    *evidence,
575                                                     MonoBoolean refonly) MONO_INTERNAL;
576
577 gboolean
578 ves_icall_System_AppDomain_InternalIsFinalizingForUnload (gint32 domain_id) MONO_INTERNAL;
579
580 void
581 ves_icall_System_AppDomain_InternalUnload          (gint32 domain_id) MONO_INTERNAL;
582
583 gint32
584 ves_icall_System_AppDomain_ExecuteAssembly         (MonoAppDomain *ad, 
585                                                                                                         MonoReflectionAssembly *refass,
586                                                                                                         MonoArray     *args) MONO_INTERNAL;
587
588 MonoAppDomain * 
589 ves_icall_System_AppDomain_InternalSetDomain       (MonoAppDomain *ad) MONO_INTERNAL;
590
591 MonoAppDomain * 
592 ves_icall_System_AppDomain_InternalSetDomainByID   (gint32 domainid) MONO_INTERNAL;
593
594 void
595 ves_icall_System_AppDomain_InternalPushDomainRef (MonoAppDomain *ad) MONO_INTERNAL;
596
597 void
598 ves_icall_System_AppDomain_InternalPushDomainRefByID (gint32 domain_id) MONO_INTERNAL;
599
600 void
601 ves_icall_System_AppDomain_InternalPopDomainRef (void) MONO_INTERNAL;
602
603 MonoAppContext * 
604 ves_icall_System_AppDomain_InternalGetContext      (void) MONO_INTERNAL;
605
606 MonoAppContext * 
607 ves_icall_System_AppDomain_InternalGetDefaultContext      (void) MONO_INTERNAL;
608
609 MonoAppContext * 
610 ves_icall_System_AppDomain_InternalSetContext      (MonoAppContext *mc) MONO_INTERNAL;
611
612 gint32 
613 ves_icall_System_AppDomain_GetIDFromDomain (MonoAppDomain * ad) MONO_INTERNAL;
614
615 MonoString *
616 ves_icall_System_AppDomain_InternalGetProcessGuid (MonoString* newguid) MONO_INTERNAL;
617
618 MonoAssembly *
619 mono_assembly_load_corlib (const MonoRuntimeInfo *runtime, MonoImageOpenStatus *status) MONO_INTERNAL;
620
621 const MonoRuntimeInfo*
622 mono_get_runtime_info (void) MONO_INTERNAL;
623
624 void
625 mono_runtime_set_no_exec (gboolean val) MONO_INTERNAL;
626
627 gboolean
628 mono_runtime_get_no_exec (void) MONO_INTERNAL;
629
630 gboolean
631 mono_assembly_name_parse (const char *name, MonoAssemblyName *aname) MONO_INTERNAL;
632
633 MonoImage *mono_assembly_open_from_bundle (const char *filename,
634                                            MonoImageOpenStatus *status,
635                                            gboolean refonly) MONO_INTERNAL;
636
637 MONO_API void
638 mono_domain_add_class_static_data (MonoDomain *domain, MonoClass *klass, gpointer data, guint32 *bitmap);
639
640 MonoReflectionAssembly *
641 mono_try_assembly_resolve (MonoDomain *domain, MonoString *fname, gboolean refonly) MONO_INTERNAL;
642
643 MonoAssembly* mono_assembly_load_full_nosearch (MonoAssemblyName *aname, 
644                                                 const char       *basedir, 
645                                                 MonoImageOpenStatus *status,
646                                                 gboolean refonly) MONO_INTERNAL;
647
648 void mono_set_private_bin_path_from_config (MonoDomain *domain) MONO_INTERNAL;
649
650 int mono_framework_version (void) MONO_INTERNAL;
651
652 void mono_reflection_cleanup_domain (MonoDomain *domain) MONO_INTERNAL;
653
654 void mono_assembly_cleanup_domain_bindings (guint32 domain_id) MONO_INTERNAL;
655
656 MonoJitInfo* mono_jit_info_table_find_internal (MonoDomain *domain, char *addr, gboolean try_aot) MONO_INTERNAL;
657
658 void mono_enable_debug_domain_unload (gboolean enable);
659
660 #endif /* __MONO_METADATA_DOMAIN_INTERNALS_H__ */