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

Unified Diff: src/parsing/parser.cc

Issue 1968753004: [cleanup] Split ForOf and ForIn AST nodes apart as they share little (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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/crankshaft/typing.cc ('k') | no next file » | 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 3fa6b27451d3db083677117ede77cd0024ad7a8d..29d47b478f509577488dacaccd5979e2635d2cef 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -3112,7 +3112,7 @@ void Parser::InitializeForEachStatement(ForEachStatement* stmt,
body = block;
each = factory()->NewVariableProxy(temp);
}
- stmt->Initialize(each, subject, body);
+ stmt->AsForInStatement()->Initialize(each, subject, body);
}
}
@@ -3169,8 +3169,8 @@ void Parser::InitializeForOfStatement(ForOfStatement* for_of, Expression* each,
}
}
- for_of->Initialize(each, iterable, body, iterator, assign_iterator,
- next_result, result_done, assign_each);
+ for_of->Initialize(body, iterator, assign_iterator, next_result, result_done,
+ assign_each);
}
Statement* Parser::DesugarLexicalBindingsInForStatement(
« no previous file with comments | « src/crankshaft/typing.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698