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

Unified Diff: src/unicode.h

Issue 11349: Character range uncanonicalization. (Closed)
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
« no previous file with comments | « src/jsregexp.cc ('k') | src/unicode.cc » ('j') | no next file with comments »
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 fc4003d32395bdeeeb2546a5641bb3550f3cf8a2..e9b92bfdb6397a4c3a9c517ab4e88ef1bfaa5e1f 100644
--- a/src/unicode.h
+++ b/src/unicode.h
@@ -80,12 +80,13 @@ class Mapping {
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_ : 21;
+ static const int kNoChar = (1 << 21) - 1;
};
static const int kSize = size;
static const int kMask = kSize - 1;
@@ -265,6 +266,13 @@ struct Ecma262UnCanonicalize {
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
« no previous file with comments | « src/jsregexp.cc ('k') | src/unicode.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698