Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

merged 2 commits into from Jan 19, 2018


Copy link

@MichalStrehovsky MichalStrehovsky commented Jan 19, 2018

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.

Copy link
Member Author

MichalStrehovsky commented Jan 19, 2018

@jkotas PTAL

Cc @sergiy-k

@@ -5397,7 +5397,8 @@ void CEEInfo::getCallInfo(
directCall = true;
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

@jkotas jkotas Jan 19, 2018

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 approved these changes Jan 19, 2018
@jkotas jkotas merged commit e83991c into dotnet:master Jan 19, 2018
14 of 16 checks passed
@MichalStrehovsky MichalStrehovsky deleted the fix15827 branch Jan 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
2 participants