X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fssa.c;h=b4dc2bf65d4e55b4d5df07fb3649668f7b9cfc88;hb=19046502886ad7697b4c6642337441a7fdafd28a;hp=d70788c6afb39ce430fcde647838b3ca7689e66b;hpb=cfeadc51e89f1af952323bb2779066d6813a54ec;p=mono.git diff --git a/mono/mini/ssa.c b/mono/mini/ssa.c index d70788c6afb..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) @@ -159,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 @@ -238,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 ++;