Index: src/scanner.cc |
diff --git a/src/scanner.cc b/src/scanner.cc |
index 0709939dbac8b142a3ad81a2ea948fa681179b34..67d8fa0f49a33667d0904c0843f7b61537ba1e23 100644 |
--- a/src/scanner.cc |
+++ b/src/scanner.cc |
@@ -1018,11 +1018,15 @@ static Token::Value KeywordOrIdentifierToken(const uint8_t* input, |
bool Scanner::IdentifierIsFutureStrictReserved( |
const AstRawString* string) const { |
// Keywords are always 1-byte strings. |
- return string->is_one_byte() && |
- Token::FUTURE_STRICT_RESERVED_WORD == |
- KeywordOrIdentifierToken(string->raw_data(), string->length(), |
- harmony_scoping_, harmony_modules_, |
- harmony_classes_); |
+ if (!string->is_one_byte()) return false; |
+ if (string->IsOneByteEqualTo("let") || string->IsOneByteEqualTo("static") || |
+ string->IsOneByteEqualTo("yield")) { |
+ return true; |
+ } |
+ return Token::FUTURE_STRICT_RESERVED_WORD == |
+ KeywordOrIdentifierToken(string->raw_data(), string->length(), |
+ harmony_scoping_, harmony_modules_, |
+ harmony_classes_); |
} |