Commit Graph

5 Commits

Author SHA1 Message Date
Julian Yap
a95dbabb34 Fix spelling 2015-12-03 10:49:19 -10:00
Dmitri Hrybenko
313cfcaaa7 Unicode trie generator: add tests for the generator itself that use non-default
trie parameters and fix a few bugs

The bugs did not affect correctness of the particular instance of trie created
for grapheme cluster property, because trie parameters that were confused with
each other happened to be equal.

Also, fix a trie size bug: we were creating a trie large enough to store
information for 0x200000 code points, but there are only 0x10ffff.  It saved
only 15 bytes in the grapheme cluster tree, because that extra information was
compressed with some supplementary planes that also had default values.  This
also improved trie generation time by almost 2x.


Swift SVN r19457
2014-07-02 10:29:52 +00:00
Dmitri Hrybenko
d33a09920d Unicode trie generator: improve comments and function names
Swift SVN r19398
2014-07-01 13:18:26 +00:00
Dmitri Hrybenko
ff37a42920 Unicode tables: DRY in GraphemeClusterBreakPropertyTable.symbolic_values
Swift SVN r19397
2014-07-01 13:18:24 +00:00
Dmitri Hrybenko
4814e00fda stdlib/String: implement Unicode extended grapheme cluster segmentation
algorithm

The implementation uses a specialized trie that has not been tuned to the table
data.  I tried guessing parameter values that should work well, but did not do
any performance measurements.

There is no efficient way to initialize arrays with static data in Swift.  The
required tables are being generated as C++ code in the runtime library.

rdar://16013860


Swift SVN r19340
2014-06-30 14:38:53 +00:00