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

Unified Diff: src/prettyprinter.cc

Issue 938443002: [es6] implement spread calls (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase + clang-format Created 5 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
Index: src/prettyprinter.cc
diff --git a/src/prettyprinter.cc b/src/prettyprinter.cc
index 165e71721228ce6abae4820d27c50c52d53072d2..78b73d6add58dfe9aa738e238787011dab6ceb30 100644
--- a/src/prettyprinter.cc
+++ b/src/prettyprinter.cc
@@ -375,6 +375,13 @@ void CallPrinter::VisitCompareOperation(CompareOperation* node) {
}
+void CallPrinter::VisitSpread(Spread* node) {
+ Print("(...");
+ Find(node->expression(), true);
+ Print(")");
+}
+
+
void CallPrinter::VisitThisFunction(ThisFunction* node) {}
@@ -870,6 +877,13 @@ void PrettyPrinter::VisitCompareOperation(CompareOperation* node) {
}
+void PrettyPrinter::VisitSpread(Spread* node) {
+ Print("(...");
+ Visit(node->expression());
+ Print(")");
+}
+
+
void PrettyPrinter::VisitThisFunction(ThisFunction* node) {
Print("<this-function>");
}
@@ -1573,6 +1587,12 @@ void AstPrinter::VisitCompareOperation(CompareOperation* node) {
}
+void AstPrinter::VisitSpread(Spread* node) {
+ IndentedScope indent(this, "...");
+ Visit(node->expression());
+}
+
+
void AstPrinter::VisitThisFunction(ThisFunction* node) {
IndentedScope indent(this, "THIS-FUNCTION");
}
« no previous file with comments | « src/preparser.cc ('k') | src/runtime/runtime.h » ('j') | test/js-perf-test/JSTests.json » ('J')

Powered by Google App Engine
This is Rietveld 408576698