OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 the V8 project authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef V8_AST_COLLECT_EAGER_LITERALS_H_ | |
6 #define V8_AST_COLLECT_EAGER_LITERALS_H_ | |
7 | |
8 #include <set> | |
9 | |
10 #include "src/ast/ast-traversal-visitor.h" | |
11 #include "src/base/macros.h" | |
12 | |
13 namespace v8 { | |
14 namespace internal { | |
15 | |
16 class CompilationInfo; | |
17 class ParseInfo; | |
18 | |
19 class CollectEagerLiterals final | |
20 : public AstTraversalVisitor<CollectEagerLiterals> { | |
21 public: | |
22 explicit CollectEagerLiterals(CompilationInfo* info); | |
Michael Starzinger
2016/10/17 13:16:03
nit: How would you feel about passing just the Par
| |
23 ~CollectEagerLiterals(); | |
24 | |
25 const std::set<FunctionLiteral*>& eager_literals() const { | |
26 return eager_literals_; | |
27 } | |
28 | |
29 private: | |
30 friend class AstTraversalVisitor<CollectEagerLiterals>; | |
31 | |
32 void VisitFunctionDeclaration(FunctionDeclaration* decl); | |
33 void VisitFunctionLiteral(FunctionLiteral* fun); | |
34 | |
35 std::set<FunctionLiteral*> eager_literals_; | |
36 ParseInfo* parse_info_; | |
37 | |
38 DISALLOW_COPY_AND_ASSIGN(CollectEagerLiterals); | |
39 }; | |
40 | |
41 } // namespace internal | |
42 } // namespace v8 | |
43 | |
44 #endif // V8_AST_COLLECT_EAGER_LITERALS_H_ | |
OLD | NEW |