Add support for static default interface methods (#72661)
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>
Fri, 22 Jul 2022 21:32:44 +0000 (06:32 +0900)
committerGitHub <noreply@github.com>
Fri, 22 Jul 2022 21:32:44 +0000 (06:32 +0900)
commitfce65490da1d15c0f6db88c8e782dc247de47c8b
tree3c5a461ceac36733abd744194f145c8aa75e41e6
parent574fd3a95af7586e2f5800dcb4625df5ad422f87
Add support for static default interface methods (#72661)

We were only supporting default interface methods in the sense of non-abstract virtuals. We now also support overrides.

What's missing is support for diamond/reabstraction. I thin we need to make throwing stubs that we can dispatch to - it doesn't look like the strategy used in the VM (`callsiteCalloutHelper`) can be used for prejit. I don't want to increase the scope of this pull request, so we invalidate the entire method that has such dispatch.
src/coreclr/tools/Common/Compiler/TypeExtensions.cs
src/coreclr/tools/Common/TypeSystem/Common/MetadataVirtualMethodAlgorithm.cs
src/coreclr/tools/Common/TypeSystem/Common/TypeSystemHelpers.cs
src/coreclr/tools/Common/TypeSystem/Common/VirtualMethodAlgorithm.cs
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/EETypeNode.cs
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericLookupResult.cs
src/coreclr/tools/aot/ILCompiler.Compiler/IL/ILImporter.Scanner.cs
src/coreclr/tools/aot/ILCompiler.RyuJit/Compiler/DependencyAnalysis/MethodCodeNode.cs
src/coreclr/tools/aot/ILCompiler.RyuJit/JitInterface/CorInfoImpl.RyuJit.cs
src/tests/issues.targets
src/tests/nativeaot/SmokeTests/UnitTests/Interfaces.cs