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

Unified Diff: src/parsing/pattern-rewriter.cc

Issue 2519333005: Revert of [parser] Fix scopes in rewriting of for-of and destructuring assignments. (Closed)
Patch Set: Created 4 years, 1 month 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/parsing/parser.cc ('k') | test/cctest/interpreter/bytecode_expectations/Generators.golden » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/pattern-rewriter.cc
diff --git a/src/parsing/pattern-rewriter.cc b/src/parsing/pattern-rewriter.cc
index f3d9bb02a33bec518052372f713aec08ea3ef756..21b1cec69655c092b3c4e822ed3d14dd6987ccb6 100644
--- a/src/parsing/pattern-rewriter.cc
+++ b/src/parsing/pattern-rewriter.cc
@@ -37,12 +37,11 @@
void Parser::PatternRewriter::RewriteDestructuringAssignment(
Parser* parser, RewritableExpression* to_rewrite, Scope* scope) {
- DCHECK(!scope->HasBeenRemoved());
+ PatternRewriter rewriter;
+
DCHECK(!to_rewrite->is_rewritten());
bool ok = true;
-
- PatternRewriter rewriter;
rewriter.scope_ = scope;
rewriter.parser_ = parser;
rewriter.context_ = ASSIGNMENT;
@@ -587,9 +586,8 @@
Expression* closing_condition = factory()->NewUnaryOperation(
Token::NOT, factory()->NewVariableProxy(done), nopos);
-
- parser_->FinalizeIteratorUse(scope(), completion, closing_condition, iterator,
- block_, target);
+ parser_->FinalizeIteratorUse(completion, closing_condition, iterator, block_,
+ target);
block_ = target;
}
« no previous file with comments | « src/parsing/parser.cc ('k') | test/cctest/interpreter/bytecode_expectations/Generators.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698