-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[Mono] implement static virtual methods in interfaces support #49904
Comments
@vargaz I think we're probably going to need static vtables. The ecma spec addendum says the static interface methods are going to be in the methodimpl table. The partydonk prototype completely ignores that and does matching by name. But we should just add a |
There is now a working implmentation of all of this for CoreCLR checked in. Tests are disabled for mono, but otherwise it should be ready for implementation work to begin in Mono. |
Zoltan implemented the initial version in #53465 Notably generic sharing does not work correctly, so the AOT support isn't quite there yet. |
Remaining work pushed back to .net 7 |
@tannergooding @stephentoub I think in general Mono is in good shape to use static virtual methods in libraries. There may be bugs, but the only remaining completely unimplemented functionality that I'm aware of is the |
@lambdageek @BrzVlad - There are a couple unchecked ones. Are these required for 7.0 or can this be moved to 8.0.0 ? |
Moving to 8.0 since only corner cases from runtime tests are left implementing |
Implement support for static interface methods (csharp design: dotnet/csharplang#4436)
Known issues for .NET 7
runtime/src/tests/issues.targets
Lines 1532 to 1537 in 6f30425
GenericContext
[mono] Fix static virtual calls to generic methods from gshared code #66739InterfaceVariance
NegativeTestCases
constrained.ldftn
in the JIT #61672contstrained.call
[mono][fullaot] Calling static virtual method from a generic method leads to "Attempting to JIT" error #65002 and Use generic math in System.Numerics.Vectors (#60365) #60905Work items completed in .net 6:
virtual
onstatic
methods in interfaces (can borrow this and JIT from partydonk prototype)MonoClass
(partydonk just puts static methods into the instance vtable and also does matching by name)constrained.call
constrained.call
constrained.ldftn
RuntimeFeature
flag System.Runtime.CompilerServices.RuntimeFeature.VirtualStaticsInInterfaces #49905 for statics in interfaces.Related CoreCLR work items over at #50129
The text was updated successfully, but these errors were encountered: