Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Stop treating all calls to instance interface methods as callvirt #15925

Merged
merged 2 commits into from
Jan 19, 2018

Conversation

MichalStrehovsky
Copy link
Member

Fixes #15827.

I made the test check for DefaultImplementationsOfInterfaces RuntimeFeature so that we don't need to go and disable it in the release branches.

@MichalStrehovsky
Copy link
Member Author

@jkotas PTAL

Cc @sergiy-k

@@ -5397,7 +5397,8 @@ void CEEInfo::getCallInfo(
directCall = true;
}
else
if (pTargetMD->GetMethodTable()->IsInterface() && pTargetMD->IsVirtual())
// Backwards compat: calls to abstract interface methods are treated as callvirt
if (pTargetMD->IsAbstract() && pTargetMD->GetMethodTable()->IsInterface())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IsAbstract is relatively expensive in CoreCLR. Could you please keep the IsInterface check first?

@jkotas jkotas merged commit e83991c into dotnet:master Jan 19, 2018
@MichalStrehovsky MichalStrehovsky deleted the fix15827 branch January 19, 2018 21:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants