Chromium Code Reviews| Index: src/pattern-rewriter.cc |
| diff --git a/src/pattern-rewriter.cc b/src/pattern-rewriter.cc |
| index 4bfeae4400ef2b75e5f35c2a7cf07a095828a79d..51cc33998da866d8293283dd1c3db68fc7365efe 100644 |
| --- a/src/pattern-rewriter.cc |
| +++ b/src/pattern-rewriter.cc |
| @@ -175,7 +175,7 @@ void Parser::PatternRewriter::VisitVariableProxy(VariableProxy* pattern) { |
| factory()->NewExpressionStatement(initialize, RelocInfo::kNoPosition), |
| zone()); |
| } |
| - } else if (value != nullptr && (descriptor_->needs_init || |
| + } else if (value != nullptr && (descriptor_->mode == CONST_LEGACY || |
|
adamk
2015/10/05 22:17:51
I like this better, too; the old code is very odd
|
| IsLexicalVariableMode(descriptor_->mode))) { |
| // Constant initializations always assign to the declared constant which |
| // is always at the function scope level. This is only relevant for |