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 ( \
93 parse_optimizations (const char* p)
95 /* the default value */
96 guint32 opt = DEFAULT_OPTIMIZATIONS;
101 /* call out to cpu detection code here that sets the defaults ... */
102 opt |= mono_arch_cpu_optimizazions (&exclude);
114 for (i = 0; i < G_N_ELEMENTS (opt_names); ++i) {
115 n = opt_names [i].name;
117 if (strncmp (p, n, len) == 0) {
126 } else if (*p == '=') {
128 if (opt_names [i].func)
129 opt_names [i].func (p);
130 while (*p && *p++ != ',');
137 if (i == G_N_ELEMENTS (opt_names)) {
138 if (strncmp (p, "all", 3) == 0) {
142 opt = ~(MONO_OPT_SHARED | MONO_OPT_PRECOMP | exclude);
147 fprintf (stderr, "Invalid optimization name `%s'\n", p);
158 MonoGraphOptions value;
161 static const GraphName
163 {"cfg", "Control Flow Graph (CFG)" , MONO_GRAPH_CFG},
164 {"dtree", "Dominator Tree", MONO_GRAPH_DTREE},
165 {"code", "CFG showing code", MONO_GRAPH_CFG_CODE},
166 {"ssa", "CFG showing code after SSA translation", MONO_GRAPH_CFG_SSA},
167 {"optcode", "CFG showing code after IR optimizations", MONO_GRAPH_CFG_OPTCODE}
170 static MonoGraphOptions
171 mono_parse_graph_options (const char* p)
176 for (i = 0; i < G_N_ELEMENTS (graph_names); ++i) {
177 n = graph_names [i].name;
179 if (strncmp (p, n, len) == 0)
180 return graph_names [i].value;
183 fprintf (stderr, "Invalid graph name provided: %s\n", p);
188 mono_parse_default_optimizations (const char* p)
192 opt = parse_optimizations (p);
197 opt_descr (guint32 flags) {
198 GString *str = g_string_new ("");
202 for (i = 0; i < G_N_ELEMENTS (opt_names); ++i) {
203 if (flags & (1 << i)) {
205 g_string_append_c (str, ',');
206 g_string_append (str, opt_names [i].name);
210 return g_string_free (str, FALSE);
220 MONO_OPT_BRANCH | MONO_OPT_PEEPHOLE | MONO_OPT_INTRINS,
221 MONO_OPT_BRANCH | MONO_OPT_PEEPHOLE | MONO_OPT_LINEARS,
222 MONO_OPT_BRANCH | MONO_OPT_PEEPHOLE | MONO_OPT_LINEARS | MONO_OPT_COPYPROP,
223 MONO_OPT_BRANCH | MONO_OPT_PEEPHOLE | MONO_OPT_LINEARS | MONO_OPT_CFOLD,
224 MONO_OPT_BRANCH | MONO_OPT_PEEPHOLE | MONO_OPT_LINEARS | MONO_OPT_COPYPROP | MONO_OPT_CONSPROP | MONO_OPT_DEADCE,
225 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
228 typedef int (*TestMethod) (void);
232 domain_dump_native_code (MonoDomain *domain) {
233 // need to poke into the domain, move to metadata/domain.c
234 // need to empty jit_info_table and code_mp
239 mini_regression (MonoImage *image, int verbose, int *total_run) {
240 guint32 i, opt, opt_flags;
244 int result, expected, failed, cfailed, run, code_size, total;
246 GTimer *timer = g_timer_new ();
249 fprintf (mini_stats_fd, "$stattitle = \'Mono Benchmark Results (various optimizations)\';\n");
251 fprintf (mini_stats_fd, "$graph->set_legend(qw(");
252 for (opt = 0; opt < G_N_ELEMENTS (opt_sets); opt++) {
253 opt_flags = opt_sets [opt];
254 n = opt_descr (opt_flags);
258 fprintf (mini_stats_fd, " ");
259 fprintf (mini_stats_fd, "%s", n);
263 fprintf (mini_stats_fd, "));\n");
265 fprintf (mini_stats_fd, "@data = (\n");
266 fprintf (mini_stats_fd, "[");
269 /* load the metadata */
270 for (i = 0; i < image->tables [MONO_TABLE_METHOD].rows; ++i) {
271 method = mono_get_method (image, MONO_TOKEN_METHOD_DEF | (i + 1), NULL);
272 mono_class_init (method->klass);
274 if (!strncmp (method->name, "test_", 5) && mini_stats_fd) {
275 fprintf (mini_stats_fd, "\"%s\",", method->name);
279 fprintf (mini_stats_fd, "],\n");
284 for (opt = 0; opt < G_N_ELEMENTS (opt_sets); ++opt) {
285 double elapsed, comp_time, start_time;
288 opt_flags = opt_sets [opt];
289 mono_set_defaults (verbose, opt_flags);
290 n = opt_descr (opt_flags);
291 g_print ("Test run: image=%s, opts=%s\n", image->name, n);
293 cfailed = failed = run = code_size = 0;
294 comp_time = elapsed = 0.0;
296 /* fixme: ugly hack - delete all previously compiled methods */
297 for (i = 0; i < image->tables [MONO_TABLE_METHOD].rows; ++i) {
298 method = mono_get_method (image, MONO_TOKEN_METHOD_DEF | (i + 1), NULL);
302 g_timer_start (timer);
304 fprintf (mini_stats_fd, "[");
305 for (i = 0; i < image->tables [MONO_TABLE_METHOD].rows; ++i) {
306 method = mono_get_method (image, MONO_TOKEN_METHOD_DEF | (i + 1), NULL);
307 if (strncmp (method->name, "test_", 5) == 0) {
308 expected = atoi (method->name + 5);
310 start_time = g_timer_elapsed (timer, NULL);
311 comp_time -= start_time;
312 cfg = mini_method_compile (method, opt_flags, mono_root_domain, TRUE, 0);
313 comp_time += g_timer_elapsed (timer, NULL);
316 g_print ("Running '%s' ...\n", method->name);
317 #ifdef MONO_USE_AOT_COMPILER
318 if ((jinfo = mono_aot_get_method (mono_root_domain, method)))
319 func = jinfo->code_start;
322 func = (TestMethod)cfg->native_code;
324 if (result != expected) {
327 g_print ("Test '%s' failed result (got %d, expected %d).\n", method->name, result, expected);
329 code_size += cfg->code_len;
330 mono_destroy_compile (cfg);
335 g_print ("Test '%s' failed compilation.\n", method->name);
338 fprintf (mini_stats_fd, "%f, ",
339 g_timer_elapsed (timer, NULL) - start_time);
343 fprintf (mini_stats_fd, "],\n");
344 g_timer_stop (timer);
345 elapsed = g_timer_elapsed (timer, NULL);
346 g_print ("Results: total tests: %d, failed: %d, cfailed: %d (pass: %.2f%%)\n",
347 run, failed, cfailed, 100.0*(run-failed-cfailed)/run);
348 g_print ("Elapsed time: %f secs (%f, %f), Code size: %d\n\n", elapsed,
349 elapsed - comp_time, comp_time, code_size);
350 total += failed + cfailed;
355 fprintf (mini_stats_fd, ");\n");
356 fflush (mini_stats_fd);
359 g_timer_destroy (timer);
364 mini_regression_list (int verbose, int count, char *images [])
366 int i, total, total_run, run;
369 total_run = total = 0;
370 for (i = 0; i < count; ++i) {
371 ass = mono_assembly_open (images [i], NULL);
373 g_warning ("failed to load assembly: %s", images [i]);
376 total += mini_regression (ass->image, verbose, &run);
378 mono_assembly_close (ass);
380 g_print ("Overall results: tests: %d, failed: %d, opt combinations: %d (pass: %.2f%%)\n",
381 total_run, total, G_N_ELEMENTS (opt_sets), 100.0*(total_run-total)/total_run);
393 typedef struct CompileAllThreadArgs {
396 } CompileAllThreadArgs;
399 compile_all_methods_thread_main (CompileAllThreadArgs *args)
401 MonoAssembly *ass = args->ass;
402 int verbose = args->verbose;
403 MonoImage *image = ass->image;
407 for (i = 0; i < image->tables [MONO_TABLE_METHOD].rows; ++i) {
408 method = mono_get_method (image, MONO_TOKEN_METHOD_DEF | (i + 1), NULL);
409 if (method->flags & METHOD_ATTRIBUTE_ABSTRACT)
411 if (method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL)
416 char * desc = mono_method_full_name (method, TRUE);
417 g_print ("Compiling %d %s\n", count, desc);
420 mono_compile_method (method);
426 compile_all_methods (MonoAssembly *ass, int verbose)
428 CompileAllThreadArgs args;
431 args.verbose = verbose;
434 * Need to create a mono thread since compilation might trigger
435 * running of managed code.
437 mono_thread_create (mono_domain_get (), compile_all_methods_thread_main, &args);
439 mono_thread_manage ();
444 * @assembly: reference to an assembly
445 * @argc: argument count
446 * @argv: argument vector
448 * Start execution of a program.
451 mono_jit_exec (MonoDomain *domain, MonoAssembly *assembly, int argc, char *argv[])
453 MonoImage *image = assembly->image;
455 guint32 entry = mono_image_get_entry_point (image);
458 g_print ("Assembly '%s' doesn't have an entry point.\n", image->name);
459 /* FIXME: remove this silly requirement. */
460 mono_environment_exitcode_set (1);
464 method = mono_get_method (image, entry, NULL);
466 return mono_runtime_run_main (method, argc, argv, NULL);
478 static void main_thread_handler (gpointer user_data)
480 MainThreadArgs *main_args = user_data;
481 MonoAssembly *assembly;
483 assembly = mono_domain_assembly_open (main_args->domain, main_args->file);
485 fprintf (stderr, "Can not open image %s\n", main_args->file);
489 if (mono_compile_aot) {
490 int res = mono_compile_assembly (assembly, main_args->opts);
491 printf ("AOT RESULT %d\n", res);
494 * This must be done in a thread managed by mono since it can invoke
497 if (main_args->opts & MONO_OPT_PRECOMP)
498 mono_precompile_assemblies ();
500 mono_jit_exec (main_args->domain, assembly, main_args->argc, main_args->argv);
510 "Usage is: mono [options] assembly\n\n"
511 "Runtime and JIT debugging:\n"
512 " --compile METHOD Just compile METHOD in assembly\n"
513 " --ncompile N Number of times to compile METHOD (default: 1)\n"
514 " --regression Runs the regression test contained in the assembly\n"
515 " --print-vtable Print the vtable of all used classes\n"
516 " --trace[=EXPR] Enable tracing, use --help-trace for details\n"
517 " --compile-all Compiles all the methods in the assembly\n"
518 " --breakonex Inserts a breakpoint on exceptions\n"
519 " --break METHOD Inserts a breakpoint at METHOD entry\n"
520 " --debug Enable debugging support\n"
521 " --stats Print statistics about the JIT operations\n"
524 " --statfile FILE Sets the stat file to FILE\n"
525 " --aot Compiles the assembly to native code\n"
526 " --profile[=profiler] Runs in profiling mode with the specified profiler module\n"
527 " --graph[=TYPE] METHOD Draws a graph of the specified method:\n");
529 for (i = 0; i < G_N_ELEMENTS (graph_names); ++i) {
530 fprintf (stdout, " %-10s %s\n", graph_names [i].name, graph_names [i].desc);
536 " --config FILE Loads FILE as the Mono config\n"
537 " --verbose, -v Increases the verbosity level\n"
538 " --help, -h Show usage information\n"
539 " --version, -V Show version information\n"
540 " --optimize=OPT Turns on a specific optimization:\n");
542 for (i = 0; i < G_N_ELEMENTS (opt_names); ++i)
543 fprintf (stdout, " %-10s %s\n", opt_names [i].name, opt_names [i].desc);
547 mini_trace_usage (void)
551 " --trace[=EXPR] Trace every call, optional EXPR controls the scope\n"
553 "EXPR is composed of:\n"
554 " all All assemblies\n"
555 " none No assemblies\n"
556 " program Entry point assembly\n"
557 " assembly Specifies an assembly\n"
558 " M:Type:Method Specifies a method\n"
559 " N:Namespace Specifies a namespace\n"
560 " T:Type Specifies a type\n"
561 " +EXPR Includes expression\n"
562 " -EXPR Excludes expression\n");
565 static const char *info = ""
566 #ifdef HAVE_KW_THREAD
570 #endif /* HAVE_KW_THREAD */
572 #ifdef USE_INCLUDED_LIBGC
573 "\tGC: Included Boehm (with typed GC)\n"
575 #if HAVE_GC_GCJ_MALLOC
576 "\tGC: System Boehm (with typed GC)\n"
578 "\tGC: System Boehm (no typed GC available)\n"
583 #endif /* HAVE_BOEHM_GC */
584 #ifdef MONO_ARCH_SIGSEGV_ON_ALTSTACK
585 "\tSIGSEGV : altstack\n"
587 "\tSIGSEGV : normal\n"
590 "\tGlobalization: ICU\n"
592 "\tGlobalization: none\n"
593 #endif /* HAVE_ICU */
597 mono_main (int argc, char* argv[])
599 MainThreadArgs main_args;
600 MonoAssembly *assembly;
601 MonoMethodDesc *desc;
605 const char* aname, *mname = NULL;
606 char *config_file = NULL;
608 int enable_debugging = FALSE;
609 guint32 opt, action = DO_EXEC;
610 MonoGraphOptions mono_graph_options = 0;
611 int mini_verbose = 0;
612 char *trace_options = NULL;
614 setlocale (LC_ALL, "");
615 g_log_set_always_fatal (G_LOG_LEVEL_ERROR);
616 g_log_set_fatal_mask (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR);
618 opt = parse_optimizations (NULL);
620 for (i = 1; i < argc; ++i) {
621 if (argv [i] [0] != '-')
623 if (strcmp (argv [i], "--regression") == 0) {
624 action = DO_REGRESSION;
625 } else if (strcmp (argv [i], "--verbose") == 0 || strcmp (argv [i], "-v") == 0) {
627 } else if (strcmp (argv [i], "--version") == 0 || strcmp (argv [i], "-V") == 0) {
628 g_print ("Mono JIT compiler version %s, (C) 2002-2004 Novell, Inc and Contributors. www.go-mono.com\n", VERSION);
631 const guchar *cerror;
632 const guchar *clibpath;
634 cerror = mono_check_corlib_version ();
635 clibpath = mono_defaults.corlib? mono_defaults.corlib->name: "unknown";
637 g_print ("The currently installed mscorlib doesn't match this runtime version.\n");
638 g_print ("The error is: %s\n", cerror);
639 g_print ("mscorlib.dll loaded at: %s\n", clibpath);
644 } else if (strcmp (argv [i], "--help") == 0 || strcmp (argv [i], "-h") == 0) {
647 } else if (strcmp (argv [i], "--help-trace") == 0){
650 } else if (strncmp (argv [i], "--statfile", 10) == 0) {
651 mini_stats_fd = fopen (argv [++i], "w+");
652 } else if (strncmp (argv [i], "--optimize=", 11) == 0) {
653 opt = parse_optimizations (argv [i] + 11);
654 } else if (strncmp (argv [i], "-O=", 3) == 0) {
655 opt = parse_optimizations (argv [i] + 3);
656 } else if (strcmp (argv [i], "--config") == 0) {
657 config_file = argv [++i];
658 } else if (strcmp (argv [i], "--ncompile") == 0) {
659 count = atoi (argv [++i]);
661 } else if (strcmp (argv [i], "--trace") == 0) {
663 } else if (strncmp (argv [i], "--trace=", 8) == 0) {
664 trace_options = &argv [i][8];
665 } else if (strcmp (argv [i], "--breakonex") == 0) {
666 mono_break_on_exc = TRUE;
667 } else if (strcmp (argv [i], "--break") == 0) {
668 if (!mono_debugger_insert_breakpoint (argv [++i], FALSE))
669 g_error ("Invalid method name '%s'", argv [i]);
670 } else if (strcmp (argv [i], "--print-vtable") == 0) {
671 mono_print_vtable = TRUE;
672 } else if (strcmp (argv [i], "--stats") == 0) {
673 mono_jit_stats.enabled = TRUE;
674 } else if (strcmp (argv [i], "--aot") == 0) {
675 mono_compile_aot = TRUE;
676 } else if (strcmp (argv [i], "--compile-all") == 0) {
678 } else if (strcmp (argv [i], "--profile") == 0) {
679 mono_profiler_load (NULL);
680 } else if (strncmp (argv [i], "--profile=", 10) == 0) {
681 mono_profiler_load (argv [i] + 10);
682 } else if (strcmp (argv [i], "--compile") == 0) {
685 } else if (strncmp (argv [i], "--graph=", 8) == 0) {
686 mono_graph_options = mono_parse_graph_options (argv [i] + 8);
689 } else if (strcmp (argv [i], "--graph") == 0) {
691 mono_graph_options = MONO_GRAPH_CFG;
693 } else if (strcmp (argv [i], "--debug") == 0) {
694 enable_debugging = TRUE;
696 fprintf (stderr, "Unknown command line option: '%s'\n", argv [i]);
706 if (mono_compile_aot || action == DO_EXEC) {
707 g_set_prgname (argv[i]);
710 mono_set_defaults (mini_verbose, opt);
711 domain = mini_init (argv [i]);
715 if (mini_regression_list (mini_verbose, argc -i, argv + i)) {
716 g_print ("Regression ERRORS!\n");
717 mini_cleanup (domain);
720 mini_cleanup (domain);
723 if (argc - i != 1 || mname == NULL) {
724 g_print ("Usage: mini --ncompile num --compile method assembly\n");
725 mini_cleanup (domain);
733 mini_cleanup (domain);
739 if (argc - i != 1 || mname == NULL) {
741 mini_cleanup (domain);
749 mini_cleanup (domain);
756 if (enable_debugging)
757 mono_debug_init (domain, MONO_DEBUG_FORMAT_MONO);
759 assembly = mono_assembly_open (aname, NULL);
761 fprintf (stderr, "cannot open assembly %s\n", aname);
762 mini_cleanup (domain);
766 if (trace_options != NULL){
767 mono_jit_trace_calls = mono_trace_parse_options (assembly, trace_options);
768 if (mono_jit_trace_calls == NULL)
772 if (enable_debugging)
773 mono_debug_init_2 (assembly);
775 if (mono_compile_aot || action == DO_EXEC) {
778 mono_config_parse (config_file);
779 //mono_set_rootdir ();
781 error = mono_check_corlib_version ();
783 fprintf (stderr, "Corlib not in sync with this runtime: %s\n", error);
784 fprintf (stderr, "Download a newer corlib or a newer runtime at http://www.go-mono.com/daily.\n");
788 main_args.domain = domain;
789 main_args.file = aname;
790 main_args.argc = argc - i;
791 main_args.argv = argv + i;
792 main_args.opts = opt;
794 mono_runtime_exec_managed_code (domain, main_thread_handler, &main_args);
795 mini_cleanup (domain);
797 /* Look up return value from System.Environment.ExitCode */
798 i = mono_environment_exitcode_get ();
800 } else if (action == DO_COMPILE) {
801 compile_all_methods (assembly, mini_verbose);
802 mini_cleanup (domain);
805 desc = mono_method_desc_new (mname, 0);
807 g_print ("Invalid method name %s\n", mname);
808 mini_cleanup (domain);
811 method = mono_method_desc_search_in_image (desc, assembly->image);
813 g_print ("Cannot find method %s\n", mname);
814 mini_cleanup (domain);
818 if (action == DO_DRAW) {
821 switch (mono_graph_options) {
822 case MONO_GRAPH_DTREE:
824 opt |= MONO_OPT_LOOP;
826 case MONO_GRAPH_CFG_CODE:
829 case MONO_GRAPH_CFG_SSA:
832 case MONO_GRAPH_CFG_OPTCODE:
839 cfg = mini_method_compile (method, opt, mono_root_domain, FALSE, part);
840 if ((mono_graph_options & MONO_GRAPH_CFG_SSA) && !(cfg->comp_done & MONO_COMP_SSA)) {
841 g_warning ("no SSA info available (use -O=deadce)");
844 mono_draw_graph (cfg, mono_graph_options);
845 mono_destroy_compile (cfg);
847 } else if (action == DO_BENCH) {
850 double no_opt_time = 0.0;
851 GTimer *timer = g_timer_new ();
852 fprintf (mini_stats_fd, "$stattitle = \'Compilations times for %s\';\n",
853 mono_method_full_name (method, TRUE));
854 fprintf (mini_stats_fd, "@data = (\n");
855 fprintf (mini_stats_fd, "[");
856 for (i = 0; i < G_N_ELEMENTS (opt_sets); i++) {
861 fprintf (mini_stats_fd, "\"%s\",", n);
863 fprintf (mini_stats_fd, "],\n[");
865 for (i = 0; i < G_N_ELEMENTS (opt_sets); i++) {
869 g_timer_start (timer);
870 for (j = 0; j < count; ++j) {
871 cfg = mini_method_compile (method, opt, mono_root_domain, FALSE, 0);
872 mono_destroy_compile (cfg);
874 g_timer_stop (timer);
875 elapsed = g_timer_elapsed (timer, NULL);
877 no_opt_time = elapsed;
878 fprintf (mini_stats_fd, "%f, ", elapsed);
880 fprintf (mini_stats_fd, "]");
881 if (no_opt_time > 0.0) {
882 fprintf (mini_stats_fd, ", \n[");
883 for (i = 0; i < G_N_ELEMENTS (opt_sets); i++)
884 fprintf (mini_stats_fd, "%f,", no_opt_time);
885 fprintf (mini_stats_fd, "]");
887 fprintf (mini_stats_fd, ");\n");
889 for (i = 0; i < count; ++i) {
890 if ((method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL) ||
891 (method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL))
892 method = mono_marshal_get_native_wrapper (method);
894 cfg = mini_method_compile (method, opt, mono_root_domain, FALSE, 0);
895 mono_destroy_compile (cfg);
899 cfg = mini_method_compile (method, opt, mono_root_domain, FALSE, 0);
900 mono_destroy_compile (cfg);
903 mini_cleanup (domain);
908 mono_jit_init (const char *file)
910 return mini_init (file);
914 mono_jit_cleanup (MonoDomain *domain)
916 mini_cleanup (domain);