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

Unified Diff: src/parsing/parser.cc

Issue 2233673003: Remove CONST_LEGACY VariableMode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index 1d19e42c9e7ccb6810fdda788cd1d17d9dbc3232..0d9b2bbb4fa22a5cf1659e4f101d80a0d9222bd2 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -1988,7 +1988,7 @@ Variable* Parser::Declare(Declaration* declaration,
DeclarationDescriptor::Kind declaration_kind,
VariableMode mode, InitializationFlag init, bool* ok,
Scope* scope) {
- DCHECK(IsDeclaredVariableMode(mode) && mode != CONST_LEGACY);
+ DCHECK(IsDeclaredVariableMode(mode));
VariableProxy* proxy = declaration->proxy();
DCHECK(proxy->raw_name() != NULL);
@@ -2049,8 +2049,7 @@ Variable* Parser::Declare(Declaration* declaration,
} else {
// The name was declared in this scope before; check for conflicting
// re-declarations. We have a conflict if either of the declarations
- // is not a var (in script scope, we also have to ignore legacy const
- // for compatibility). There is similar code in runtime.cc in the
+ // is not a var. There is similar code in runtime.cc in the
// Declare functions. The function CheckConflictingVarDeclarations
// checks for var and let bindings from different scopes whereas this
// is a check for conflicting declarations within the same scope. This

Powered by Google App Engine
This is Rietveld 408576698