Skip to content

Commit 29e3cbe

Browse files
authored
Merge pull request #28417 from CodaFi/arcada
[Shepherd] Add documentation to _DependenceToken
2 parents f7ee402 + b9fe66e commit 29e3cbe

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

stdlib/public/core/ArrayShared.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111

12-
/// This type is used as a result of the _checkSubscript call to associate the
12+
/// This type is used as a result of the `_checkSubscript` call to associate the
1313
/// call with the array access call it guards.
14+
///
15+
/// In order for the optimizer see that a call to `_checkSubscript` is semantically
16+
/// associated with an array access, a value of this type is returned and later passed
17+
/// to the accessing function. For example, a typical call to `_getElement` looks like
18+
/// let token = _checkSubscript(index, ...)
19+
/// return _getElement(index, ... , matchingSubscriptCheck: token)
1420
@frozen
1521
public struct _DependenceToken {
1622
@inlinable

0 commit comments

Comments
 (0)