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

Unified Diff: src/prettyprinter.cc

Issue 938443002: [es6] implement spread calls (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add construct support, clean out some gunk 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/prettyprinter.cc
diff --git a/src/prettyprinter.cc b/src/prettyprinter.cc
index 8a260bd6514d891ccaba432139b26e1db6e9663a..ea497ec6d4cd2143cb2e98ed811fa286c390e13c 100644
--- a/src/prettyprinter.cc
+++ b/src/prettyprinter.cc
@@ -381,6 +381,13 @@ void CallPrinter::VisitCompareOperation(CompareOperation* node) {
}
+void CallPrinter::VisitSpreadOperation(SpreadOperation* node) {
+ Print("(...");
+ Find(node->expression(), true);
+ Print(")");
+}
+
+
void CallPrinter::VisitThisFunction(ThisFunction* node) {}
@@ -883,6 +890,13 @@ void PrettyPrinter::VisitCompareOperation(CompareOperation* node) {
}
+void PrettyPrinter::VisitSpreadOperation(SpreadOperation* node) {
+ Print("(...");
+ Visit(node->expression());
+ Print(")");
+}
+
+
void PrettyPrinter::VisitThisFunction(ThisFunction* node) {
Print("<this-function>");
}
@@ -1593,6 +1607,12 @@ void AstPrinter::VisitCompareOperation(CompareOperation* node) {
}
+void AstPrinter::VisitSpreadOperation(SpreadOperation* node) {
+ IndentedScope indent(this, "...");
+ Visit(node->expression());
+}
+
+
void AstPrinter::VisitThisFunction(ThisFunction* node) {
IndentedScope indent(this, "THIS-FUNCTION");
}

Powered by Google App Engine
This is Rietveld 408576698