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

Unified Diff: src/parsing/parser.cc

Issue 1914393002: [es6] Don't eliminate tail calls from for-in and for-of bodies. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | test/mjsunit/es6/tail-call.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index ea5072e27d7b5c071b0a91ee86db353b3d1e3a31..3549cca365e8f77393a38ca0c3aea39daed8e112 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -3555,6 +3555,8 @@ Statement* Parser::ParseForStatement(ZoneList<const AstRawString*>* labels,
factory()->NewBlock(NULL, 3, false, RelocInfo::kNoPosition);
{
+ DontCollectExpressionsInTailPositionScope no_tail_calls(
+ function_state_);
BlockState block_state(&scope_, body_scope);
Statement* body = ParseScopedStatement(NULL, true, CHECK_OK);
« no previous file with comments | « no previous file | test/mjsunit/es6/tail-call.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698