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

Unified Diff: src/parsing/rewriter.cc

Issue 2167713004: Always finalize blocks after parsing, also for do-expressions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« src/parsing/rewriter.h ('K') | « src/parsing/rewriter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/rewriter.cc
diff --git a/src/parsing/rewriter.cc b/src/parsing/rewriter.cc
index 9a7627e3094bfa663a1119e807602a7797c8fa8f..c5e4452ed7c1cde6adfdb72390c282fc82c4d1e8 100644
--- a/src/parsing/rewriter.cc
+++ b/src/parsing/rewriter.cc
@@ -362,11 +362,10 @@ bool Rewriter::Rewrite(ParseInfo* info) {
return true;
}
-
-bool Rewriter::Rewrite(Parser* parser, DoExpression* expr,
+bool Rewriter::Rewrite(Parser* parser, Scope* outer_scope, DoExpression* expr,
AstValueFactory* factory) {
Block* block = expr->block();
- Scope* scope = block->scope();
+ Scope* scope = block->scope() == nullptr ? outer_scope : block->scope();
adamk 2016/07/21 17:15:41 Why should we ever use the block scope here? By yo
ZoneList<Statement*>* body = block->statements();
VariableProxy* result = expr->result();
Variable* result_var = result->var();
« src/parsing/rewriter.h ('K') | « src/parsing/rewriter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698