mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Introduce shims for using UBreakIterators from ICU. Also introduce shims for using thread local storage via pthreads. We will be relying on ICU and UBreakIterators for grapheme breaking. But, UBreakIterators are very expensive to create, especially for the way we do grapheme breaking, which is relatively stateless. Thus, we will stash one or more into thread local storage and reset it as needed. Note: Currently, pthread_key_t is hard coded for a single platform (Darwin), but I have a static_assert alongside directions on how to adapt it to any future platforms who differ in key type.
13 KiB
13 KiB