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

Unified Diff: src/preparser.cc

Issue 1240273002: [strong] Keep language mode consistent (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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/parser.cc ('k') | no next file » | 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 2ea770849ed832302c9cac526bdbc3d9004b21d6..a26b2a8975052eb71f4b27f69b8dc238ccfe91c4 100644
--- a/src/preparser.cc
+++ b/src/preparser.cc
@@ -253,10 +253,10 @@ void PreParser::ParseStatementList(int end_token, bool* ok,
if (directive_prologue) {
if (statement.IsUseStrictLiteral()) {
scope_->SetLanguageMode(
- static_cast<LanguageMode>(scope_->language_mode() | STRICT_BIT));
+ static_cast<LanguageMode>(scope_->language_mode() | STRICT));
} else if (statement.IsUseStrongLiteral() && allow_strong_mode()) {
scope_->SetLanguageMode(static_cast<LanguageMode>(
- scope_->language_mode() | STRICT_BIT | STRONG_BIT));
+ scope_->language_mode() | STRONG));
} else if (!statement.IsStringLiteral()) {
directive_prologue = false;
}
@@ -1151,7 +1151,7 @@ PreParserExpression PreParser::ParseClassLiteral(
Scope* scope = NewScope(scope_, BLOCK_SCOPE);
BlockState block_state(&scope_, scope);
scope_->SetLanguageMode(
- static_cast<LanguageMode>(class_language_mode | STRICT_BIT));
+ static_cast<LanguageMode>(class_language_mode | STRICT));
// TODO(marja): Make PreParser use scope names too.
// scope_->SetScopeName(name);
« no previous file with comments | « src/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698