Add default method support to virtual statics (#64717)
authorDavid Wrighton <davidwr@microsoft.com>
Wed, 9 Feb 2022 18:44:15 +0000 (10:44 -0800)
committerGitHub <noreply@github.com>
Wed, 9 Feb 2022 18:44:15 +0000 (10:44 -0800)
commit9e45de46c9159ae353ad636f81fa7b2a6eb1d072
tree4df9a25975b98dce568470cb8db595ca8a580b8d
parente48b17961c93747cb0007ea2a0c14b0cf72b833a
Add default method support to virtual statics (#64717)

- The preview feature version of virtual statics implemented for .NET 6 does not allow for the interface methods to have a default implementation.
- With this change, we add support for the interface method having an actual implementation to CoreCLR. From what I can tell the Mono runtime already had such support
- There are some small ECMA spec updates to allow this change that are also included

In addition, I've taken the liberty to enable running the coreclr test suite on Mono on Windows. It needed a small amount of fixup.
21 files changed:
docs/design/specs/Ecma-335-Augments.md
src/coreclr/vm/genericdict.cpp
src/coreclr/vm/methodtable.cpp
src/coreclr/vm/methodtablebuilder.cpp
src/coreclr/vm/typedesc.cpp
src/tests/Common/Directory.Build.targets
src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/Generator/Program.cs
src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTest/GenericContextCommonAndImplementation.il [moved from src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextCommonAndImplementation.il with 89% similarity]
src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTest/GenericContextCommonAndImplementation.ilproj [moved from src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextCommonAndImplementation.ilproj with 100% similarity]
src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTest/GenericContextTest.il [moved from src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTest.il with 100% similarity]
src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTest/GenericContextTest.ilproj [moved from src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTest.ilproj with 83% similarity]
src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTestDefaultImp/GenericContextCommonAndImplementation.il [new file with mode: 0644]
src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTestDefaultImp/GenericContextCommonAndImplementation.ilproj [new file with mode: 0644]
src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTestDefaultImp/GenericContextTestDefaultImp.il [new file with mode: 0644]
src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTestDefaultImp/GenericContextTestDefaultImp.ilproj [new file with mode: 0644]
src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTestDefaultImpCallDefaultImp/GenericContextCommonAndImplementation.il [new file with mode: 0644]
src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTestDefaultImpCallDefaultImp/GenericContextCommonAndImplementation.ilproj [new file with mode: 0644]
src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTestDefaultImpCallDefaultImp/GenericContextTestDefaultImpCallDefaultImp.il [new file with mode: 0644]
src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTestDefaultImpCallDefaultImp/GenericContextTestDefaultImpCallDefaultImp.ilproj [new file with mode: 0644]
src/tests/Loader/classloader/StaticVirtualMethods/NegativeTestCases/MethodFlags.il
src/tests/build.cmd