2 * driver.c: The new mono JIT compiler.
5 * Paolo Molaro (lupus@ximian.com)
6 * Dietmar Maurer (dietmar@ximian.com)
8 * (C) 2002-2003 Ximian, Inc.
9 * (C) 2003-2004 Novell, Inc.
16 #include <mono/metadata/assembly.h>
17 #include <mono/metadata/loader.h>
18 #include <mono/metadata/cil-coff.h>
19 #include <mono/metadata/tabledefs.h>
20 #include <mono/metadata/class.h>
21 #include <mono/metadata/object.h>
22 #include <mono/metadata/exception.h>
23 #include <mono/metadata/opcodes.h>
24 #include <mono/metadata/mono-endian.h>
25 #include <mono/metadata/tokentype.h>
26 #include <mono/metadata/tabledefs.h>
27 #include <mono/metadata/threads.h>
28 #include <mono/metadata/marshal.h>
29 #include <mono/metadata/socket-io.h>
30 #include <mono/metadata/appdomain.h>
31 #include <mono/metadata/debug-helpers.h>
32 #include <mono/io-layer/io-layer.h>
33 #include "mono/metadata/profiler.h"
34 #include <mono/metadata/profiler-private.h>
35 #include <mono/metadata/mono-config.h>
36 #include <mono/metadata/environment.h>
37 #include <mono/metadata/verify.h>
38 #include <mono/metadata/mono-debug.h>
39 #include <mono/metadata/mono-debug-debugger.h>
48 static FILE *mini_stats_fd = NULL;
50 static void mini_usage (void);
52 typedef void (*OptFunc) (const char *p);
54 /* keep in sync with enum in mini.h */
63 {"peephole", "Peephole postpass"},
64 {"branch", "Branch optimizations"},
65 {"inline", "Inline method calls"},
66 {"cfold", "Constant folding"},
67 {"consprop", "Constant propagation"},
68 {"copyprop", "Copy propagation"},
69 {"deadce", "Dead code elimination"},
70 {"linears", "Linear scan global reg allocation"},
71 {"cmov", "Conditional moves"},
72 {"shared", "Emit per-domain code"},
73 {"sched", "Instruction scheduling"},
74 {"intrins", "Intrinsic method implementations"},
75 {"tailc", "Tail recursion and tail calls"},
76 {"loop", "Loop related optimizations"},
77 {"fcmov", "Fast x86 FP compares"},
78 {"leaf", "Leaf procedures optimizations"},
79 {"aot", "Usage of Ahead Of Time compiled code"},
80 {"precomp", "Precompile all methods before executing Main"}
83 #define DEFAULT_OPTIMIZATIONS ( \
92 parse_optimizations (const char* p)
94 /* the default value */
95 guint32 opt = DEFAULT_OPTIMIZATIONS;
100 /* call out to cpu detection code here that sets the defaults ... */
101 opt |= mono_arch_cpu_optimizazions (&exclude);
113 for (i = 0; i < G_N_ELEMENTS (opt_names); ++i) {
114 n = opt_names [i].name;
116 if (strncmp (p, n, len) == 0) {
125 } else if (*p == '=') {
127 if (opt_names [i].func)
128 opt_names [i].func (p);
129 while (*p && *p++ != ',');
136 if (i == G_N_ELEMENTS (opt_names)) {
137 if (strncmp (p, "all", 3) == 0) {
141 opt = ~(MONO_OPT_SHARED | MONO_OPT_PRECOMP | exclude);
146 fprintf (stderr, "Invalid optimization name `%s'\n", p);
157 MonoGraphOptions value;
160 static const GraphName
162 {"cfg", "Control Flow Graph (CFG)" , MONO_GRAPH_CFG},
163 {"dtree", "Dominator Tree", MONO_GRAPH_DTREE},
164 {"code", "CFG showing code", MONO_GRAPH_CFG_CODE},
165 {"ssa", "CFG showing code after SSA translation", MONO_GRAPH_CFG_SSA},
166 {"optcode", "CFG showing code after IR optimizations", MONO_GRAPH_CFG_OPTCODE}
169 static MonoGraphOptions
170 mono_parse_graph_options (const char* p)
175 for (i = 0; i < G_N_ELEMENTS (graph_names); ++i) {
176 n = graph_names [i].name;
178 if (strncmp (p, n, len) == 0)
179 return graph_names [i].value;
182 fprintf (stderr, "Invalid graph name provided: %s\n", p);
187 mono_parse_default_optimizations (const char* p)
191 opt = parse_optimizations (p);
196 opt_descr (guint32 flags) {
197 GString *str = g_string_new ("");
201 for (i = 0; i < G_N_ELEMENTS (opt_names); ++i) {
202 if (flags & (1 << i)) {
204 g_string_append_c (str, ',');
205 g_string_append (str, opt_names [i].name);
209 return g_string_free (str, FALSE);
219 MONO_OPT_BRANCH | MONO_OPT_PEEPHOLE | MONO_OPT_INTRINS,
220 MONO_OPT_BRANCH | MONO_OPT_PEEPHOLE | MONO_OPT_LINEARS,
221 MONO_OPT_BRANCH | MONO_OPT_PEEPHOLE | MONO_OPT_LINEARS | MONO_OPT_COPYPROP,
222 MONO_OPT_BRANCH | MONO_OPT_PEEPHOLE | MONO_OPT_LINEARS | MONO_OPT_CFOLD,
223 MONO_OPT_BRANCH | MONO_OPT_PEEPHOLE | MONO_OPT_LINEARS | MONO_OPT_COPYPROP | MONO_OPT_CONSPROP | MONO_OPT_DEADCE,
224 MONO_OPT_BRANCH | MONO_OPT_PEEPHOLE | MONO_OPT_LINEARS | MONO_OPT_COPYPROP | MONO_OPT_CONSPROP | MONO_OPT_DEADCE | MONO_OPT_LOOP | MONO_OPT_INLINE | MONO_OPT_INTRINS
227 typedef int (*TestMethod) (void);
231 domain_dump_native_code (MonoDomain *domain) {
232 // need to poke into the domain, move to metadata/domain.c
233 // need to empty jit_info_table and code_mp
238 mini_regression (MonoImage *image, int verbose, int *total_run) {
239 guint32 i, opt, opt_flags;
243 int result, expected, failed, cfailed, run, code_size, total;
245 GTimer *timer = g_timer_new ();
248 fprintf (mini_stats_fd, "$stattitle = \'Mono Benchmark Results (various optimizations)\';\n");
250 fprintf (mini_stats_fd, "$graph->set_legend(qw(");
251 for (opt = 0; opt < G_N_ELEMENTS (opt_sets); opt++) {
252 opt_flags = opt_sets [opt];
253 n = opt_descr (opt_flags);
257 fprintf (mini_stats_fd, " ");
258 fprintf (mini_stats_fd, "%s", n);
262 fprintf (mini_stats_fd, "));\n");
264 fprintf (mini_stats_fd, "@data = (\n");
265 fprintf (mini_stats_fd, "[");
268 /* load the metadata */
269 for (i = 0; i < image->tables [MONO_TABLE_METHOD].rows; ++i) {
270 method = mono_get_method (image, MONO_TOKEN_METHOD_DEF | (i + 1), NULL);
271 mono_class_init (method->klass);
273 if (!strncmp (method->name, "test_", 5) && mini_stats_fd) {
274 fprintf (mini_stats_fd, "\"%s\",", method->name);
278 fprintf (mini_stats_fd, "],\n");
283 for (opt = 0; opt < G_N_ELEMENTS (opt_sets); ++opt) {
284 double elapsed, comp_time, start_time;
287 opt_flags = opt_sets [opt];
288 mono_set_defaults (verbose, opt_flags);
289 n = opt_descr (opt_flags);
290 g_print ("Test run: image=%s, opts=%s\n", image->name, n);
292 cfailed = failed = run = code_size = 0;
293 comp_time = elapsed = 0.0;
295 /* fixme: ugly hack - delete all previously compiled methods */
296 for (i = 0; i < image->tables [MONO_TABLE_METHOD].rows; ++i) {
297 method = mono_get_method (image, MONO_TOKEN_METHOD_DEF | (i + 1), NULL);
301 g_timer_start (timer);
303 fprintf (mini_stats_fd, "[");
304 for (i = 0; i < image->tables [MONO_TABLE_METHOD].rows; ++i) {
305 method = mono_get_method (image, MONO_TOKEN_METHOD_DEF | (i + 1), NULL);
306 if (strncmp (method->name, "test_", 5) == 0) {
307 expected = atoi (method->name + 5);
309 start_time = g_timer_elapsed (timer, NULL);
310 comp_time -= start_time;
311 cfg = mini_method_compile (method, opt_flags, mono_root_domain, TRUE, 0);
312 comp_time += g_timer_elapsed (timer, NULL);
315 g_print ("Running '%s' ...\n", method->name);
316 #ifdef MONO_USE_AOT_COMPILER
317 if ((jinfo = mono_aot_get_method (mono_root_domain, method)))
318 func = jinfo->code_start;
321 func = (TestMethod)cfg->native_code;
323 if (result != expected) {
326 g_print ("Test '%s' failed result (got %d, expected %d).\n", method->name, result, expected);
328 code_size += cfg->code_len;
329 mono_destroy_compile (cfg);
334 g_print ("Test '%s' failed compilation.\n", method->name);
337 fprintf (mini_stats_fd, "%f, ",
338 g_timer_elapsed (timer, NULL) - start_time);
342 fprintf (mini_stats_fd, "],\n");
343 g_timer_stop (timer);
344 elapsed = g_timer_elapsed (timer, NULL);
345 g_print ("Results: total tests: %d, failed: %d, cfailed: %d (pass: %.2f%%)\n",
346 run, failed, cfailed, 100.0*(run-failed-cfailed)/run);
347 g_print ("Elapsed time: %f secs (%f, %f), Code size: %d\n\n", elapsed,
348 elapsed - comp_time, comp_time, code_size);
349 total += failed + cfailed;
354 fprintf (mini_stats_fd, ");\n");
355 fflush (mini_stats_fd);
358 g_timer_destroy (timer);
363 mini_regression_list (int verbose, int count, char *images [])
365 int i, total, total_run, run;
368 total_run = total = 0;
369 for (i = 0; i < count; ++i) {
370 ass = mono_assembly_open (images [i], NULL);
372 g_warning ("failed to load assembly: %s", images [i]);
375 total += mini_regression (ass->image, verbose, &run);
377 mono_assembly_close (ass);
379 g_print ("Overall results: tests: %d, failed: %d, opt combinations: %d (pass: %.2f%%)\n",
380 total_run, total, G_N_ELEMENTS (opt_sets), 100.0*(total_run-total)/total_run);
392 typedef struct CompileAllThreadArgs {
395 } CompileAllThreadArgs;
398 compile_all_methods_thread_main (CompileAllThreadArgs *args)
400 MonoAssembly *ass = args->ass;
401 int verbose = args->verbose;
402 MonoImage *image = ass->image;
406 for (i = 0; i < image->tables [MONO_TABLE_METHOD].rows; ++i) {
407 method = mono_get_method (image, MONO_TOKEN_METHOD_DEF | (i + 1), NULL);
408 if (method->flags & METHOD_ATTRIBUTE_ABSTRACT)
410 if (method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL)
415 char * desc = mono_method_full_name (method, TRUE);
416 g_print ("Compiling %d %s\n", count, desc);
419 mono_compile_method (method);
425 compile_all_methods (MonoAssembly *ass, int verbose)
427 CompileAllThreadArgs args;
430 args.verbose = verbose;
433 * Need to create a mono thread since compilation might trigger
434 * running of managed code.
436 mono_thread_create (mono_domain_get (), compile_all_methods_thread_main, &args);
438 mono_thread_manage ();
443 * @assembly: reference to an assembly
444 * @argc: argument count
445 * @argv: argument vector
447 * Start execution of a program.
450 mono_jit_exec (MonoDomain *domain, MonoAssembly *assembly, int argc, char *argv[])
452 MonoImage *image = assembly->image;
454 guint32 entry = mono_image_get_entry_point (image);
457 g_print ("Assembly '%s' doesn't have an entry point.\n", image->name);
458 /* FIXME: remove this silly requirement. */
459 mono_environment_exitcode_set (1);
463 method = mono_get_method (image, entry, NULL);
465 return mono_runtime_run_main (method, argc, argv, NULL);
477 static void main_thread_handler (gpointer user_data)
479 MainThreadArgs *main_args = user_data;
480 MonoAssembly *assembly;
482 assembly = mono_domain_assembly_open (main_args->domain, main_args->file);
484 fprintf (stderr, "Can not open image %s\n", main_args->file);
488 if (mono_compile_aot) {
489 int res = mono_compile_assembly (assembly, main_args->opts);
490 printf ("AOT RESULT %d\n", res);
493 * This must be done in a thread managed by mono since it can invoke
496 if (main_args->opts & MONO_OPT_PRECOMP)
497 mono_precompile_assemblies ();
499 mono_jit_exec (main_args->domain, assembly, main_args->argc, main_args->argv);
509 "Usage is: mono [options] assembly\n\n"
510 "Runtime and JIT debugging:\n"
511 " --compile METHOD Just compile METHOD in assembly\n"
512 " --ncompile N Number of times to compile METHOD (default: 1)\n"
513 " --regression Runs the regression test contained in the assembly\n"
514 " --print-vtable Print the vtable of all used classes\n"
515 " --trace[=EXPR] Enable tracing, use --help-trace for details\n"
516 " --compile-all Compiles all the methods in the assembly\n"
517 " --breakonex Inserts a breakpoint on exceptions\n"
518 " --break METHOD Inserts a breakpoint at METHOD entry\n"
519 " --debug Enable debugging support\n"
520 " --stats Print statistics about the JIT operations\n"
523 " --statfile FILE Sets the stat file to FILE\n"
524 " --aot Compiles the assembly to native code\n"
525 " --profile[=profiler] Runs in profiling mode with the specified profiler module\n"
526 " --graph[=TYPE] METHOD Draws a graph of the specified method:\n");
528 for (i = 0; i < G_N_ELEMENTS (graph_names); ++i) {
529 fprintf (stdout, " %-10s %s\n", graph_names [i].name, graph_names [i].desc);
535 " --config FILE Loads FILE as the Mono config\n"
536 " --verbose, -v Increases the verbosity level\n"
537 " --help, -h Show usage information\n"
538 " --version, -V Show version information\n"
539 " --optimize=OPT Turns on a specific optimization:\n");
541 for (i = 0; i < G_N_ELEMENTS (opt_names); ++i)
542 fprintf (stdout, " %-10s %s\n", opt_names [i].name, opt_names [i].desc);
546 mini_trace_usage (void)
550 " --trace[=EXPR] Trace every call, optional EXPR controls the scope\n"
552 "EXPR is composed of:\n"
553 " all All assemblies\n"
554 " none No assemblies\n"
555 " program Entry point assembly\n"
556 " assembly Specifies an assembly\n"
557 " M:Type:Method Specifies a method\n"
558 " N:Namespace Specifies a namespace\n"
559 " T:Type Specifies a type\n"
560 " +EXPR Includes expression\n"
561 " -EXPR Excludes expression\n");
564 static const char *info = ""
565 #ifdef HAVE_KW_THREAD
569 #endif /* HAVE_KW_THREAD */
571 #ifdef USE_INCLUDED_LIBGC
572 "\tGC: Included Boehm (with typed GC)\n"
574 #if HAVE_GC_GCJ_MALLOC
575 "\tGC: System Boehm (with typed GC)\n"
577 "\tGC: System Boehm (no typed GC available)\n"
582 #endif /* HAVE_BOEHM_GC */
583 #ifdef MONO_ARCH_SIGSEGV_ON_ALTSTACK
584 "\tSIGSEGV : altstack\n"
586 "\tSIGSEGV : normal\n"
589 "\tGlobalization: ICU\n"
591 "\tGlobalization: none\n"
592 #endif /* HAVE_ICU */
596 mono_main (int argc, char* argv[])
598 MainThreadArgs main_args;
599 MonoAssembly *assembly;
600 MonoMethodDesc *desc;
604 const char* aname, *mname = NULL;
605 char *config_file = NULL;
607 int enable_debugging = FALSE;
608 guint32 opt, action = DO_EXEC;
609 MonoGraphOptions mono_graph_options = 0;
610 int mini_verbose = 0;
611 char *trace_options = NULL;
613 setlocale (LC_ALL, "");
614 g_log_set_always_fatal (G_LOG_LEVEL_ERROR);
615 g_log_set_fatal_mask (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR);
617 opt = parse_optimizations (NULL);
619 for (i = 1; i < argc; ++i) {
620 if (argv [i] [0] != '-')
622 if (strcmp (argv [i], "--regression") == 0) {
623 action = DO_REGRESSION;
624 } else if (strcmp (argv [i], "--verbose") == 0 || strcmp (argv [i], "-v") == 0) {
626 } else if (strcmp (argv [i], "--version") == 0 || strcmp (argv [i], "-V") == 0) {
627 g_print ("Mono JIT compiler version %s, (C) 2002-2004 Novell, Inc and Contributors. www.go-mono.com\n", VERSION);
630 const guchar *cerror;
631 const guchar *clibpath;
633 cerror = mono_check_corlib_version ();
634 clibpath = mono_defaults.corlib? mono_defaults.corlib->name: "unknown";
636 g_print ("The currently installed mscorlib doesn't match this runtime version.\n");
637 g_print ("The error is: %s\n", cerror);
638 g_print ("mscorlib.dll loaded at: %s\n", clibpath);
643 } else if (strcmp (argv [i], "--help") == 0 || strcmp (argv [i], "-h") == 0) {
646 } else if (strcmp (argv [i], "--help-trace") == 0){
649 } else if (strncmp (argv [i], "--statfile", 10) == 0) {
650 mini_stats_fd = fopen (argv [++i], "w+");
651 } else if (strncmp (argv [i], "--optimize=", 11) == 0) {
652 opt = parse_optimizations (argv [i] + 11);
653 } else if (strncmp (argv [i], "-O=", 3) == 0) {
654 opt = parse_optimizations (argv [i] + 3);
655 } else if (strcmp (argv [i], "--config") == 0) {
656 config_file = argv [++i];
657 } else if (strcmp (argv [i], "--ncompile") == 0) {
658 count = atoi (argv [++i]);
660 } else if (strcmp (argv [i], "--trace") == 0) {
662 } else if (strncmp (argv [i], "--trace=", 8) == 0) {
663 trace_options = &argv [i][8];
664 } else if (strcmp (argv [i], "--breakonex") == 0) {
665 mono_break_on_exc = TRUE;
666 } else if (strcmp (argv [i], "--break") == 0) {
667 if (!mono_debugger_insert_breakpoint (argv [++i], FALSE))
668 g_error ("Invalid method name '%s'", argv [i]);
669 } else if (strcmp (argv [i], "--print-vtable") == 0) {
670 mono_print_vtable = TRUE;
671 } else if (strcmp (argv [i], "--stats") == 0) {
672 mono_jit_stats.enabled = TRUE;
673 } else if (strcmp (argv [i], "--aot") == 0) {
674 mono_compile_aot = TRUE;
675 } else if (strcmp (argv [i], "--compile-all") == 0) {
677 } else if (strcmp (argv [i], "--profile") == 0) {
678 mono_profiler_load (NULL);
679 } else if (strncmp (argv [i], "--profile=", 10) == 0) {
680 mono_profiler_load (argv [i] + 10);
681 } else if (strcmp (argv [i], "--compile") == 0) {
684 } else if (strncmp (argv [i], "--graph=", 8) == 0) {
685 mono_graph_options = mono_parse_graph_options (argv [i] + 8);
688 } else if (strcmp (argv [i], "--graph") == 0) {
690 mono_graph_options = MONO_GRAPH_CFG;
692 } else if (strcmp (argv [i], "--debug") == 0) {
693 enable_debugging = TRUE;
695 fprintf (stderr, "Unknown command line option: '%s'\n", argv [i]);
705 if (mono_compile_aot || action == DO_EXEC) {
706 g_set_prgname (argv[i]);
709 mono_set_defaults (mini_verbose, opt);
710 domain = mini_init (argv [i]);
714 if (mini_regression_list (mini_verbose, argc -i, argv + i)) {
715 g_print ("Regression ERRORS!\n");
716 mini_cleanup (domain);
719 mini_cleanup (domain);
722 if (argc - i != 1 || mname == NULL) {
723 g_print ("Usage: mini --ncompile num --compile method assembly\n");
724 mini_cleanup (domain);
732 mini_cleanup (domain);
738 if (argc - i != 1 || mname == NULL) {
740 mini_cleanup (domain);
748 mini_cleanup (domain);
755 if (enable_debugging)
756 mono_debug_init (domain, MONO_DEBUG_FORMAT_MONO);
758 assembly = mono_assembly_open (aname, NULL);
760 fprintf (stderr, "cannot open assembly %s\n", aname);
761 mini_cleanup (domain);
765 if (trace_options != NULL){
766 mono_jit_trace_calls = mono_trace_parse_options (assembly, trace_options);
767 if (mono_jit_trace_calls == NULL)
771 if (enable_debugging)
772 mono_debug_init_2 (assembly);
774 if (mono_compile_aot || action == DO_EXEC) {
777 mono_config_parse (config_file);
778 //mono_set_rootdir ();
780 error = mono_check_corlib_version ();
782 fprintf (stderr, "Corlib not in sync with this runtime: %s\n", error);
783 fprintf (stderr, "Download a newer corlib or a newer runtime at http://www.go-mono.com/daily.\n");
787 main_args.domain = domain;
788 main_args.file = aname;
789 main_args.argc = argc - i;
790 main_args.argv = argv + i;
791 main_args.opts = opt;
793 mono_runtime_exec_managed_code (domain, main_thread_handler, &main_args);
794 mini_cleanup (domain);
796 /* Look up return value from System.Environment.ExitCode */
797 i = mono_environment_exitcode_get ();
799 } else if (action == DO_COMPILE) {
800 compile_all_methods (assembly, mini_verbose);
801 mini_cleanup (domain);
804 desc = mono_method_desc_new (mname, 0);
806 g_print ("Invalid method name %s\n", mname);
807 mini_cleanup (domain);
810 method = mono_method_desc_search_in_image (desc, assembly->image);
812 g_print ("Cannot find method %s\n", mname);
813 mini_cleanup (domain);
817 if (action == DO_DRAW) {
820 switch (mono_graph_options) {
821 case MONO_GRAPH_DTREE:
823 opt |= MONO_OPT_LOOP;
825 case MONO_GRAPH_CFG_CODE:
828 case MONO_GRAPH_CFG_SSA:
831 case MONO_GRAPH_CFG_OPTCODE:
838 cfg = mini_method_compile (method, opt, mono_root_domain, FALSE, part);
839 if ((mono_graph_options & MONO_GRAPH_CFG_SSA) && !(cfg->comp_done & MONO_COMP_SSA)) {
840 g_warning ("no SSA info available (use -O=deadce)");
843 mono_draw_graph (cfg, mono_graph_options);
844 mono_destroy_compile (cfg);
846 } else if (action == DO_BENCH) {
849 double no_opt_time = 0.0;
850 GTimer *timer = g_timer_new ();
851 fprintf (mini_stats_fd, "$stattitle = \'Compilations times for %s\';\n",
852 mono_method_full_name (method, TRUE));
853 fprintf (mini_stats_fd, "@data = (\n");
854 fprintf (mini_stats_fd, "[");
855 for (i = 0; i < G_N_ELEMENTS (opt_sets); i++) {
860 fprintf (mini_stats_fd, "\"%s\",", n);
862 fprintf (mini_stats_fd, "],\n[");
864 for (i = 0; i < G_N_ELEMENTS (opt_sets); i++) {
868 g_timer_start (timer);
869 for (j = 0; j < count; ++j) {
870 cfg = mini_method_compile (method, opt, mono_root_domain, FALSE, 0);
871 mono_destroy_compile (cfg);
873 g_timer_stop (timer);
874 elapsed = g_timer_elapsed (timer, NULL);
876 no_opt_time = elapsed;
877 fprintf (mini_stats_fd, "%f, ", elapsed);
879 fprintf (mini_stats_fd, "]");
880 if (no_opt_time > 0.0) {
881 fprintf (mini_stats_fd, ", \n[");
882 for (i = 0; i < G_N_ELEMENTS (opt_sets); i++)
883 fprintf (mini_stats_fd, "%f,", no_opt_time);
884 fprintf (mini_stats_fd, "]");
886 fprintf (mini_stats_fd, ");\n");
888 for (i = 0; i < count; ++i) {
889 if ((method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL) ||
890 (method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL))
891 method = mono_marshal_get_native_wrapper (method);
893 cfg = mini_method_compile (method, opt, mono_root_domain, FALSE, 0);
894 mono_destroy_compile (cfg);
898 cfg = mini_method_compile (method, opt, mono_root_domain, FALSE, 0);
899 mono_destroy_compile (cfg);
902 mini_cleanup (domain);
907 mono_jit_init (const char *file)
909 return mini_init (file);
913 mono_jit_cleanup (MonoDomain *domain)
915 mini_cleanup (domain);