| Index: src/unicode.h
|
| ===================================================================
|
| --- src/unicode.h (revision 830)
|
| +++ src/unicode.h (working copy)
|
| @@ -44,7 +44,7 @@
|
| * 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 {
|
| @@ -80,12 +80,13 @@
|
| friend class Test;
|
| int CalculateValue(uchar c, uchar n, uchar* result);
|
| struct CacheEntry {
|
| - inline CacheEntry() : code_point_(0), offset_(0) { }
|
| + inline CacheEntry() : code_point_(kNoChar), offset_(0) { }
|
| inline CacheEntry(uchar code_point, signed offset)
|
| : code_point_(code_point),
|
| offset_(offset) { }
|
| - uchar code_point_ : 21;
|
| - signed offset_ : 11;
|
| + uchar code_point_;
|
| + signed offset_;
|
| + static const int kNoChar = (1 << 21) - 1;
|
| };
|
| static const int kSize = size;
|
| static const int kMask = kSize - 1;
|
| @@ -222,45 +223,15 @@
|
| 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);
|
| };
|
| @@ -268,17 +239,40 @@
|
| static bool Is(uchar c);
|
| };
|
| struct ToLowercase {
|
| + static const int kMaxWidth = 3;
|
| static int Convert(uchar c,
|
| uchar n,
|
| uchar* result,
|
| bool* allow_caching_ptr);
|
| };
|
| struct ToUppercase {
|
| + static const int kMaxWidth = 3;
|
| static int Convert(uchar c,
|
| uchar n,
|
| uchar* result,
|
| bool* allow_caching_ptr);
|
| };
|
| +struct Ecma262Canonicalize {
|
| + static const int kMaxWidth = 1;
|
| + static int Convert(uchar c,
|
| + uchar n,
|
| + uchar* result,
|
| + bool* allow_caching_ptr);
|
| +};
|
| +struct Ecma262UnCanonicalize {
|
| + static const int kMaxWidth = 4;
|
| + static int Convert(uchar c,
|
| + uchar n,
|
| + uchar* result,
|
| + bool* allow_caching_ptr);
|
| +};
|
| +struct CanonicalizationRange {
|
| + static const int kMaxWidth = 1;
|
| + static int Convert(uchar c,
|
| + uchar n,
|
| + uchar* result,
|
| + bool* allow_caching_ptr);
|
| +};
|
|
|
| } // namespace unibrow
|
|
|
|
|