Description
Description
The Swift programming language has a different ABI, runtime environment, and object model. This issue tracks the work for implementing Mono support for Swift calling convention according to the design document.
According to the calling convention, the self context has dedicated registers, and it is always passed through them since it's heavily used. Methods calling other methods on the same object can share the self context. Errors are also handled through registers, so the caller needs to check for errors and throw if necessary. Implementing P/Invoke thunks should simplify registers juggling by using predefined set of registers in these scenarios.
Below is a list of tasks that needs to be implemented. Please note that the breakdown of the issues does not impose hard deadlines. If some of the functionality does not get upstreamed for a particular preview version, this issue will be updated accordingly.
Tasks
- Frozen blittable structs lowering for sequence of length 4 or less
- [mono] Block SIMD types in Swift interop #98429
- [mono] Add runtime support for Swift calling convention on x64 and arm64 #94764
- Implement UnmanagedCallersOnly support for Swift calling convention
- Measure performance of direct Swift interop