Chromium Code Reviews| Index: src/ast/scopes.cc |
| diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc |
| index 175eb99b39de3c4e1686b29c4eb09d4a29077fe2..2c9c24fa23de93d705d492e434c61397cfc1fa85 100644 |
| --- a/src/ast/scopes.cc |
| +++ b/src/ast/scopes.cc |
| @@ -1083,8 +1083,14 @@ void Scope::DeclareVariableName(const AstRawString* name, VariableMode mode) { |
| // Declare the variable in the declaration scope. |
| if (FLAG_preparser_scope_analysis) { |
| Variable* var = LookupLocal(name); |
| + DCHECK(var != kDummyPreParserLexicalVariable); |
|
vogelheim
2017/01/27 15:56:56
nitpick: DCHECK_NE (and DCHECK_EQ below).
(Doesn'
marja
2017/01/27 16:00:37
Done.
|
| + DCHECK(var != kDummyPreParserVariable); |
| if (var == nullptr) { |
| var = DeclareLocal(name, mode); |
| + } else if (!IsLexicalVariableMode(var->mode()) && |
| + !IsLexicalVariableMode(mode)) { |
| + DCHECK(mode == VAR); |
| + var->set_maybe_assigned(); |
| } |
| var->set_is_used(); |
| } else { |