Skip to content

Commit

Permalink
2009-04-29 Zoltan Varga <vargaz@gmail.com>
Browse files Browse the repository at this point in the history
	* method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.

svn path=/branches/mono-2-4/mono/; revision=133022
  • Loading branch information
vargaz committed Apr 29, 2009
1 parent 68fbdb1 commit f7a6b3c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions mono/mini/ChangeLog
@@ -1,5 +1,7 @@
2009-04-29 Zoltan Varga <vargaz@gmail.com>

* method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.

* mini.c (mini_method_compile): Use TARGET_<ARCH> defines instead of
__<arch>__ defines in the JIT code.

Expand Down
7 changes: 6 additions & 1 deletion mono/mini/method-to-ir.c
Expand Up @@ -4056,6 +4056,7 @@ inline_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig,
guint32 prev_cil_offset_to_bb_len;
MonoMethod *prev_current_method;
MonoGenericContext *prev_generic_context;
gboolean ret_var_set, prev_ret_var_set;

g_assert (cfg->exception_type == MONO_EXCEPTION_NONE);

Expand Down Expand Up @@ -4109,9 +4110,12 @@ inline_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig,
prev_cbb = cfg->cbb;
prev_current_method = cfg->current_method;
prev_generic_context = cfg->generic_context;
prev_ret_var_set = cfg->ret_var_set;

costs = mono_method_to_ir (cfg, cmethod, sbblock, ebblock, rvar, dont_inline, sp, real_offset, *ip == CEE_CALLVIRT);

ret_var_set = cfg->ret_var_set;

cfg->inlined_method = prev_inlined_method;
cfg->real_offset = prev_real_offset;
cfg->cbb_hash = prev_cbb_hash;
Expand All @@ -4123,6 +4127,7 @@ inline_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig,
cfg->arg_types = prev_arg_types;
cfg->current_method = prev_current_method;
cfg->generic_context = prev_generic_context;
cfg->ret_var_set = prev_ret_var_set;

if ((costs >= 0 && costs < 60) || inline_allways) {
if (cfg->verbose_level > 2)
Expand Down Expand Up @@ -4163,7 +4168,7 @@ inline_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig,
* If the inlined method contains only a throw, then the ret var is not
* set, so set it to a dummy value.
*/
if (!cfg->ret_var_set) {
if (!ret_var_set) {
static double r8_0 = 0.0;

switch (rvar->type) {
Expand Down

0 comments on commit f7a6b3c

Please sign in to comment.