Skip to content

Commit fb80d65

Browse files
authored
Merge pull request #4217 from apple/stdlib-string-fixme-abi
stdlib: add a couple of ABI FIXMEs to String implementation
2 parents 25a3c75 + d1801be commit fb80d65

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

stdlib/public/core/StringCharacterView.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,9 @@ extension String.CharacterView : BidirectionalCollection {
236236
)
237237
}
238238

239+
// FIXME(ABI): don't make this function inlineable. Grapheme cluster
240+
// segmentation uses a completely different algorithm in Unicode 9.0.
241+
//
239242
/// Returns the length of the first extended grapheme cluster in UTF-16
240243
/// code units.
241244
@inline(never)
@@ -275,7 +278,10 @@ extension String.CharacterView : BidirectionalCollection {
275278

276279
return start._position - startIndexUTF16
277280
}
278-
281+
282+
// FIXME(ABI): don't make this function inlineable. Grapheme cluster
283+
// segmentation uses a completely different algorithm in Unicode 9.0.
284+
//
279285
/// Returns the length of the previous extended grapheme cluster in UTF-16
280286
/// code units.
281287
@inline(never)

stdlib/public/core/StringUnicodeScalarView.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,8 @@ extension String.UnicodeScalarIndex {
577577
}
578578

579579
extension String.UnicodeScalarView {
580+
// FIXME(ABI): don't make this function inlineable. Grapheme cluster
581+
// segmentation uses a completely different algorithm in Unicode 9.0.
580582
internal func _isOnGraphemeClusterBoundary(_ i: Index) -> Bool {
581583
if i == startIndex || i == endIndex {
582584
return true

stdlib/public/core/UnicodeTrie.swift.gyb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,9 @@ struct _UnicodeGraphemeClusterBreakPropertyTrie {
206206
}
207207
}
208208

209+
// FIXME(ABI): don't mark this type versioned, or any of its APIs inlineable.
210+
// Grapheme cluster segmentation uses a completely different algorithm in
211+
// Unicode 9.0.
209212
internal struct _UnicodeExtendedGraphemeClusterSegmenter {
210213
let _noBoundaryRulesMatrix: UnsafePointer<UInt16>
211214

0 commit comments

Comments
 (0)