X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fssa.c;h=b4dc2bf65d4e55b4d5df07fb3649668f7b9cfc88;hb=HEAD;hp=cb100267ef706a6c3608f7b09e12f5dcb92e1cfb;hpb=1639e26a6b22a59d0bfb8ad564530eeff593e4a3;p=mono.git diff --git a/mono/mini/ssa.c b/mono/mini/ssa.c index cb100267ef7..b4dc2bf65d4 100644 --- a/mono/mini/ssa.c +++ b/mono/mini/ssa.c @@ -1,5 +1,6 @@ -/* - * ssa.c: Static single assign form support for the JIT compiler. +/** + * \file + * Static single assign form support for the JIT compiler. * * Author: * Dietmar Maurer (dietmar@ximian.com) @@ -13,6 +14,7 @@ #include #include #include +#include #ifndef DISABLE_JIT @@ -158,9 +160,8 @@ typedef struct { /** * mono_ssa_rename_vars: - * - * Implement renaming of SSA variables. Also compute def-use information in parallel. - * @stack_history points to an area of memory which can be used for storing changes + * Implement renaming of SSA variables. Also compute def-use information in parallel. + * \p stack_history points to an area of memory which can be used for storing changes * made to the stack, so they can be reverted later. */ static void @@ -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 */