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

Unified Diff: src/scanner.cc

Issue 6824071: Cleanup of ScannerConstants, now named UnicodeCache. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed review comments. Created 9 years, 8 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/scanner.h ('k') | src/scanner-base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scanner.cc
diff --git a/src/scanner.cc b/src/scanner.cc
index d9c2188cdad75ad4c2fa9690261b34f3302f3c95..666818e39543162a435d692e0140ac19491ff8c3 100755
--- a/src/scanner.cc
+++ b/src/scanner.cc
@@ -1,4 +1,4 @@
-// Copyright 2010 the V8 project authors. All rights reserved.
+// Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -345,8 +345,8 @@ void V8JavaScriptScanner::Initialize(UC16CharacterStream* source) {
// ----------------------------------------------------------------------------
// JsonScanner
-JsonScanner::JsonScanner(ScannerConstants* scanner_constants)
- : Scanner(scanner_constants) { }
+JsonScanner::JsonScanner(UnicodeCache* unicode_cache)
+ : Scanner(unicode_cache) { }
void JsonScanner::Initialize(UC16CharacterStream* source) {
@@ -560,7 +560,8 @@ Token::Value JsonScanner::ScanJsonNumber() {
}
literal.Complete();
ASSERT_NOT_NULL(next_.literal_chars);
- number_ = StringToDouble(next_.literal_chars->ascii_literal(),
+ number_ = StringToDouble(unicode_cache_,
+ next_.literal_chars->ascii_literal(),
NO_FLAGS, // Hex, octal or trailing junk.
OS::nan_value());
return Token::NUMBER;
@@ -575,7 +576,7 @@ Token::Value JsonScanner::ScanJsonIdentifier(const char* text,
Advance();
text++;
}
- if (scanner_constants_->IsIdentifierPart(c0_)) return Token::ILLEGAL;
+ if (unicode_cache_->IsIdentifierPart(c0_)) return Token::ILLEGAL;
literal.Complete();
return token;
}
« no previous file with comments | « src/scanner.h ('k') | src/scanner-base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698