4 * Dietmar Maurer (dietmar@ximian.com)
6 * (C) 2001, 2002, 2003 Ximian, Inc.
9 #ifndef _MONO_JIT_JIT_H_
10 #define _MONO_JIT_JIT_H_
12 #include <mono/metadata/appdomain.h>
17 mono_jit_init (const char *file);
20 mono_jit_init_version (const char *root_domain_name, const char *runtime_version);
23 mono_jit_exec (MonoDomain *domain, MonoAssembly *assembly,
24 int argc, char *argv[]);
26 mono_jit_cleanup (MonoDomain *domain);
29 mono_jit_set_trace_options (const char* options);
32 mono_set_signal_chaining (mono_bool chain_signals);
35 mono_set_crash_chaining (mono_bool chain_signals);
38 * This function is deprecated, use mono_jit_set_aot_mode instead.
41 mono_jit_set_aot_only (mono_bool aot_only);
44 * Allows control over our AOT (Ahead-of-time) compilation mode.
47 /* Disables AOT mode */
49 /* Enables normal AOT mode, equivalent to mono_jit_set_aot_only (false) */
51 /* Enables hybrid AOT mode, JIT can still be used for wrappers */
53 /* Enables full AOT mode, JIT is disabled and not allowed,
54 * equivalent to mono_jit_set_aot_only (true) */
56 /* Same as full, but use only llvm compiled code */
57 MONO_AOT_MODE_LLVMONLY,
58 /* Uses Interpreter, JIT is disabled and not allowed,
59 * equivalent to "--full-aot --interpreter" */
64 mono_jit_set_aot_mode (MonoAotMode mode);
67 * Returns whether the runtime was invoked for the purpose of AOT-compiling an
68 * assembly, i.e. no managed code will run.
71 mono_jit_aot_compiling (void);
73 /* Allow embedders to decide wherther to actually obey breakpoint instructions
74 * in specific methods (works for both break IL instructions and Debugger.Break ()
78 /* the default is to always obey the breakpoint */
79 MONO_BREAK_POLICY_ALWAYS,
80 /* a nop is inserted instead of a breakpoint */
81 MONO_BREAK_POLICY_NEVER,
82 /* the breakpoint is executed only if the program has ben started under
83 * the debugger (that is if a debugger was attached at the time the method
86 MONO_BREAK_POLICY_ON_DBG
89 typedef MonoBreakPolicy (*MonoBreakPolicyFunc) (MonoMethod *method);
90 MONO_API void mono_set_break_policy (MonoBreakPolicyFunc policy_callback);
93 mono_jit_parse_options (int argc, char * argv[]);
95 MONO_API char* mono_get_runtime_build_info (void);