@@ -102,8 +102,8 @@ final class _ContiguousArrayStorage<Element> : _ContiguousArrayStorage1 {
102
102
103
103
deinit {
104
104
__manager. _elementPointer. deinitialize (
105
- count: __manager. _valuePointer . pointee. count)
106
- __manager. _valuePointer . deinitialize ( )
105
+ count: __manager. _headerPointer . pointee. count)
106
+ __manager. _headerPointer . deinitialize ( )
107
107
_fixLifetime ( __manager)
108
108
}
109
109
@@ -114,7 +114,7 @@ final class _ContiguousArrayStorage<Element> : _ContiguousArrayStorage1 {
114
114
_ body: @noescape ( UnsafeBufferPointer < AnyObject > ) throws -> Void
115
115
) rethrows {
116
116
if _isBridgedVerbatimToObjectiveC ( Element . self) {
117
- let count = __manager. value . count
117
+ let count = __manager. header . count
118
118
let elements = UnsafePointer < AnyObject > ( __manager. _elementPointer)
119
119
defer { _fixLifetime ( __manager) }
120
120
try body ( UnsafeBufferPointer ( start: elements, count: count) )
@@ -128,7 +128,7 @@ final class _ContiguousArrayStorage<Element> : _ContiguousArrayStorage1 {
128
128
_sanityCheck (
129
129
!_isBridgedVerbatimToObjectiveC( Element . self) ,
130
130
" Verbatim bridging should be handled separately " )
131
- return __manager. value . count
131
+ return __manager. header . count
132
132
}
133
133
134
134
/// Bridge array elements and return a new buffer that owns them.
@@ -139,7 +139,7 @@ final class _ContiguousArrayStorage<Element> : _ContiguousArrayStorage1 {
139
139
_sanityCheck (
140
140
!_isBridgedVerbatimToObjectiveC( Element . self) ,
141
141
" Verbatim bridging should be handled separately " )
142
- let count = __manager. value . count
142
+ let count = __manager. header . count
143
143
let result = _HeapBuffer < Int , AnyObject > (
144
144
_HeapBufferStorage < Int , AnyObject > . self, count, count)
145
145
let resultPtr = result. baseAddress
@@ -238,7 +238,7 @@ public struct _ContiguousArrayBuffer<Element> : _ArrayBufferProtocol {
238
238
let verbatim = false
239
239
#endif
240
240
241
- __bufferPointer. _valuePointer . initialize ( with:
241
+ __bufferPointer. _headerPointer . initialize ( with:
242
242
_ArrayBody (
243
243
count: count,
244
244
capacity: capacity,
@@ -342,7 +342,7 @@ public struct _ContiguousArrayBuffer<Element> : _ArrayBufferProtocol {
342
342
/// The number of elements the buffer stores.
343
343
public var count : Int {
344
344
get {
345
- return __bufferPointer. value . count
345
+ return __bufferPointer. header . count
346
346
}
347
347
nonmutating set {
348
348
_sanityCheck ( newValue >= 0 )
@@ -351,7 +351,7 @@ public struct _ContiguousArrayBuffer<Element> : _ArrayBufferProtocol {
351
351
newValue <= capacity,
352
352
" Can't grow an array buffer past its capacity " )
353
353
354
- __bufferPointer. _valuePointer . pointee. count = newValue
354
+ __bufferPointer. _headerPointer . pointee. count = newValue
355
355
}
356
356
}
357
357
@@ -360,14 +360,14 @@ public struct _ContiguousArrayBuffer<Element> : _ArrayBufferProtocol {
360
360
@inline ( __always)
361
361
func _checkValidSubscript( _ index : Int ) {
362
362
_precondition (
363
- ( index >= 0 ) && ( index < __bufferPointer. value . count) ,
363
+ ( index >= 0 ) && ( index < __bufferPointer. header . count) ,
364
364
" Index out of range "
365
365
)
366
366
}
367
367
368
368
/// The number of elements the buffer can store without reallocation.
369
369
public var capacity : Int {
370
- return __bufferPointer. value . capacity
370
+ return __bufferPointer. header . capacity
371
371
}
372
372
373
373
/// Copy the elements in `bounds` from this buffer into uninitialized
0 commit comments