OLD | NEW |
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_H_ | 5 #ifndef V8_AST_H_ |
6 #define V8_AST_H_ | 6 #define V8_AST_H_ |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/assembler.h" | 10 #include "src/assembler.h" |
(...skipping 3126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3137 | 3137 |
3138 private: | 3138 private: |
3139 template<class> friend class AstNodeFactory; | 3139 template<class> friend class AstNodeFactory; |
3140 | 3140 |
3141 // Node visitors. | 3141 // Node visitors. |
3142 #define DEF_VISIT(type) \ | 3142 #define DEF_VISIT(type) \ |
3143 void Visit##type(type* node); | 3143 void Visit##type(type* node); |
3144 AST_NODE_LIST(DEF_VISIT) | 3144 AST_NODE_LIST(DEF_VISIT) |
3145 #undef DEF_VISIT | 3145 #undef DEF_VISIT |
3146 | 3146 |
| 3147 void increase_node_count() { properties_.add_node_count(1); } |
3147 void add_flag(AstPropertiesFlag flag) { properties_.flags()->Add(flag); } | 3148 void add_flag(AstPropertiesFlag flag) { properties_.flags()->Add(flag); } |
3148 void set_dont_crankshaft_reason(BailoutReason reason) { | 3149 void set_dont_crankshaft_reason(BailoutReason reason) { |
3149 dont_crankshaft_reason_ = reason; | 3150 dont_crankshaft_reason_ = reason; |
3150 } | 3151 } |
3151 void set_dont_turbofan_reason(BailoutReason reason) { | 3152 void set_dont_turbofan_reason(BailoutReason reason) { |
3152 dont_turbofan_reason_ = reason; | 3153 dont_turbofan_reason_ = reason; |
3153 } | 3154 } |
3154 | 3155 |
3155 void add_slot_node(AstNode* slot_node) { | 3156 void add_slot_node(AstNode* slot_node) { |
3156 FeedbackVectorRequirements reqs = slot_node->ComputeFeedbackRequirements(); | 3157 FeedbackVectorRequirements reqs = slot_node->ComputeFeedbackRequirements(); |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3648 private: | 3649 private: |
3649 Zone* zone_; | 3650 Zone* zone_; |
3650 Visitor visitor_; | 3651 Visitor visitor_; |
3651 AstValueFactory* ast_value_factory_; | 3652 AstValueFactory* ast_value_factory_; |
3652 }; | 3653 }; |
3653 | 3654 |
3654 | 3655 |
3655 } } // namespace v8::internal | 3656 } } // namespace v8::internal |
3656 | 3657 |
3657 #endif // V8_AST_H_ | 3658 #endif // V8_AST_H_ |
OLD | NEW |