@@ -329,9 +329,13 @@ extension MutableCollection where Self: BidirectionalCollection {
329
329
}
330
330
}
331
331
332
+ // FIXME(ABI): unused return value
332
333
/// Merges the elements in the ranges `lo..<mid` and `mid..<hi` using `buffer`
333
334
/// as out-of-place storage. Stable.
334
335
///
336
+ /// The unused return value is legacy ABI. It was originally added as a
337
+ /// workaround for a compiler bug (now fixed). See SR-14750 (rdar://45044610).
338
+ ///
335
339
/// - Precondition: `lo..<mid` and `mid..<hi` must already be sorted according
336
340
/// to `areInIncreasingOrder`.
337
341
/// - Precondition: `buffer` must point to a region of memory at least as large
@@ -506,15 +510,19 @@ internal func _findNextRun<C: RandomAccessCollection>(
506
510
}
507
511
508
512
extension UnsafeMutableBufferPointer {
513
+ // FIXME(ABI): unused return value
509
514
/// Merges the elements at `runs[i]` and `runs[i - 1]`, using `buffer` as
510
515
/// out-of-place storage.
511
516
///
517
+ /// The unused return value is legacy ABI. It was originally added as a
518
+ /// workaround for a compiler bug (now fixed). See SR-14750 (rdar://45044610).
519
+ ///
512
520
/// - Precondition: `runs.count > 1` and `i > 0`
513
521
/// - Precondition: `buffer` must have at least
514
522
/// `min(runs[i].count, runs[i - 1].count)` uninitialized elements.
515
523
@discardableResult
516
524
@inlinable
517
- public mutating func _mergeRuns(
525
+ internal mutating func _mergeRuns(
518
526
_ runs: inout [ Range < Index > ] ,
519
527
at i: Int ,
520
528
buffer: UnsafeMutablePointer < Element > ,
@@ -537,17 +545,21 @@ extension UnsafeMutableBufferPointer {
537
545
538
546
return true
539
547
}
540
-
548
+
549
+ // FIXME(ABI): unused return value
541
550
/// Merges upper elements of `runs` until the required invariants are
542
551
/// satisfied.
543
552
///
553
+ /// The unused return value is legacy ABI. It was originally added as a
554
+ /// workaround for a compiler bug (now fixed). See SR-14750 (rdar://45044610).
555
+ ///
544
556
/// - Precondition: `buffer` must have at least
545
557
/// `min(runs[i].count, runs[i - 1].count)` uninitialized elements.
546
558
/// - Precondition: The ranges in `runs` must be consecutive, such that for
547
559
/// any i, `runs[i].upperBound == runs[i + 1].lowerBound`.
548
560
@discardableResult
549
561
@inlinable
550
- public mutating func _mergeTopRuns(
562
+ internal mutating func _mergeTopRuns(
551
563
_ runs: inout [ Range < Index > ] ,
552
564
buffer: UnsafeMutablePointer < Element > ,
553
565
by areInIncreasingOrder: ( Element , Element ) throws -> Bool
@@ -611,16 +623,20 @@ extension UnsafeMutableBufferPointer {
611
623
612
624
return true
613
625
}
614
-
626
+
627
+ // FIXME(ABI): unused return value
615
628
/// Merges elements of `runs` until only one run remains.
616
629
///
630
+ /// The unused return value is legacy ABI. It was originally added as a
631
+ /// workaround for a compiler bug (now fixed). See SR-14750 (rdar://45044610).
632
+ ///
617
633
/// - Precondition: `buffer` must have at least
618
634
/// `min(runs[i].count, runs[i - 1].count)` uninitialized elements.
619
635
/// - Precondition: The ranges in `runs` must be consecutive, such that for
620
636
/// any i, `runs[i].upperBound == runs[i + 1].lowerBound`.
621
637
@discardableResult
622
638
@inlinable
623
- public mutating func _finalizeRuns(
639
+ internal mutating func _finalizeRuns(
624
640
_ runs: inout [ Range < Index > ] ,
625
641
buffer: UnsafeMutablePointer < Element > ,
626
642
by areInIncreasingOrder: ( Element , Element ) throws -> Bool
0 commit comments