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

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

Issue 2452403003: Changed statement ZoneList to a ZoneChunkList
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « src/ast/prettyprinter.h ('k') | src/compiler/instruction.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 379
380 void CallPrinter::VisitSuperCallReference(SuperCallReference* node) { 380 void CallPrinter::VisitSuperCallReference(SuperCallReference* node) {
381 Print("super"); 381 Print("super");
382 } 382 }
383 383
384 384
385 void CallPrinter::VisitRewritableExpression(RewritableExpression* node) { 385 void CallPrinter::VisitRewritableExpression(RewritableExpression* node) {
386 Find(node->expression()); 386 Find(node->expression());
387 } 387 }
388 388
389 389 void CallPrinter::FindStatements(ZoneChunkList<Statement*>* statements) {
390 void CallPrinter::FindStatements(ZoneList<Statement*>* statements) {
391 if (statements == NULL) return; 390 if (statements == NULL) return;
392 for (int i = 0; i < statements->length(); i++) { 391 for (Statement* statement : *statements) {
393 Find(statements->at(i)); 392 Find(statement);
394 } 393 }
395 } 394 }
396 395
397 396
398 void CallPrinter::FindArguments(ZoneList<Expression*>* arguments) { 397 void CallPrinter::FindArguments(ZoneList<Expression*>* arguments) {
399 if (found_) return; 398 if (found_) return;
400 for (int i = 0; i < arguments->length(); i++) { 399 for (int i = 0; i < arguments->length(); i++) {
401 Find(arguments->at(i)); 400 Find(arguments->at(i));
402 } 401 }
403 } 402 }
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 void AstPrinter::PrintParameters(DeclarationScope* scope) { 674 void AstPrinter::PrintParameters(DeclarationScope* scope) {
676 if (scope->num_parameters() > 0) { 675 if (scope->num_parameters() > 0) {
677 IndentedScope indent(this, "PARAMS"); 676 IndentedScope indent(this, "PARAMS");
678 for (int i = 0; i < scope->num_parameters(); i++) { 677 for (int i = 0; i < scope->num_parameters(); i++) {
679 PrintLiteralWithModeIndented("VAR", scope->parameter(i), 678 PrintLiteralWithModeIndented("VAR", scope->parameter(i),
680 scope->parameter(i)->name()); 679 scope->parameter(i)->name());
681 } 680 }
682 } 681 }
683 } 682 }
684 683
685 684 void AstPrinter::PrintStatements(ZoneChunkList<Statement*>* statements) {
686 void AstPrinter::PrintStatements(ZoneList<Statement*>* statements) { 685 for (Statement* statement : *statements) {
687 for (int i = 0; i < statements->length(); i++) { 686 Visit(statement);
688 Visit(statements->at(i));
689 } 687 }
690 } 688 }
691 689
692 690
693 void AstPrinter::PrintArguments(ZoneList<Expression*>* arguments) { 691 void AstPrinter::PrintArguments(ZoneList<Expression*>* arguments) {
694 for (int i = 0; i < arguments->length(); i++) { 692 for (int i = 0; i < arguments->length(); i++) {
695 Visit(arguments->at(i)); 693 Visit(arguments->at(i));
696 } 694 }
697 } 695 }
698 696
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
1202 1200
1203 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { 1201 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) {
1204 Visit(node->expression()); 1202 Visit(node->expression());
1205 } 1203 }
1206 1204
1207 1205
1208 #endif // DEBUG 1206 #endif // DEBUG
1209 1207
1210 } // namespace internal 1208 } // namespace internal
1211 } // namespace v8 1209 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/prettyprinter.h ('k') | src/compiler/instruction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698