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

Unified Diff: src/prettyprinter.cc

Issue 1189743003: [destructuring] Implement parameter pattern matching. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 284beadfeedb5a7dc64472a6372a4091e6a42eff..8685781445a36c83d8fc6bd2c478ea72db24346e 100644
--- a/src/prettyprinter.cc
+++ b/src/prettyprinter.cc
@@ -993,7 +993,7 @@ void PrettyPrinter::PrintParameters(Scope* scope) {
Print("(");
for (int i = 0; i < scope->num_parameters(); i++) {
if (i > 0) Print(", ");
- PrintLiteral(scope->parameter(i)->name(), false);
+ PrintLiteral(scope->parameter_var(i)->name(), false);
}
Print(")");
}
@@ -1124,8 +1124,8 @@ void AstPrinter::PrintParameters(Scope* scope) {
if (scope->num_parameters() > 0) {
IndentedScope indent(this, "PARAMS");
for (int i = 0; i < scope->num_parameters(); i++) {
- PrintLiteralWithModeIndented("VAR", scope->parameter(i),
- scope->parameter(i)->name());
+ PrintLiteralWithModeIndented("VAR", scope->parameter_var(i),
+ scope->parameter_var(i)->name());
}
}
}

Powered by Google App Engine
This is Rietveld 408576698