Merge pull request #3591 from directhex/mono_libdir_fallback
[mono.git] / mono / mini / aot-runtime.c
index 9a4d566c754d088e31d81b3679ad2617c3fd6532..0da4ad6168d75584271a6ed781aac682d494c79d 100644 (file)
@@ -4025,32 +4025,6 @@ find_aot_method_in_amodule (MonoAotModule *amodule, MonoMethod *method, guint32
                        break;
                }
 
-               /*
-                * Special case: wrappers of shared generic methods.
-                * This is needed because of the way mini_get_shared_method () works,
-                * we could end up with multiple copies of the same wrapper.
-                */
-               if (m && method->wrapper_type && method->wrapper_type == m->wrapper_type &&
-                       method->wrapper_type == MONO_WRAPPER_SYNCHRONIZED) {
-                       MonoMethod *w1 = mono_marshal_method_from_wrapper (method);
-                       MonoMethod *w2 = mono_marshal_method_from_wrapper (m);
-
-                       if ((w1 == w2) || (w1->is_inflated && ((MonoMethodInflated *)w1)->declaring == w2)) {
-                               index = value;
-                               break;
-                       }
-               }
-               if (m && method->wrapper_type && method->wrapper_type == m->wrapper_type &&
-                       method->wrapper_type == MONO_WRAPPER_DELEGATE_INVOKE) {
-                       WrapperInfo *info1 = mono_marshal_get_wrapper_info (method);
-                       WrapperInfo *info2 = mono_marshal_get_wrapper_info (m);
-
-                       if (info1 && info2 && info1->subtype == info2->subtype && info1->d.delegate_invoke.method == info2->d.delegate_invoke.method) {
-                               index = value;
-                               break;
-                       }
-               }
-
                /* Methods decoded needlessly */
                if (m) {
                        //printf ("%d %s %s %p\n", n_extra_decodes, mono_method_full_name (method, TRUE), mono_method_full_name (m, TRUE), orig_p);