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

Unified Diff: src/rewriter.cc

Issue 1177053006: [es6] Fix completion values of for loops with lexical variables (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: offline feedback Created 5 years, 6 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
« no previous file with comments | « src/prettyprinter.cc ('k') | test/mjsunit/es6/block-for.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/rewriter.cc
diff --git a/src/rewriter.cc b/src/rewriter.cc
index ee08d885f602f2d110e60a540cf7a0e4281ce241..c901653a2ba3c6aff53a4e13fb463f0a667c7ddf 100644
--- a/src/rewriter.cc
+++ b/src/rewriter.cc
@@ -83,7 +83,7 @@ void Processor::VisitBlock(Block* node) {
// with some JS VMs: For instance, using smjs, print(eval('var x = 7'))
// returns 'undefined'. To obtain the same behavior with v8, we need
// to prevent rewriting in that case.
- if (!node->is_initializer_block()) Process(node->statements());
+ if (!node->ignore_completion_value()) Process(node->statements());
}
« no previous file with comments | « src/prettyprinter.cc ('k') | test/mjsunit/es6/block-for.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698