@@ -1591,7 +1591,7 @@ extension ${Self} {
1591
1591
) rethrows -> R {
1592
1592
let count = self . count
1593
1593
// Ensure unique storage
1594
- _outlinedMakeUniqueBuffer ( & _buffer , bufferCount: count)
1594
+ _buffer . _outlinedMakeUniqueBuffer ( bufferCount: count)
1595
1595
1596
1596
// Ensure that body can't invalidate the storage or its bounds by
1597
1597
// moving self into a temporary working array.
@@ -1985,7 +1985,7 @@ internal struct _IgnorePointer<T> : _PointerFunction {
1985
1985
extension _ArrayBufferProtocol where Index == Int {
1986
1986
@_versioned
1987
1987
@inline ( never)
1988
- internal func _outlinedMakeUniqueBuffer( bufferCount: Int ) {
1988
+ internal mutating func _outlinedMakeUniqueBuffer( bufferCount: Int ) {
1989
1989
1990
1990
if _fastPath (
1991
1991
requestUniqueMutableBackingBuffer ( minimumCapacity: bufferCount) != nil ) {
@@ -1997,13 +1997,14 @@ extension _ArrayBufferProtocol where Index == Int {
1997
1997
_arrayOutOfPlaceUpdate ( & newBuffer, bufferCount, 0 , _IgnorePointer ( ) )
1998
1998
}
1999
1999
2000
- internal func _arrayReserve( _ minimumCapacity: Int ) {
2000
+ internal mutating func _arrayReserve( _ minimumCapacity: Int ) {
2001
2001
2002
2002
let count = self . count
2003
- let requiredCapacity = max ( count, minimumCapacity)
2003
+ // FIXME(Typechecker): shouldn't need Swift. here
2004
+ let requiredCapacity = Swift . max ( count, minimumCapacity)
2004
2005
2005
2006
if _fastPath (
2006
- buffer . requestUniqueMutableBackingBuffer (
2007
+ requestUniqueMutableBackingBuffer (
2007
2008
minimumCapacity: requiredCapacity) != nil
2008
2009
) {
2009
2010
return
@@ -2033,7 +2034,7 @@ internal func _arrayAppendSequence<Buffer, S>(
2033
2034
2034
2035
// This will force uniqueness
2035
2036
var count = buffer. count
2036
- _arrayReserve ( & buffer , count + 1 )
2037
+ buffer . _arrayReserve ( count + 1 )
2037
2038
while true {
2038
2039
let capacity = buffer. capacity
2039
2040
let base = buffer. firstElementAddress
@@ -2047,7 +2048,7 @@ internal func _arrayAppendSequence<Buffer, S>(
2047
2048
if nextItem == nil {
2048
2049
return
2049
2050
}
2050
- _arrayReserve ( & buffer , _growArrayCapacity ( capacity) )
2051
+ buffer . _arrayReserve ( _growArrayCapacity ( capacity) )
2051
2052
}
2052
2053
}
2053
2054
0 commit comments