diff options
Diffstat (limited to 'deps/v8/src/unicode.cc')
-rw-r--r-- | deps/v8/src/unicode.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/deps/v8/src/unicode.cc b/deps/v8/src/unicode.cc index 04065b0479..bd32467786 100644 --- a/deps/v8/src/unicode.cc +++ b/deps/v8/src/unicode.cc @@ -52,14 +52,17 @@ static inline uchar TableGet(const int32_t* table, int index) { return table[D * index]; } + static inline uchar GetEntry(int32_t entry) { return entry & (kStartBit - 1); } + static inline bool IsStart(int32_t entry) { return (entry & kStartBit) != 0; } + /** * Look up a character in the unicode table using a mix of binary and * interpolation search. For a uniformly distributed array @@ -106,6 +109,7 @@ struct MultiCharacterSpecialCase { uchar chars[kW]; }; + // Look up the mapping for the given character in the specified table, // which is of the specified length and uses the specified special case // mapping for multi-char mappings. The next parameter is the character @@ -456,6 +460,7 @@ bool Uppercase::Is(uchar c) { } } + // Lowercase: point.category == 'Ll' static const uint16_t kLowercaseTable0Size = 463; @@ -567,6 +572,7 @@ bool Lowercase::Is(uchar c) { } } + // Letter: point.category in ['Lu', 'Ll', 'Lt', 'Lm', 'Lo', 'Nl' ] static const uint16_t kLetterTable0Size = 435; @@ -703,6 +709,7 @@ bool Letter::Is(uchar c) { } } + // Space: point.category == 'Zs' static const uint16_t kSpaceTable0Size = 4; @@ -724,6 +731,7 @@ bool Space::Is(uchar c) { } } + // Number: point.category == 'Nd' static const uint16_t kNumberTable0Size = 56; @@ -758,6 +766,7 @@ bool Number::Is(uchar c) { } } + // WhiteSpace: 'Ws' in point.properties static const uint16_t kWhiteSpaceTable0Size = 7; @@ -779,6 +788,7 @@ bool WhiteSpace::Is(uchar c) { } } + // LineTerminator: 'Lt' in point.properties static const uint16_t kLineTerminatorTable0Size = 2; @@ -800,6 +810,7 @@ bool LineTerminator::Is(uchar c) { } } + // CombiningMark: point.category in ['Mn', 'Mc'] static const uint16_t kCombiningMarkTable0Size = 258; @@ -871,6 +882,7 @@ bool CombiningMark::Is(uchar c) { } } + // ConnectorPunctuation: point.category == 'Pc' static const uint16_t kConnectorPunctuationTable0Size = 1; |