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

Unified Diff: src/parser.cc

Issue 11759008: Introduce ENABLE_LATIN_1 compile flag (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix FilterASCII Created 7 years, 11 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/objects-inl.h ('k') | src/runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index 6365e41a75fd9da380b173ba6b2d32590f3426f5..f6f84622e42e49386c8ad7bd8f6068ae1b1b1b3d 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -255,7 +255,7 @@ Handle<String> Parser::LookupSymbol(int symbol_id) {
>= static_cast<unsigned>(symbol_cache_.length())) {
if (scanner().is_literal_ascii()) {
return isolate()->factory()->LookupOneByteSymbol(
- scanner().literal_ascii_string());
+ Vector<const uint8_t>::cast(scanner().literal_ascii_string()));
} else {
return isolate()->factory()->LookupTwoByteSymbol(
scanner().literal_utf16_string());
@@ -276,7 +276,7 @@ Handle<String> Parser::LookupCachedSymbol(int symbol_id) {
if (result.is_null()) {
if (scanner().is_literal_ascii()) {
result = isolate()->factory()->LookupOneByteSymbol(
- scanner().literal_ascii_string());
+ Vector<const uint8_t>::cast(scanner().literal_ascii_string()));
} else {
result = isolate()->factory()->LookupTwoByteSymbol(
scanner().literal_utf16_string());
@@ -1429,7 +1429,7 @@ Statement* Parser::ParseExportDeclaration(bool* ok) {
case Token::IDENTIFIER: {
Handle<String> name = ParseIdentifier(CHECK_OK);
// Handle 'module' as a context-sensitive keyword.
- if (!name->IsEqualTo(CStrVector("module"))) {
+ if (!name->IsOneByteEqualTo(STATIC_ASCII_VECTOR("module"))) {
names.Add(name, zone());
while (peek() == Token::COMMA) {
Consume(Token::COMMA);
@@ -4711,7 +4711,7 @@ void Parser::ExpectContextualKeyword(const char* keyword, bool* ok) {
if (!*ok) return;
Handle<String> symbol = GetSymbol(ok);
if (!*ok) return;
- if (!symbol->IsEqualTo(CStrVector(keyword))) {
+ if (!symbol->IsUtf8EqualTo(CStrVector(keyword))) {
*ok = false;
ReportUnexpectedToken(scanner().current_token());
}
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698