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

Side by Side Diff: src/prettyprinter.h

Issue 231073002: WIP: Parser: delay string internalization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: more cleanup Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/preparser.h ('k') | src/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_PRETTYPRINTER_H_ 5 #ifndef V8_PRETTYPRINTER_H_
6 #define V8_PRETTYPRINTER_H_ 6 #define V8_PRETTYPRINTER_H_
7 7
8 #include "allocation.h" 8 #include "allocation.h"
9 #include "ast.h" 9 #include "ast.h"
10 10
(...skipping 26 matching lines...) Expand all
37 private: 37 private:
38 char* output_; // output string buffer 38 char* output_; // output string buffer
39 int size_; // output_ size 39 int size_; // output_ size
40 int pos_; // current printing position 40 int pos_; // current printing position
41 41
42 protected: 42 protected:
43 void Init(); 43 void Init();
44 const char* Output() const { return output_; } 44 const char* Output() const { return output_; }
45 45
46 virtual void PrintStatements(ZoneList<Statement*>* statements); 46 virtual void PrintStatements(ZoneList<Statement*>* statements);
47 void PrintLabels(ZoneStringList* labels); 47 void PrintLabels(ZoneList<const AstString*>* labels);
48 virtual void PrintArguments(ZoneList<Expression*>* arguments); 48 virtual void PrintArguments(ZoneList<Expression*>* arguments);
49 void PrintLiteral(Handle<Object> value, bool quote); 49 void PrintLiteral(Handle<Object> value, bool quote);
50 void PrintLiteral(const AstString* value, bool quote);
50 void PrintParameters(Scope* scope); 51 void PrintParameters(Scope* scope);
51 void PrintDeclarations(ZoneList<Declaration*>* declarations); 52 void PrintDeclarations(ZoneList<Declaration*>* declarations);
52 void PrintFunctionLiteral(FunctionLiteral* function); 53 void PrintFunctionLiteral(FunctionLiteral* function);
53 void PrintCaseClause(CaseClause* clause); 54 void PrintCaseClause(CaseClause* clause);
54 55
55 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); 56 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
56 }; 57 };
57 58
58 59
59 // Prints the AST structure 60 // Prints the AST structure
(...skipping 16 matching lines...) Expand all
76 77
77 void PrintStatements(ZoneList<Statement*>* statements); 78 void PrintStatements(ZoneList<Statement*>* statements);
78 void PrintDeclarations(ZoneList<Declaration*>* declarations); 79 void PrintDeclarations(ZoneList<Declaration*>* declarations);
79 void PrintParameters(Scope* scope); 80 void PrintParameters(Scope* scope);
80 void PrintArguments(ZoneList<Expression*>* arguments); 81 void PrintArguments(ZoneList<Expression*>* arguments);
81 void PrintCaseClause(CaseClause* clause); 82 void PrintCaseClause(CaseClause* clause);
82 void PrintLiteralIndented(const char* info, Handle<Object> value, bool quote); 83 void PrintLiteralIndented(const char* info, Handle<Object> value, bool quote);
83 void PrintLiteralWithModeIndented(const char* info, 84 void PrintLiteralWithModeIndented(const char* info,
84 Variable* var, 85 Variable* var,
85 Handle<Object> value); 86 Handle<Object> value);
86 void PrintLabelsIndented(ZoneStringList* labels); 87 void PrintLabelsIndented(ZoneList<const AstString*>* labels);
87 88
88 void inc_indent() { indent_++; } 89 void inc_indent() { indent_++; }
89 void dec_indent() { indent_--; } 90 void dec_indent() { indent_--; }
90 91
91 int indent_; 92 int indent_;
92 }; 93 };
93 94
94 #endif // DEBUG 95 #endif // DEBUG
95 96
96 } } // namespace v8::internal 97 } } // namespace v8::internal
97 98
98 #endif // V8_PRETTYPRINTER_H_ 99 #endif // V8_PRETTYPRINTER_H_
OLDNEW
« no previous file with comments | « src/preparser.h ('k') | src/prettyprinter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698