[Facades] Use the Open.snk key for the System.ValueTuple facade (#4173)
[mono-project.git] / mono / mini / jit.h
blobed5eca5248beb4e1d7bff51a183720e7cc3e2498
1 /*
2 * Author:
3 * Dietmar Maurer (dietmar@ximian.com)
5 * (C) 2001, 2002, 2003 Ximian, Inc.
6 */
8 #ifndef _MONO_JIT_JIT_H_
9 #define _MONO_JIT_JIT_H_
11 #include <mono/metadata/appdomain.h>
13 MONO_BEGIN_DECLS
15 MONO_API MonoDomain *
16 mono_jit_init (const char *file);
18 MONO_API MonoDomain *
19 mono_jit_init_version (const char *root_domain_name, const char *runtime_version);
21 MONO_API int
22 mono_jit_exec (MonoDomain *domain, MonoAssembly *assembly,
23 int argc, char *argv[]);
24 MONO_API void
25 mono_jit_cleanup (MonoDomain *domain);
27 MONO_API mono_bool
28 mono_jit_set_trace_options (const char* options);
30 MONO_API void
31 mono_set_signal_chaining (mono_bool chain_signals);
33 MONO_API void
34 mono_set_crash_chaining (mono_bool chain_signals);
36 /**
37 * This function is deprecated, use mono_jit_set_aot_mode instead.
39 MONO_API void
40 mono_jit_set_aot_only (mono_bool aot_only);
42 /**
43 * Allows control over our AOT (Ahead-of-time) compilation mode.
45 typedef enum {
46 /* Disables AOT mode */
47 MONO_AOT_MODE_NONE,
48 /* Enables normal AOT mode, equivalent to mono_jit_set_aot_only (false) */
49 MONO_AOT_MODE_NORMAL,
50 /* Enables hybrid AOT mode, JIT can still be used for wrappers */
51 MONO_AOT_MODE_HYBRID,
52 /* Enables full AOT mode, JIT is disabled and not allowed,
53 * equivalent to mono_jit_set_aot_only (true) */
54 MONO_AOT_MODE_FULL,
55 /* Same as full, but use only llvm compiled code */
56 MONO_AOT_MODE_LLVMONLY
57 } MonoAotMode;
59 MONO_API void
60 mono_jit_set_aot_mode (MonoAotMode mode);
62 /* Allow embedders to decide wherther to actually obey breakpoint instructions
63 * in specific methods (works for both break IL instructions and Debugger.Break ()
64 * method calls).
66 typedef enum {
67 /* the default is to always obey the breakpoint */
68 MONO_BREAK_POLICY_ALWAYS,
69 /* a nop is inserted instead of a breakpoint */
70 MONO_BREAK_POLICY_NEVER,
71 /* the breakpoint is executed only if the program has ben started under
72 * the debugger (that is if a debugger was attached at the time the method
73 * was compiled).
75 MONO_BREAK_POLICY_ON_DBG
76 } MonoBreakPolicy;
78 typedef MonoBreakPolicy (*MonoBreakPolicyFunc) (MonoMethod *method);
79 MONO_API void mono_set_break_policy (MonoBreakPolicyFunc policy_callback);
81 MONO_API void
82 mono_jit_parse_options (int argc, char * argv[]);
84 MONO_API char* mono_get_runtime_build_info (void);
86 /* The following APIs are not stable. Avoid if possible. */
88 MONO_API MonoJitInfo *
89 mono_get_jit_info_from_method (MonoDomain *domain, MonoMethod *method);
91 MONO_API MONO_RT_EXTERNAL_ONLY void *
92 mono_aot_get_method (MonoDomain *domain, MonoMethod *method);
94 MONO_END_DECLS
96 #endif