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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 919703003: WIP: Implement ES6 Spread-calls (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Flag calls as spread calls in parser, error on spread intrinsics/construct calls Created 5 years, 10 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
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index 50216a766c074ec10c30872e6cf9f842288101ac..bf2286b9496871496d7831a11ecfd2967b23b3c8 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -2225,6 +2225,20 @@ void AstGraphBuilder::VisitCompareOperation(CompareOperation* expr) {
}
+void AstGraphBuilder::VisitSpreadOperation(SpreadOperation* expr) {
+ LoopBuilder for_loop(this);
+ VisitForEffect(expr->assign_iterator());
+ for_loop.BeginLoop(NULL, false);
+ VisitForEffect(expr->next_result());
+ VisitForTest(expr->result_done());
+ Node* condition = environment()->Pop();
+ for_loop.BreakWhen(condition);
+ VisitForValue(expr->result_value());
Michael Starzinger 2015/02/16 19:58:58 I am not sure how this is supposed to work in the
caitp (gmail) 2015/02/16 21:41:51 I don't think I ever finished the AstGraphBuilder
+ for_loop.EndBody();
+ for_loop.EndLoop();
+}
+
+
void AstGraphBuilder::VisitThisFunction(ThisFunction* expr) {
Node* value = GetFunctionClosure();
ast_context()->ProduceValue(value);

Powered by Google App Engine
This is Rietveld 408576698