Simplify devirtualization in crossgen2 (#45744)
authorJan Kotas <jkotas@microsoft.com>
Tue, 8 Dec 2020 20:16:36 +0000 (12:16 -0800)
committerGitHub <noreply@github.com>
Tue, 8 Dec 2020 20:16:36 +0000 (12:16 -0800)
src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs

index 4433a9b..b310794 100644 (file)
@@ -984,11 +984,9 @@ namespace Internal.JitInterface
                 impl = getUnboxingThunk(impl);
             }
 
-            MethodDesc exactImpl = TypeSystemHelpers.FindMethodOnTypeWithMatchingTypicalMethod(objType, impl);
-
             info->devirtualizedMethod = ObjectToHandle(impl);
             info->requiresInstMethodTableArg = false;
-            info->exactContext = contextFromType(exactImpl.OwningType);
+            info->exactContext = contextFromType(impl.OwningType);
 
             return true;
         }