Skip to content

Commit 71f2ddd

Browse files
author
Lance Parker
authored
Merge pull request #20377 from lancep/SliceBufferInlinableAudit
[stdlib]@inlinable audit for SliceBuffer
2 parents 6e938f8 + 1938378 commit 71f2ddd

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

stdlib/public/core/SliceBuffer.swift

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,19 @@ internal struct _SliceBuffer<Element>
6464
}
6565
}
6666

67-
@inlinable // FIXME(sil-serialize-all)
67+
@inlinable
6868
internal var _hasNativeBuffer: Bool {
6969
return (endIndexAndFlags & 1) != 0
7070
}
7171

72-
@inlinable // FIXME(sil-serialize-all)
72+
@inlinable
7373
internal var nativeBuffer: NativeBuffer {
7474
_sanityCheck(_hasNativeBuffer)
7575
return NativeBuffer(
7676
owner as? __ContiguousArrayStorageBase ?? _emptyArrayStorage)
7777
}
7878

79-
@inlinable // FIXME(sil-serialize-all)
79+
@inlinable
8080
internal var nativeOwner: AnyObject {
8181
_sanityCheck(_hasNativeBuffer, "Expect a native array")
8282
return owner
@@ -88,7 +88,7 @@ internal struct _SliceBuffer<Element>
8888
/// - Precondition: This buffer is backed by a uniquely-referenced
8989
/// `_ContiguousArrayBuffer` and
9090
/// `insertCount <= numericCast(newValues.count)`.
91-
@inlinable // FIXME(sil-serialize-all)
91+
@inlinable
9292
internal mutating func replaceSubrange<C>(
9393
_ subrange: Range<Int>,
9494
with insertCount: Int,
@@ -125,7 +125,7 @@ internal struct _SliceBuffer<Element>
125125
/// A value that identifies the storage used by the buffer. Two
126126
/// buffers address the same elements when they have the same
127127
/// identity and count.
128-
@inlinable // FIXME(sil-serialize-all)
128+
@inlinable
129129
internal var identity: UnsafeRawPointer {
130130
return UnsafeRawPointer(firstElementAddress)
131131
}
@@ -136,12 +136,12 @@ internal struct _SliceBuffer<Element>
136136
@usableFromInline
137137
internal let subscriptBaseAddress: UnsafeMutablePointer<Element>
138138

139-
@inlinable // FIXME(sil-serialize-all)
139+
@inlinable
140140
internal var firstElementAddress: UnsafeMutablePointer<Element> {
141141
return subscriptBaseAddress + startIndex
142142
}
143143

144-
@inlinable // FIXME(sil-serialize-all)
144+
@inlinable
145145
internal var firstElementAddressIfContiguous: UnsafeMutablePointer<Element>? {
146146
return firstElementAddress
147147
}
@@ -152,7 +152,7 @@ internal struct _SliceBuffer<Element>
152152

153153
//===--- Non-essential bits ---------------------------------------------===//
154154

155-
@inlinable // FIXME(sil-serialize-all)
155+
@inlinable
156156
internal mutating func requestUniqueMutableBackingBuffer(
157157
minimumCapacity: Int
158158
) -> NativeBuffer? {
@@ -210,7 +210,7 @@ internal struct _SliceBuffer<Element>
210210
/// If this buffer is backed by a `_ContiguousArrayBuffer`
211211
/// containing the same number of elements as `self`, return it.
212212
/// Otherwise, return `nil`.
213-
@inlinable // FIXME(sil-serialize-all)
213+
@inlinable
214214
internal func requestNativeBuffer() -> _ContiguousArrayBuffer<Element>? {
215215
_invariantCheck()
216216
if _fastPath(_hasNativeBuffer && nativeBuffer.count == count) {
@@ -219,7 +219,7 @@ internal struct _SliceBuffer<Element>
219219
return nil
220220
}
221221

222-
@inlinable // FIXME(sil-serialize-all)
222+
@inlinable
223223
@discardableResult
224224
internal __consuming func _copyContents(
225225
subRange bounds: Range<Int>,
@@ -235,12 +235,12 @@ internal struct _SliceBuffer<Element>
235235
}
236236

237237
/// True, if the array is native and does not need a deferred type check.
238-
@inlinable // FIXME(sil-serialize-all)
238+
@inlinable
239239
internal var arrayPropertyIsNativeTypeChecked: Bool {
240240
return _hasNativeBuffer
241241
}
242242

243-
@inlinable // FIXME(sil-serialize-all)
243+
@inlinable
244244
internal var count: Int {
245245
get {
246246
return endIndex - startIndex
@@ -257,13 +257,13 @@ internal struct _SliceBuffer<Element>
257257

258258
/// Traps unless the given `index` is valid for subscripting, i.e.
259259
/// `startIndex ≤ index < endIndex`
260-
@inlinable // FIXME(sil-serialize-all)
260+
@inlinable
261261
internal func _checkValidSubscript(_ index : Int) {
262262
_precondition(
263263
index >= startIndex && index < endIndex, "Index out of bounds")
264264
}
265265

266-
@inlinable // FIXME(sil-serialize-all)
266+
@inlinable
267267
internal var capacity: Int {
268268
let count = self.count
269269
if _slowPath(!_hasNativeBuffer) {
@@ -277,12 +277,12 @@ internal struct _SliceBuffer<Element>
277277
return count
278278
}
279279

280-
@inlinable // FIXME(sil-serialize-all)
280+
@inlinable
281281
internal mutating func isUniquelyReferenced() -> Bool {
282282
return isKnownUniquelyReferenced(&owner)
283283
}
284284

285-
@inlinable // FIXME(sil-serialize-all)
285+
@inlinable
286286
internal func getElement(_ i: Int) -> Element {
287287
_sanityCheck(i >= startIndex, "slice index is out of range (before startIndex)")
288288
_sanityCheck(i < endIndex, "slice index is out of range")
@@ -293,7 +293,7 @@ internal struct _SliceBuffer<Element>
293293
///
294294
/// - Precondition: `position` is a valid position in `self` and
295295
/// `position != endIndex`.
296-
@inlinable // FIXME(sil-serialize-all)
296+
@inlinable
297297
internal subscript(position: Int) -> Element {
298298
get {
299299
return getElement(position)
@@ -305,7 +305,7 @@ internal struct _SliceBuffer<Element>
305305
}
306306
}
307307

308-
@inlinable // FIXME(sil-serialize-all)
308+
@inlinable
309309
internal subscript(bounds: Range<Int>) -> _SliceBuffer {
310310
get {
311311
_sanityCheck(bounds.lowerBound >= startIndex)
@@ -334,7 +334,7 @@ internal struct _SliceBuffer<Element>
334334
///
335335
/// `endIndex` is always reachable from `startIndex` by zero or more
336336
/// applications of `index(after:)`.
337-
@inlinable // FIXME(sil-serialize-all)
337+
@inlinable
338338
internal var endIndex: Int {
339339
get {
340340
return Int(endIndexAndFlags >> 1)
@@ -371,7 +371,7 @@ internal struct _SliceBuffer<Element>
371371
}
372372

373373
extension _SliceBuffer {
374-
@inlinable // FIXME(sil-serialize-all)
374+
@inlinable
375375
internal __consuming func _copyToContiguousArray() -> ContiguousArray<Element> {
376376
if _hasNativeBuffer {
377377
let n = nativeBuffer

0 commit comments

Comments
 (0)