Skip to content
This repository was 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
jkotas merged 2 commits into
dotnet:masterfrom
MichalStrehovsky:fix15827
Jan 19, 2018
Merged

Stop treating all calls to instance interface methods as callvirt#15925
jkotas merged 2 commits into
dotnet:masterfrom
MichalStrehovsky:fix15827

Conversation

@MichalStrehovsky

Copy link
Copy Markdown
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
Copy Markdown
Member Author

@jkotas PTAL

Cc @sergiy-k

Comment thread src/vm/jitinterface.cpp Outdated
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
Copy Markdown
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