Add support for default implementation of static virtuals with method constraints...
authorDavid Wrighton <davidwr@microsoft.com>
Wed, 19 Jul 2023 21:53:48 +0000 (14:53 -0700)
committerGitHub <noreply@github.com>
Wed, 19 Jul 2023 21:53:48 +0000 (14:53 -0700)
commitd1adf8187071ae5e47f74e3ba2317cf93cac76eb
tree09dac7becde2cdb1e7aa0c0064ad8bca6e46b84c
parentef4860a0c1a4a3ba1220c28a0bcd3a7b42370b77
Add support for default implementation of static virtuals with method constraints (#89061)

- The major problem was the logic which incorrectly would instantiate the methods when it wasn't necessary
- As the number of flags to the implementation functions has grown very large, this change also includes logic converting them all to a single flags variable when passing them around

Fixes #73658
Fixes #78865
13 files changed:
src/coreclr/inc/enum_class_flags.h [new file with mode: 0644]
src/coreclr/vm/genericdict.cpp
src/coreclr/vm/methodtable.cpp
src/coreclr/vm/methodtable.h
src/coreclr/vm/runtimehandles.cpp
src/coreclr/vm/typedesc.cpp
src/tests/Loader/classloader/StaticVirtualMethods/RegressionTests/GetInterfaceMapWithStaticVirtualsAndConstraints.cs [new file with mode: 0644]
src/tests/Loader/classloader/StaticVirtualMethods/RegressionTests/GetInterfaceMapWithStaticVirtualsAndConstraints.csproj [new file with mode: 0644]
src/tests/Loader/classloader/StaticVirtualMethods/RegressionTests/GitHub_73658.cs [new file with mode: 0644]
src/tests/Loader/classloader/StaticVirtualMethods/RegressionTests/GitHub_78865.cs [new file with mode: 0644]
src/tests/Loader/classloader/StaticVirtualMethods/RegressionTests/StaticVirtualsAndMethodConstraintsAndDefaultImplementation.cs [new file with mode: 0644]
src/tests/Loader/classloader/StaticVirtualMethods/RegressionTests/StaticVirtualsAndMethodConstraintsAndDefaultImplementation.csproj [new file with mode: 0644]
src/tests/issues.targets