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

Side by Side Diff: src/ast/prettyprinter.cc

Issue 2209573002: Separate Scope into DeclarationScope and Scope (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move has_simple_parameters_ to DeclarationScope Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/ast/prettyprinter.h" 5 #include "src/ast/prettyprinter.h"
6 6
7 #include <stdarg.h> 7 #include <stdarg.h>
8 8
9 #include "src/ast/ast-value-factory.h" 9 #include "src/ast/ast-value-factory.h"
10 #include "src/ast/scopes.h" 10 #include "src/ast/scopes.h"
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 680
681 void AstPrinter::PrintDeclarations(ZoneList<Declaration*>* declarations) { 681 void AstPrinter::PrintDeclarations(ZoneList<Declaration*>* declarations) {
682 if (declarations->length() > 0) { 682 if (declarations->length() > 0) {
683 IndentedScope indent(this, "DECLS"); 683 IndentedScope indent(this, "DECLS");
684 for (int i = 0; i < declarations->length(); i++) { 684 for (int i = 0; i < declarations->length(); i++) {
685 Visit(declarations->at(i)); 685 Visit(declarations->at(i));
686 } 686 }
687 } 687 }
688 } 688 }
689 689
690 690 void AstPrinter::PrintParameters(DeclarationScope* scope) {
691 void AstPrinter::PrintParameters(Scope* scope) {
692 if (scope->num_parameters() > 0) { 691 if (scope->num_parameters() > 0) {
693 IndentedScope indent(this, "PARAMS"); 692 IndentedScope indent(this, "PARAMS");
694 for (int i = 0; i < scope->num_parameters(); i++) { 693 for (int i = 0; i < scope->num_parameters(); i++) {
695 PrintLiteralWithModeIndented("VAR", scope->parameter(i), 694 PrintLiteralWithModeIndented("VAR", scope->parameter(i),
696 scope->parameter(i)->name()); 695 scope->parameter(i)->name());
697 } 696 }
698 } 697 }
699 } 698 }
700 699
701 700
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 1189
1191 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { 1190 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) {
1192 Visit(node->expression()); 1191 Visit(node->expression());
1193 } 1192 }
1194 1193
1195 1194
1196 #endif // DEBUG 1195 #endif // DEBUG
1197 1196
1198 } // namespace internal 1197 } // namespace internal
1199 } // namespace v8 1198 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/prettyprinter.h ('k') | src/ast/scopeinfo.cc » ('j') | src/ast/scopes.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698