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

Unified Diff: src/ast/prettyprinter.cc

Issue 2457393003: Thread decls-list through Declaration (Closed)
Patch Set: rebase Created 4 years, 1 month 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/ast/prettyprinter.h ('k') | src/ast/scopes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/prettyprinter.cc
diff --git a/src/ast/prettyprinter.cc b/src/ast/prettyprinter.cc
index 19e9478da27a18f38fbbb7e6eb6279e84e873c8b..a3fc50ae571d8cfa9e434880e5b6b88c8c77b8cf 100644
--- a/src/ast/prettyprinter.cc
+++ b/src/ast/prettyprinter.cc
@@ -662,13 +662,10 @@ void AstPrinter::PrintOut(Isolate* isolate, AstNode* node) {
PrintF("%s", printer.output_);
}
-
-void AstPrinter::PrintDeclarations(ZoneList<Declaration*>* declarations) {
- if (declarations->length() > 0) {
+void AstPrinter::PrintDeclarations(Declaration::List* declarations) {
+ if (!declarations->is_empty()) {
IndentedScope indent(this, "DECLS");
- for (int i = 0; i < declarations->length(); i++) {
- Visit(declarations->at(i));
- }
+ for (Declaration* decl : *declarations) Visit(decl);
}
}
« no previous file with comments | « src/ast/prettyprinter.h ('k') | src/ast/scopes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698