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: test/cctest/expression-type-collector.h

Issue 1318823010: Eliminate use of CompilationInfo in several AstVisitor descendants. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: revised Created 5 years, 3 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
« no previous file with comments | « src/typing-reset.cc ('k') | test/cctest/expression-type-collector.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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_EXPRESSION_TYPE_COLLECTOR_H_ 5 #ifndef V8_EXPRESSION_TYPE_COLLECTOR_H_
6 #define V8_EXPRESSION_TYPE_COLLECTOR_H_ 6 #define V8_EXPRESSION_TYPE_COLLECTOR_H_
7 7
8 #include "src/ast-expression-visitor.h" 8 #include "src/ast-expression-visitor.h"
9 9
10 namespace v8 { 10 namespace v8 {
11 namespace internal { 11 namespace internal {
12 12
13 // A Visitor over a CompilationInfo's AST that collects 13 // A Visitor over an AST that collects a human readable string summarizing
14 // a human readable string summarizing structure and types. 14 // structure and types. Used for testing of the typing information attached
15 // Used for testing of the typing information attached to the 15 // to the expression nodes of an AST.
16 // expression nodes of an AST.
17 16
18 struct ExpressionTypeEntry { 17 struct ExpressionTypeEntry {
19 int depth; 18 int depth;
20 const char* kind; 19 const char* kind;
21 const AstRawString* name; 20 const AstRawString* name;
22 Bounds bounds; 21 Bounds bounds;
23 }; 22 };
24 23
25 class ExpressionTypeCollector : public AstExpressionVisitor { 24 class ExpressionTypeCollector : public AstExpressionVisitor {
26 public: 25 public:
27 ExpressionTypeCollector(CompilationInfo* info, 26 ExpressionTypeCollector(Isolate* isolate, Zone* zone, FunctionLiteral* root,
28 ZoneVector<ExpressionTypeEntry>* dst); 27 ZoneVector<ExpressionTypeEntry>* dst);
29 void Run(); 28 void Run();
30 29
31 protected: 30 protected:
32 void VisitExpression(Expression* expression); 31 void VisitExpression(Expression* expression);
33 32
34 private: 33 private:
35 ZoneVector<ExpressionTypeEntry>* result_; 34 ZoneVector<ExpressionTypeEntry>* result_;
36 }; 35 };
37 } 36 }
38 } // namespace v8::internal 37 } // namespace v8::internal
39 38
40 #endif // V8_EXPRESSION_TYPE_COLLECTOR_H_ 39 #endif // V8_EXPRESSION_TYPE_COLLECTOR_H_
OLDNEW
« no previous file with comments | « src/typing-reset.cc ('k') | test/cctest/expression-type-collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698