[generics.cs] enable one more test for interpreter
[mono.git] / mono / mini / ssa.c
index cb100267ef706a6c3608f7b09e12f5dcb92e1cfb..d0b34b2781d177be5a558e56491edf369130ba84 100644 (file)
@@ -13,6 +13,7 @@
 #include <mono/metadata/debug-helpers.h>
 #include <mono/metadata/mempool.h>
 #include <mono/metadata/mempool-internals.h>
+#include <mono/utils/mono-compiler.h>
 
 #ifndef DISABLE_JIT
 
@@ -237,8 +238,13 @@ mono_ssa_rename_vars (MonoCompile *cfg, int max_vars, MonoBasicBlock *bb, gboole
                                if (var->opcode == OP_ARG)
                                        originals_used [idx] = TRUE;
 
-                               /* FIXME: */
-                               g_assert (stack_history_len < stack_history_size);
+                               if (stack_history_len + 128 > stack_history_size) {
+                                       stack_history_size += 1024;
+                                       RenameInfo *new_history = mono_mempool_alloc (cfg->mempool, sizeof (RenameInfo) * stack_history_size);
+                                       memcpy (new_history, stack_history, stack_history_len * sizeof (RenameInfo));
+                                       stack_history = new_history;
+                               }
+
                                stack_history [stack_history_len].var = stack [idx];
                                stack_history [stack_history_len].idx = idx;
                                stack_history_len ++;
@@ -1515,4 +1521,8 @@ mono_ssa_loop_invariant_code_motion (MonoCompile *cfg)
        }
 }
 
-#endif /* DISABLE_JIT */
+#else /* !DISABLE_JIT */
+
+MONO_EMPTY_SOURCE_FILE (ssa);
+
+#endif /* !DISABLE_JIT */