Build mono runtime under none desktop Windows API family, adjustments and cleanup.
[mono.git] / mono / mini / linear-scan.c
index 6ee1e0ff7929ef8118525e4280d15b911eb029c9..faadc048ec98457f870f771ca0e919c1f03b7b0d 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "mini.h"
 #include <mono/metadata/debug-helpers.h>
+#include <mono/utils/mono-compiler.h>
 
 #ifndef DISABLE_JIT
 
@@ -81,9 +82,11 @@ mono_linear_scan (MonoCompile *cfg, GList *vars, GList *regs, regmask_t *used_ma
        gboolean cost_driven;
 
        if (!cfg->disable_reuse_registers && vars && (((MonoMethodVar*)vars->data)->interval != NULL)) {
-               mono_linear_scan2 (cfg, vars, regs, used_mask);
-               return;
-       }
+               mono_linear_scan2 (cfg, vars, regs, used_mask);
+               g_list_free (regs);
+               g_list_free (vars);
+               return;
+       }
 
        cost_driven = TRUE;
 
@@ -510,4 +513,8 @@ mono_linear_scan2 (MonoCompile *cfg, GList *vars, GList *regs, regmask_t *used_m
        g_list_free (inactive);
 }
 
-#endif /* #ifndef DISABLE_JIT */
+#else /* !DISABLE_JIT */
+
+MONO_EMPTY_SOURCE_FILE (linear_scan);
+
+#endif /* !DISABLE_JIT */