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

Unified Diff: src/unicode.h

Issue 10975: Case folding mappings (Closed)
Patch Set: Replaced case folding with canonicalization Created 12 years, 1 month 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 | « src/runtime.cc ('k') | src/unicode.cc » ('j') | test/cctest/test-regexp.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/unicode.h
diff --git a/src/unicode.h b/src/unicode.h
index fd7dfbcd8a1a9560a4f016569c4bab9bf8830a46..d4c66f4401cec27a4cc63a5a2efe83cf0947c95c 100644
--- a/src/unicode.h
+++ b/src/unicode.h
@@ -44,7 +44,7 @@ typedef unsigned char byte;
* The max length of the result of converting the case of a single
* character.
*/
-static const int kMaxCaseConvertedSize = 3;
+static const int kMaxMappingSize = 4;
template <class T, int size = 256>
class Predicate {
@@ -85,7 +85,7 @@ class Mapping {
: code_point_(code_point),
offset_(offset) { }
uchar code_point_ : 21;
- signed offset_ : 11;
+ signed offset_ : 21;
};
static const int kSize = size;
static const int kMask = kSize - 1;
@@ -222,45 +222,15 @@ struct Letter {
struct Space {
static bool Is(uchar c);
};
-struct Titlecase {
- static bool Is(uchar c);
-};
struct Number {
static bool Is(uchar c);
};
-struct DecimalDigit {
- static bool Is(uchar c);
-};
-struct Ideographic {
- static bool Is(uchar c);
-};
struct WhiteSpace {
static bool Is(uchar c);
};
-struct HexDigit {
- static bool Is(uchar c);
-};
-struct AsciiHexDigit {
- static bool Is(uchar c);
-};
-struct BidiControl {
- static bool Is(uchar c);
-};
-struct JoinControl {
- static bool Is(uchar c);
-};
-struct Dash {
- static bool Is(uchar c);
-};
-struct Hyphen {
- static bool Is(uchar c);
-};
struct LineTerminator {
static bool Is(uchar c);
};
-struct RegExpSpecialChar {
- static bool Is(uchar c);
-};
struct CombiningMark {
static bool Is(uchar c);
};
@@ -279,6 +249,18 @@ struct ToUppercase {
uchar* result,
bool* allow_caching_ptr);
};
+struct Ecma262Canonicalize {
+ static int Convert(uchar c,
+ uchar n,
+ uchar* result,
+ bool* allow_caching_ptr);
+};
+struct Ecma262UnCanonicalize {
+ static int Convert(uchar c,
+ uchar n,
+ uchar* result,
+ bool* allow_caching_ptr);
+};
} // namespace unibrow
« no previous file with comments | « src/runtime.cc ('k') | src/unicode.cc » ('j') | test/cctest/test-regexp.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698