[interp] let JIT handle native2managed wrappers, but hack around dynamic methods
authorBernhard Urban <bernhard.urban@xamarin.com>
Tue, 25 Apr 2017 22:13:37 +0000 (00:13 +0200)
committerBernhard Urban <bernhard.urban@xamarin.com>
Fri, 28 Apr 2017 18:52:06 +0000 (20:52 +0200)
mono/mini/interp/interp.c
mono/tests/Makefile.am

index 72240de860c3f1f85267b6f9b9fc5a1eb2a66188..619c3a659e6c05277b7f9fb14f3524034ac32bb7 100644 (file)
@@ -1903,9 +1903,13 @@ mono_interp_create_method_pointer (MonoMethod *method, MonoError *error)
        MonoMethod *wrapper;
        RuntimeMethod *rmethod;
 
-       if (method->wrapper_type && method->wrapper_type != MONO_WRAPPER_RUNTIME_INVOKE)
+       if (method->wrapper_type && method->wrapper_type == MONO_WRAPPER_NATIVE_TO_MANAGED)
                return NULL;
 
+       /* HACK: method_ptr of delegate should point to a runtime method*/
+       if (method->wrapper_type && method->wrapper_type == MONO_WRAPPER_DYNAMIC_METHOD)
+               return mono_interp_get_runtime_method (mono_domain_get (), method, error);
+
        rmethod = mono_interp_get_runtime_method (mono_domain_get (), method, error);
        if (rmethod->jit_entry)
                return rmethod->jit_entry;
index abdbce8bd9d002dfed0fa40056d3adaf5507e3c1..275711ed37c8223845f6803bae9f1f61c1354f9d 100644 (file)
@@ -1046,8 +1046,6 @@ INTERP_DISABLED_TESTS = \
        call_missing_method.exe \
        calliGenericTest.exe \
        cominterop.exe \
-       constant-division.exe \
-       context-static.exe \
        cross-domain.exe \
        delegate-async-exit.exe \
        delegate-delegate-exit.exe \
@@ -1058,9 +1056,6 @@ INTERP_DISABLED_TESTS = \
        delegate5.exe \
        delegate8.exe \
        delegate9.exe \
-       dynamic-method-access.2.exe \
-       dynamic-method-finalize.2.exe \
-       dynamic-method-resurrection.exe \
        dynamic-method-stack-traces.exe \
        even-odd.exe \
        exception18.exe \