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

Unified Diff: src/preparser.cc

Issue 198713002: move remaining uses of scanner literals into scanner (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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/preparser.h ('k') | src/scanner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.cc
diff --git a/src/preparser.cc b/src/preparser.cc
index 8865c505bf61a8b9b0a897af7518e1b1e92734d5..bd10db3d016749653d7b88faefe4f7593e3d051f 100644
--- a/src/preparser.cc
+++ b/src/preparser.cc
@@ -1164,14 +1164,7 @@ PreParser::Expression PreParser::ParseFunctionLiteral(
reserved_error_loc = scanner()->location();
}
- int prev_value;
- if (scanner()->is_literal_one_byte()) {
- prev_value = duplicate_finder.AddAsciiSymbol(
- scanner()->literal_one_byte_string(), 1);
- } else {
- prev_value =
- duplicate_finder.AddUtf16Symbol(scanner()->literal_utf16_string(), 1);
- }
+ int prev_value = scanner()->FindSymbol(&duplicate_finder, 1);
if (!dupe_error_loc.IsValid() && prev_value != 0) {
dupe_error_loc = scanner()->location();
@@ -1273,12 +1266,7 @@ PreParser::Expression PreParser::ParseV8Intrinsic(bool* ok) {
void PreParser::LogSymbol() {
- int identifier_pos = position();
- if (scanner()->is_literal_one_byte()) {
- log_->LogAsciiSymbol(identifier_pos, scanner()->literal_one_byte_string());
- } else {
- log_->LogUtf16Symbol(identifier_pos, scanner()->literal_utf16_string());
- }
+ scanner()->LogSymbol(log_, position());
}
« no previous file with comments | « src/preparser.h ('k') | src/scanner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698