Skip to content

Commit 637c0ca

Browse files
author
Lance Parker
committed
inlinability annotations from c25188b#diff-6a97ab1710fb672c1c5697e2425c15a2
1 parent 9fea249 commit 637c0ca

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

stdlib/public/core/Array.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -847,8 +847,8 @@ extension Array: RangeReplaceableCollection, ArrayProtocol {
847847
}
848848
}
849849

850-
@inlinable
851850
@inline(never)
851+
@usableFromInline
852852
internal static func _allocateBufferUninitialized(
853853
minimumCapacity: Int
854854
) -> _Buffer {
@@ -1059,8 +1059,8 @@ extension Array: RangeReplaceableCollection, ArrayProtocol {
10591059
/// Copy the contents of the current buffer to a new unique mutable buffer.
10601060
/// The count of the new buffer is set to `oldCount`, the capacity of the
10611061
/// new buffer is big enough to hold 'oldCount' + 1 elements.
1062-
@inlinable
10631062
@inline(never)
1063+
@inlinable // @specializable
10641064
internal mutating func _copyToNewBuffer(oldCount: Int) {
10651065
let newCount = oldCount + 1
10661066
var newBuffer = _buffer._forceCreateUniqueMutableBuffer(

stdlib/public/core/ArrayShared.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ internal struct _InitializeMemoryFromCollection<
110110
}
111111

112112
extension _ArrayBufferProtocol {
113-
@inlinable
113+
@inlinable // FIXME @useableFromInline https://bugs.swift.org/browse/SR-7588
114114
@inline(never)
115115
internal mutating func _arrayOutOfPlaceReplace<C: Collection>(
116116
_ bounds: Range<Int>,
@@ -155,8 +155,8 @@ extension _ArrayBufferProtocol {
155155
/// The formula used to compute the new buffers capacity is:
156156
/// max(requiredCapacity, source.capacity) if newCount <= source.capacity
157157
/// max(requiredCapacity, _growArrayCapacity(source.capacity)) otherwise
158-
@inlinable
159158
@inline(never)
159+
@inlinable // @specializable
160160
internal func _forceCreateUniqueMutableBuffer(
161161
newCount: Int, requiredCapacity: Int
162162
) -> _ContiguousArrayBuffer<Element> {
@@ -171,8 +171,8 @@ extension _ArrayBufferProtocol {
171171
/// The formula used to compute the new buffers capacity is:
172172
/// max(minNewCapacity, source.capacity) if minNewCapacity <= source.capacity
173173
/// max(minNewCapacity, _growArrayCapacity(source.capacity)) otherwise
174-
@inlinable
175174
@inline(never)
175+
@inlinable // @specializable
176176
internal func _forceCreateUniqueMutableBuffer(
177177
countForNewBuffer: Int, minNewCapacity: Int
178178
) -> _ContiguousArrayBuffer<Element> {
@@ -220,8 +220,8 @@ extension _ArrayBufferProtocol {
220220
///
221221
/// As an optimization, may move elements out of source rather than
222222
/// copying when it isUniquelyReferenced.
223-
@inlinable
224223
@inline(never)
224+
@inlinable // @specializable
225225
internal mutating func _arrayOutOfPlaceUpdate<Initializer>(
226226
_ dest: inout _ContiguousArrayBuffer<Element>,
227227
_ headCount: Int, // Count of initial source elements to copy/move
@@ -304,8 +304,8 @@ internal struct _IgnorePointer<T>: _PointerFunction {
304304
}
305305

306306
extension _ArrayBufferProtocol {
307-
@inlinable
308307
@inline(never)
308+
@usableFromInline
309309
internal mutating func _outlinedMakeUniqueBuffer(bufferCount: Int) {
310310

311311
if _fastPath(

stdlib/public/core/ArraySlice.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -665,8 +665,8 @@ extension ArraySlice: RangeReplaceableCollection, ArrayProtocol {
665665
}
666666
}
667667

668-
@inlinable
669668
@inline(never)
669+
@usableFromInline
670670
internal static func _allocateBufferUninitialized(
671671
minimumCapacity: Int
672672
) -> _Buffer {
@@ -851,8 +851,8 @@ extension ArraySlice: RangeReplaceableCollection, ArrayProtocol {
851851
/// Copy the contents of the current buffer to a new unique mutable buffer.
852852
/// The count of the new buffer is set to `oldCount`, the capacity of the
853853
/// new buffer is big enough to hold 'oldCount' + 1 elements.
854-
@inlinable
855854
@inline(never)
855+
@inlinable // @specializable
856856
internal mutating func _copyToNewBuffer(oldCount: Int) {
857857
let newCount = oldCount + 1
858858
var newBuffer = _buffer._forceCreateUniqueMutableBuffer(

stdlib/public/core/ContiguousArray.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,8 +578,8 @@ extension ContiguousArray: RangeReplaceableCollection, ArrayProtocol {
578578
}
579579
}
580580

581-
@inlinable
582581
@inline(never)
582+
@usableFromInline
583583
internal static func _allocateBufferUninitialized(
584584
minimumCapacity: Int
585585
) -> _Buffer {
@@ -760,8 +760,8 @@ extension ContiguousArray: RangeReplaceableCollection, ArrayProtocol {
760760
/// Copy the contents of the current buffer to a new unique mutable buffer.
761761
/// The count of the new buffer is set to `oldCount`, the capacity of the
762762
/// new buffer is big enough to hold 'oldCount' + 1 elements.
763-
@inlinable
764763
@inline(never)
764+
@inlinable // @specializable
765765
internal mutating func _copyToNewBuffer(oldCount: Int) {
766766
let newCount = oldCount + 1
767767
var newBuffer = _buffer._forceCreateUniqueMutableBuffer(

0 commit comments

Comments
 (0)