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

Unified Diff: src/unicode.h

Issue 12427: Merge regexp2000 back into bleeding_edge (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: 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
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

Powered by Google App Engine
This is Rietveld 408576698