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

Unified Diff: src/dateparser.h

Issue 2831016: [Isolates] Static mutable data of Scanner class moved to ScannerCharacterClasses / Isolate. (Closed)
Patch Set: . Created 10 years, 6 months 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/conversions.cc ('k') | src/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/dateparser.h
diff --git a/src/dateparser.h b/src/dateparser.h
index d999d9ca7ddd04a04aa4ef2a7f8c262a1f78c4df..6a2a33c1c45c8c6f40533683eaf8b5b3dde6e65e 100644
--- a/src/dateparser.h
+++ b/src/dateparser.h
@@ -69,7 +69,8 @@ class DateParser : public AllStatic {
explicit InputReader(Vector<Char> s)
: index_(0),
buffer_(s),
- has_read_number_(false) {
+ has_read_number_(false),
+ character_classes_(Isolate::Current()->scanner_character_classes()) {
Next();
}
@@ -102,7 +103,7 @@ class DateParser : public AllStatic {
bool Skip(uint32_t c) { return ch_ == c ? (Next(), true) : false; }
bool SkipWhiteSpace() {
- return Scanner::kIsWhiteSpace.get(ch_) ? (Next(), true) : false;
+ return character_classes_->IsWhiteSpace(ch_) ? (Next(), true) : false;
}
bool SkipParentheses() {
@@ -138,6 +139,7 @@ class DateParser : public AllStatic {
Vector<Char> buffer_;
bool has_read_number_;
uint32_t ch_;
+ ScannerCharacterClasses* character_classes_;
};
enum KeywordType { INVALID, MONTH_NAME, TIME_ZONE_NAME, AM_PM };
« no previous file with comments | « src/conversions.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698