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
merged 2 commits into from Jan 19, 2018

Conversation

MichalStrehovsky
Copy link
Member

@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.

@MichalStrehovsky
Copy link
Member Author

MichalStrehovsky commented Jan 19, 2018

@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

@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
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
Labels
None yet
Projects
None yet
2 participants