Skip to content

Commit

Permalink
[stdlib] Drop Unicode 8 tries in stdlib (entirely)
Browse files Browse the repository at this point in the history
This drops the last vestage of Unicode 8 tries from the standard
library. Switches everything over to use ICU.
  • Loading branch information
milseman committed Aug 8, 2017
1 parent ffb3807 commit 0b5ee16
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 659 deletions.
1 change: 0 additions & 1 deletion stdlib/public/core/CMakeLists.txt
Expand Up @@ -141,7 +141,6 @@ set(SWIFTLIB_ESSENTIAL
UnavailableStringAPIs.swift.gyb
UnicodeEncoding.swift
UnicodeParser.swift
UnicodeTrie.swift.gyb
Unmanaged.swift
UnsafeBitMap.swift
UnsafeBufferPointer.swift.gyb
Expand Down
1 change: 0 additions & 1 deletion stdlib/public/core/GroupInfo.json
Expand Up @@ -30,7 +30,6 @@
"UnicodeEncoding.swift",
"UnicodeParser.swift",
"UnicodeScalar.swift",
"UnicodeTrie.swift",
"UnavailableStringAPIs.swift",
"UTFEncoding.swift",
"UTF8.swift",
Expand Down
18 changes: 2 additions & 16 deletions stdlib/public/core/StringUnicodeScalarView.swift
Expand Up @@ -445,22 +445,8 @@ extension String.UnicodeScalarView {
return true
}
if !_isOnUnicodeScalarBoundary(i) { return false }
let precedingScalar = self[index(before: i)]

let graphemeClusterBreakProperty =
_UnicodeGraphemeClusterBreakPropertyTrie()
let segmenter = _UnicodeExtendedGraphemeClusterSegmenter()

let gcb0 = graphemeClusterBreakProperty.getPropertyRawValue(
precedingScalar.value)

if segmenter.isBoundaryAfter(gcb0) {
return true
}

let gcb1 = graphemeClusterBreakProperty.getPropertyRawValue(self[i].value)

return segmenter.isBoundary(gcb0, gcb1)
let str = String(_core)
return i == str.index(before: str.index(after: i))
}
}

Expand Down
240 changes: 0 additions & 240 deletions stdlib/public/core/UnicodeTrie.swift.gyb

This file was deleted.

2 changes: 1 addition & 1 deletion stdlib/public/stubs/CMakeLists.txt
Expand Up @@ -5,7 +5,7 @@ set(swift_stubs_sources
KeyPaths.cpp
LibcShims.cpp
Stubs.cpp
UnicodeExtendedGraphemeClusters.cpp.gyb)
)
set(swift_stubs_objc_sources
Availability.mm
FoundationHelpers.mm
Expand Down

0 comments on commit 0b5ee16

Please sign in to comment.