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()); |
} |