X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fjit-icalls.c;h=f8a328375b90de9bdc0344ff7e26192e50b46dc0;hb=3fd54893bc792eee42164bfb605b418105a92f92;hp=8651aa25ec497c574a6d492e6ae6e9b324be8e14;hpb=cd12b913725cefd1cbfcd34bc3fb2815a0cb2291;p=mono.git diff --git a/mono/mini/jit-icalls.c b/mono/mini/jit-icalls.c index 8651aa25ec4..f8a328375b9 100644 --- a/mono/mini/jit-icalls.c +++ b/mono/mini/jit-icalls.c @@ -1630,6 +1630,9 @@ resolve_vcall (MonoVTable *vt, int slot, MonoMethod *imt_method, gpointer *out_a need_unbox_tramp = TRUE; } + if (m->iflags & METHOD_IMPL_ATTRIBUTE_SYNCHRONIZED) + m = mono_marshal_get_synchronized_wrapper (m); + // FIXME: This can throw exceptions addr = compiled_method = mono_compile_method_checked (m, error); mono_error_assert_ok (error); @@ -1751,9 +1754,11 @@ mono_resolve_generic_virtual_iface_call (MonoVTable *vt, int imt_slot, MonoMetho if (vt->klass->valuetype) need_unbox_tramp = TRUE; - // FIXME: This can throw exceptions + if (m->iflags & METHOD_IMPL_ATTRIBUTE_SYNCHRONIZED) + m = mono_marshal_get_synchronized_wrapper (m); + addr = compiled_method = mono_compile_method_checked (m, &error); - mono_error_assert_ok (&error); + mono_error_raise_exception (&error); g_assert (addr); addr = mini_add_method_wrappers_llvmonly (m, addr, FALSE, need_unbox_tramp, &arg); @@ -1816,12 +1821,16 @@ mono_llvmonly_init_delegate (MonoDelegate *del) * but we don't have a a structure which could own its memory. */ if (G_UNLIKELY (!ftndesc)) { - gpointer addr = mono_compile_method_checked (del->method, &error); + MonoMethod *m = del->method; + if (m->iflags & METHOD_IMPL_ATTRIBUTE_SYNCHRONIZED) + m = mono_marshal_get_synchronized_wrapper (m); + + gpointer addr = mono_compile_method_checked (m, &error); if (mono_error_set_pending_exception (&error)) return; - if (del->method->klass->valuetype && mono_method_signature (del->method)->hasthis) - addr = mono_aot_get_unbox_trampoline (del->method); + if (m->klass->valuetype && mono_method_signature (m)->hasthis) + addr = mono_aot_get_unbox_trampoline (m); gpointer arg = mini_get_delegate_arg (del->method, addr); @@ -1842,6 +1851,9 @@ mono_llvmonly_init_delegate_virtual (MonoDelegate *del, MonoObject *target, Mono method = mono_object_get_virtual_method (target, method); + if (method->iflags & METHOD_IMPL_ATTRIBUTE_SYNCHRONIZED) + method = mono_marshal_get_synchronized_wrapper (method); + del->method = method; del->method_ptr = mono_compile_method_checked (method, &error); if (mono_error_set_pending_exception (&error)) @@ -1912,3 +1924,8 @@ mono_throw_method_access (MonoMethod *callee, MonoMethod *caller) g_free (callee_name); g_free (caller_name); } + +void +mono_dummy_jit_icall (void) +{ +}