-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
User StoryA single user-facing feature. Can be grouped under an epic.A single user-facing feature. Can be grouped under an epic.area-Codegen-meta-mono
Milestone
Description
As per #97079 (comment)
We have implemented support for generic unmanaged calli in both CoreCLR and NativeAOT. We should also implement it for mono.
Work items:
- Support generic unmanaged calli for blittable types
- Enabling generic unmanaged calli can technically enable generic varargs as well, make sure to block generic varargs usage ( in CoreCLR we throw a
NotSupportedException
).
Optional:
- Add an error mode to throw
MarshalDirectiveException
for runtime marshaling (i.e. generic unmanaged calli with non-blittable types). Note that NativeAOT doesn't verify this and will simply produce bad codegen.
After the implementation, we will also need to re-enable tests for generic calli in src/tests/Interop/Interop.csproj
.
And we are skipping tests on mono, make sure to enable them as well: https://github.com/dotnet/runtime/blob/main/src%2Ftests%2FInterop%2FMarshalAPI%2FFunctionPointer%2FGenericFunctionPointer.cs#L11-L12
Metadata
Metadata
Assignees
Labels
User StoryA single user-facing feature. Can be grouped under an epic.A single user-facing feature. Can be grouped under an epic.area-Codegen-meta-mono