Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: source/i18n/collationfastlatin.h

Issue 1621843002: ICU 56 update step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/i18n/collationdatawriter.cpp ('k') | source/i18n/collationfastlatin.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/i18n/collationfastlatin.h
diff --git a/source/i18n/collationfastlatin.h b/source/i18n/collationfastlatin.h
index 4582eb1d10baa6fb58cdfc34c5d71d33991f4c4b..6a25c6692c901ded1d8022e277bcb4827aad3ee3 100644
--- a/source/i18n/collationfastlatin.h
+++ b/source/i18n/collationfastlatin.h
@@ -1,6 +1,6 @@
/*
*******************************************************************************
-* Copyright (C) 2013-2014, International Business Machines
+* Copyright (C) 2013-2015, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
* collationfastlatin.h
@@ -31,7 +31,7 @@ public:
* When the major version number of the main data format changes,
* we can reset this fast Latin version to 1.
*/
- static const uint16_t VERSION = 1;
+ static const uint16_t VERSION = 2;
static const int32_t LATIN_MAX = 0x17f;
static const int32_t LATIN_LIMIT = LATIN_MAX + 1;
@@ -252,7 +252,7 @@ private:
/*
* Format of the CollationFastLatin data table.
- * CollationFastLatin::VERSION = 1.
+ * CollationFastLatin::VERSION = 2.
*
* This table contains data for a Latin-text collation fastpath.
* The data is stored as an array of uint16_t which contains the following parts.
@@ -262,6 +262,12 @@ private:
* 7..0: length of the header
*
* uint16_t varTops[header length - 1]
+ * Version 2:
+ * varTops[m] is the highest CollationFastLatin long-primary weight
+ * of supported maxVariable group m
+ * (special reorder group space, punct, symbol, currency).
+ *
+ * Version 1:
* Each of these values maps the variable top lead byte of a supported maxVariable group
* to the highest CollationFastLatin long-primary weight.
* The values are stored in ascending order.
@@ -293,6 +299,16 @@ private:
* Each list is terminated by an entry with CONTR_CHAR_MASK.
* Each list starts with such an entry which also contains the default result
* for when there is no contraction match.
+ *
+ * -----------------
+ * Changes for version 2 (ICU 55)
+ *
+ * Special reorder groups do not necessarily start on whole primary lead bytes any more.
+ * Therefore, the varTops data has a new format:
+ * Version 1 stored the lead bytes of the highest root primaries for
+ * the maxVariable-supported special reorder groups.
+ * Now the top 16 bits would need to be stored,
+ * and it is simpler to store only the fast-Latin weights.
*/
U_NAMESPACE_END
« no previous file with comments | « source/i18n/collationdatawriter.cpp ('k') | source/i18n/collationfastlatin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698