@@ -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
@@ -239,7 +239,7 @@ struct _ContiguousArrayBuffer<Element> : _ArrayBufferProtocol {
239
239
let verbatim = false
240
240
#endif
241
241
242
- __bufferPointer. _valuePointer . initialize ( with:
242
+ __bufferPointer. _headerPointer . initialize ( with:
243
243
_ArrayBody (
244
244
count: count,
245
245
capacity: capacity,
@@ -343,7 +343,7 @@ struct _ContiguousArrayBuffer<Element> : _ArrayBufferProtocol {
343
343
/// The number of elements the buffer stores.
344
344
public var count : Int {
345
345
get {
346
- return __bufferPointer. value . count
346
+ return __bufferPointer. header . count
347
347
}
348
348
nonmutating set {
349
349
_sanityCheck ( newValue >= 0 )
@@ -352,7 +352,7 @@ struct _ContiguousArrayBuffer<Element> : _ArrayBufferProtocol {
352
352
newValue <= capacity,
353
353
" Can't grow an array buffer past its capacity " )
354
354
355
- __bufferPointer. _valuePointer . pointee. count = newValue
355
+ __bufferPointer. _headerPointer . pointee. count = newValue
356
356
}
357
357
}
358
358
@@ -361,14 +361,14 @@ struct _ContiguousArrayBuffer<Element> : _ArrayBufferProtocol {
361
361
@inline ( __always)
362
362
func _checkValidSubscript( _ index : Int ) {
363
363
_precondition (
364
- ( index >= 0 ) && ( index < __bufferPointer. value . count) ,
364
+ ( index >= 0 ) && ( index < __bufferPointer. header . count) ,
365
365
" Index out of range "
366
366
)
367
367
}
368
368
369
369
/// The number of elements the buffer can store without reallocation.
370
370
public var capacity : Int {
371
- return __bufferPointer. value . capacity
371
+ return __bufferPointer. header . capacity
372
372
}
373
373
374
374
/// Copy the elements in `bounds` from this buffer into uninitialized
0 commit comments