Skip to content

Commit 14984ee

Browse files
lorenteyMax Moiseev
authored andcommitted
[stdlib] Make UInt.Words.var internal
We don’t need Words’ members to be @_transparent; simple conversions use _lowWord instead. (cherry picked from commit e975445)
1 parent 1882d23 commit 14984ee

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

stdlib/public/core/Integers.swift.gyb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2744,25 +2744,20 @@ ${assignmentOperatorComment(x.operator, True)}
27442744
public typealias Indices = CountableRange<Int>
27452745
public typealias SubSequence = BidirectionalSlice<${Self}.Words>
27462746

2747-
public var _value: ${Self}
2747+
var _value: ${Self}
27482748

2749-
@_transparent
27502749
public init(_ value: ${Self}) {
27512750
self._value = value
27522751
}
27532752

2754-
@_transparent
27552753
public var count: Int {
27562754
return (${bits} + ${word_bits} - 1) / ${word_bits}
27572755
}
27582756

2759-
@_transparent
27602757
public var startIndex: Int { return 0 }
27612758

2762-
@_transparent
27632759
public var endIndex: Int { return count }
27642760

2765-
@_transparent
27662761
public var indices: Indices { return startIndex ..< endIndex }
27672762

27682763
@_transparent
@@ -2772,7 +2767,6 @@ ${assignmentOperatorComment(x.operator, True)}
27722767
public func index(before i: Int) -> Int { return i - 1 }
27732768

27742769
public subscript(position: Int) -> UInt {
2775-
@_transparent
27762770
get {
27772771
_precondition(position >= 0, "Negative word index")
27782772
_precondition(position < endIndex, "Word index out of range")

0 commit comments

Comments
 (0)