Skip to content

Commit 9ab1bc6

Browse files
Update proposed/swift-interop.md
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
1 parent db1c74b commit 9ab1bc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

proposed/swift-interop.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ We have selected the following option for supporting the Self register in the ca
5757

5858
1. Use specially-typed argument with a type, `SwiftSelf`, to represent which parameter should go into the self register.
5959

60-
We will provide a `SwiftSelf` type to specify "this argument goes in the self register". Specifying the type twice in a signature would generate an `InvalidProgramException`. This would allow the `self` argument to be specified anywhere in the argument list. Alternatively, many sections of the Swift ABI documentation, as well as the Clang docs refer to this parameter as the "context" argument instead of the "self" argument, so an alternative name could be `SwiftContext`. Methods annotated with `UnmanagedCallersOnly` will be treated as Swift-like functions capable of handling context registers. The value stored in the self register will be loaded into the `SwiftSelf` argument.
60+
We will provide a `SwiftSelf` type to specify "this argument goes in the self register". Specifying the type twice in a signature would generate an `InvalidProgramException`. This would allow the `self` argument to be specified anywhere in the argument list. Alternatively, many sections of the Swift ABI documentation, as well as the Clang docs refer to this parameter as the "context" argument instead of the "self" argument, so an alternative name could be `SwiftContext`. Methods annotated with `UnmanagedCallersOnly` will be capable of handling the self register; the value stored in the self register will be loaded into the `SwiftSelf` argument.
6161

6262
For reference, explicitly declaring a function with the Swift or SwiftAsync calling conventions in Clang requires the "context" argument, the value that goes in the "self" register, as the last parameter or the penultimate parameter followed by the error parameter.
6363

0 commit comments

Comments
 (0)