From 840ba6d0b454dcf2e2dc947454094a40761805ec Mon Sep 17 00:00:00 2001 From: monojenkins Date: Tue, 4 Feb 2020 13:53:44 -0500 Subject: [PATCH] [interp]Factor out common code. (#31653) Co-authored-by: Jay Krell --- src/mono/mono/mini/interp/interp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mono/mono/mini/interp/interp.c b/src/mono/mono/mini/interp/interp.c index e7b1f90..76e12b3 100644 --- a/src/mono/mono/mini/interp/interp.c +++ b/src/mono/mono/mini/interp/interp.c @@ -3802,11 +3802,12 @@ main_loop: /* Non-recursive call */ SAVE_INTERP_STATE (frame); + child_frame = alloc_frame (context, native_stack_addr, frame, imethod, sp, retval); + if (G_UNLIKELY (!imethod->transformed)) { MonoException *ex; gboolean tracing; - child_frame = alloc_frame (context, native_stack_addr, frame, imethod, sp, retval); method_entry (context, child_frame, &tracing, &ex); if (G_UNLIKELY (ex)) { frame = child_frame; @@ -3815,7 +3816,6 @@ main_loop: EXCEPTION_CHECKPOINT; } } else { - child_frame = alloc_frame (context, native_stack_addr, frame, imethod, sp, retval); alloc_stack_data (context, child_frame, imethod->alloca_size); #if DEBUG_INTERP debug_enter (child_frame, &tracing); @@ -3925,11 +3925,12 @@ main_loop: if (code_type == IMETHOD_CODE_INTERP) { SAVE_INTERP_STATE (frame); + child_frame = alloc_frame (context, &retval, frame, imethod, sp, retval); + if (G_UNLIKELY (!imethod->transformed)) { MonoException *ex; gboolean tracing; - child_frame = alloc_frame (context, &retval, frame, imethod, sp, retval); method_entry (context, child_frame, &tracing, &ex); if (G_UNLIKELY (ex)) { frame = child_frame; @@ -3938,7 +3939,6 @@ main_loop: EXCEPTION_CHECKPOINT; } } else { - child_frame = alloc_frame (context, &retval, frame, imethod, sp, retval); alloc_stack_data (context, child_frame, imethod->alloca_size); } @@ -4034,11 +4034,12 @@ main_loop: */ SAVE_INTERP_STATE (frame); + child_frame = alloc_frame (context, native_stack_addr, frame, imethod, sp, retval); + if (G_UNLIKELY (!imethod->transformed)) { MonoException *ex; gboolean tracing; - child_frame = alloc_frame (context, native_stack_addr, frame, imethod, sp, retval); method_entry (context, child_frame, &tracing, &ex); if (G_UNLIKELY (ex)) { frame = child_frame; @@ -4047,7 +4048,6 @@ main_loop: EXCEPTION_CHECKPOINT; } } else { - child_frame = alloc_frame (context, native_stack_addr, frame, imethod, sp, retval); alloc_stack_data (context, child_frame, imethod->alloca_size); #if DEBUG_INTERP debug_enter (child_frame, &tracing); -- 2.7.4