-
Notifications
You must be signed in to change notification settings - Fork 116
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
Abstract static interface methods support is incomplete #929
Labels
Milestone
Comments
lostmsu
added a commit
to losttech/ILGPU
that referenced
this issue
Feb 13, 2023
This replaces specific GenericMath support introduced in 7bf5578 ( m4rs-mt#898 ) with generic support for static abstract interface members. Support is implemented using the constrained flag on the call instruction the same way it used to be done on virtual method calls. The call instruction with constrained flag set contains concrete type, that implements given interface, which makes it possible to find concrete method implementation to be called. fixes m4rs-mt#929
lostmsu
added a commit
to losttech/ILGPU
that referenced
this issue
Feb 14, 2023
This replaces specific GenericMath support introduced in 7bf5578 ( m4rs-mt#898 ) with generic support for static abstract interface members. Support is implemented using the constrained flag on the call instruction the same way it used to be done on virtual method calls. The call instruction with constrained flag set contains concrete type, that implements given interface, which makes it possible to find concrete method implementation to be called. fixes m4rs-mt#929
lostmsu
added a commit
to losttech/ILGPU
that referenced
this issue
Feb 14, 2023
This replaces specific GenericMath support introduced in 7bf5578 ( m4rs-mt#898 ) with generic support for static abstract interface members. Support is implemented using the constrained flag on the call instruction the same way it used to be done on virtual method calls. The call instruction with constrained flag set contains concrete type, that implements given interface, which makes it possible to find concrete method implementation to be called. fixes m4rs-mt#929
lostmsu
added a commit
to losttech/ILGPU
that referenced
this issue
Feb 14, 2023
This replaces specific GenericMath support introduced in 7bf5578 ( m4rs-mt#898 ) with generic support for static abstract interface members. Support is implemented using the constrained flag on the call instruction the same way it used to be done on virtual method calls. The call instruction with constrained flag set contains concrete type, that implements given interface, which makes it possible to find concrete method implementation to be called. fixes m4rs-mt#929
lostmsu
added a commit
to losttech/ILGPU
that referenced
this issue
Feb 15, 2023
This replaces specific GenericMath support introduced in 7bf5578 ( m4rs-mt#898 ) with generic support for static abstract interface members. Support is implemented using the constrained flag on the call instruction the same way it used to be done on virtual method calls. The call instruction with constrained flag set contains concrete type, that implements given interface, which makes it possible to find concrete method implementation to be called. fixes m4rs-mt#929
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current implementation happens to work for generic math via
System.Numerics.INumberBase<T>
because for all primitive typeT
happens to be of the same type as the type itself (e.g. forInt32
:T == Int32
).In general case this is not true. And the
Disassembler.ExtractMethodBody
fails onmethod.DeclaringType.GetGenericArguments()[0];
line withIndexOutOfRangeException
because the interface that contains abstract static method does not even have to be generic. As far as I see, at this point the information about the type, that implements that static abstract method is not available at all.Stacktrace
The text was updated successfully, but these errors were encountered: