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

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

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/ast-traversal-visitor.h ('k') | src/ast/prettyprinter.cc » ('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 #ifndef V8_AST_PRETTYPRINTER_H_ 5 #ifndef V8_AST_PRETTYPRINTER_H_
6 #define V8_AST_PRETTYPRINTER_H_ 6 #define V8_AST_PRETTYPRINTER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/ast/ast.h" 9 #include "src/ast/ast.h"
10 #include "src/base/compiler-specific.h" 10 #include "src/base/compiler-specific.h"
(...skipping 27 matching lines...) Expand all
38 int position_; // position of ast node to print 38 int position_; // position of ast node to print
39 bool found_; 39 bool found_;
40 bool done_; 40 bool done_;
41 bool is_builtin_; 41 bool is_builtin_;
42 42
43 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); 43 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
44 44
45 protected: 45 protected:
46 void PrintLiteral(Handle<Object> value, bool quote); 46 void PrintLiteral(Handle<Object> value, bool quote);
47 void PrintLiteral(const AstRawString* value, bool quote); 47 void PrintLiteral(const AstRawString* value, bool quote);
48 void FindStatements(ZoneList<Statement*>* statements); 48 void FindStatements(ZoneChunkList<Statement*>* statements);
49 void FindArguments(ZoneList<Expression*>* arguments); 49 void FindArguments(ZoneList<Expression*>* arguments);
50 }; 50 };
51 51
52 52
53 #ifdef DEBUG 53 #ifdef DEBUG
54 54
55 class AstPrinter final : public AstVisitor<AstPrinter> { 55 class AstPrinter final : public AstVisitor<AstPrinter> {
56 public: 56 public:
57 explicit AstPrinter(Isolate* isolate); 57 explicit AstPrinter(Isolate* isolate);
58 ~AstPrinter(); 58 ~AstPrinter();
(...skipping 17 matching lines...) Expand all
76 friend class IndentedScope; 76 friend class IndentedScope;
77 77
78 void Init(); 78 void Init();
79 79
80 void PrintLabels(ZoneList<const AstRawString*>* labels); 80 void PrintLabels(ZoneList<const AstRawString*>* labels);
81 void PrintLiteral(const AstRawString* value, bool quote); 81 void PrintLiteral(const AstRawString* value, bool quote);
82 void PrintLiteral(Handle<Object> value, bool quote); 82 void PrintLiteral(Handle<Object> value, bool quote);
83 void PrintIndented(const char* txt); 83 void PrintIndented(const char* txt);
84 void PrintIndentedVisit(const char* s, AstNode* node); 84 void PrintIndentedVisit(const char* s, AstNode* node);
85 85
86 void PrintStatements(ZoneList<Statement*>* statements); 86 void PrintStatements(ZoneChunkList<Statement*>* statements);
87 void PrintDeclarations(ZoneList<Declaration*>* declarations); 87 void PrintDeclarations(ZoneList<Declaration*>* declarations);
88 void PrintParameters(DeclarationScope* scope); 88 void PrintParameters(DeclarationScope* scope);
89 void PrintArguments(ZoneList<Expression*>* arguments); 89 void PrintArguments(ZoneList<Expression*>* arguments);
90 void PrintCaseClause(CaseClause* clause); 90 void PrintCaseClause(CaseClause* clause);
91 void PrintLiteralIndented(const char* info, Handle<Object> value, bool quote); 91 void PrintLiteralIndented(const char* info, Handle<Object> value, bool quote);
92 void PrintLiteralWithModeIndented(const char* info, 92 void PrintLiteralWithModeIndented(const char* info,
93 Variable* var, 93 Variable* var,
94 Handle<Object> value); 94 Handle<Object> value);
95 void PrintLabelsIndented(ZoneList<const AstRawString*>* labels); 95 void PrintLabelsIndented(ZoneList<const AstRawString*>* labels);
96 void PrintObjectProperties(ZoneList<ObjectLiteral::Property*>* properties); 96 void PrintObjectProperties(ZoneList<ObjectLiteral::Property*>* properties);
(...skipping 11 matching lines...) Expand all
108 int pos_; // current printing position 108 int pos_; // current printing position
109 int indent_; 109 int indent_;
110 }; 110 };
111 111
112 #endif // DEBUG 112 #endif // DEBUG
113 113
114 } // namespace internal 114 } // namespace internal
115 } // namespace v8 115 } // namespace v8
116 116
117 #endif // V8_AST_PRETTYPRINTER_H_ 117 #endif // V8_AST_PRETTYPRINTER_H_
OLDNEW
« no previous file with comments | « src/ast/ast-traversal-visitor.h ('k') | src/ast/prettyprinter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698