OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_COMPILER_AST_GRAPH_BUILDER_H_ | 5 #ifndef V8_COMPILER_AST_GRAPH_BUILDER_H_ |
6 #define V8_COMPILER_AST_GRAPH_BUILDER_H_ | 6 #define V8_COMPILER_AST_GRAPH_BUILDER_H_ |
7 | 7 |
8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
10 #include "src/compiler/liveness-analyzer.h" | 10 #include "src/compiler/liveness-analyzer.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 int try_catch_nesting_level_; | 99 int try_catch_nesting_level_; |
100 int try_nesting_level_; | 100 int try_nesting_level_; |
101 | 101 |
102 // Temporary storage for building node input lists. | 102 // Temporary storage for building node input lists. |
103 int input_buffer_size_; | 103 int input_buffer_size_; |
104 Node** input_buffer_; | 104 Node** input_buffer_; |
105 | 105 |
106 // Optimization to cache loaded feedback vector. | 106 // Optimization to cache loaded feedback vector. |
107 SetOncePointer<Node> feedback_vector_; | 107 SetOncePointer<Node> feedback_vector_; |
108 | 108 |
| 109 // Optimization to cache empty frame state. |
| 110 SetOncePointer<Node> empty_frame_state_; |
| 111 |
109 // Control nodes that exit the function body. | 112 // Control nodes that exit the function body. |
110 ZoneVector<Node*> exit_controls_; | 113 ZoneVector<Node*> exit_controls_; |
111 | 114 |
112 // Result of loop assignment analysis performed before graph creation. | 115 // Result of loop assignment analysis performed before graph creation. |
113 LoopAssignmentAnalysis* loop_assignment_analysis_; | 116 LoopAssignmentAnalysis* loop_assignment_analysis_; |
114 | 117 |
115 // Result of type hint analysis performed before graph creation. | 118 // Result of type hint analysis performed before graph creation. |
116 TypeHintAnalysis* type_hint_analysis_; | 119 TypeHintAnalysis* type_hint_analysis_; |
117 | 120 |
118 // Cache for StateValues nodes for frame states. | 121 // Cache for StateValues nodes for frame states. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 // Get or create the node that represents the incoming function closure. | 163 // Get or create the node that represents the incoming function closure. |
161 Node* GetFunctionClosureForContext(); | 164 Node* GetFunctionClosureForContext(); |
162 Node* GetFunctionClosure(); | 165 Node* GetFunctionClosure(); |
163 | 166 |
164 // Get or create the node that represents the incoming function context. | 167 // Get or create the node that represents the incoming function context. |
165 Node* GetFunctionContext(); | 168 Node* GetFunctionContext(); |
166 | 169 |
167 // Get or create the node that represents the incoming new target value. | 170 // Get or create the node that represents the incoming new target value. |
168 Node* GetNewTarget(); | 171 Node* GetNewTarget(); |
169 | 172 |
| 173 // Get or create the node that represents the empty frame state. |
| 174 Node* GetEmptyFrameState(); |
| 175 |
170 // Node creation helpers. | 176 // Node creation helpers. |
171 Node* NewNode(const Operator* op, bool incomplete = false) { | 177 Node* NewNode(const Operator* op, bool incomplete = false) { |
172 return MakeNode(op, 0, static_cast<Node**>(nullptr), incomplete); | 178 return MakeNode(op, 0, static_cast<Node**>(nullptr), incomplete); |
173 } | 179 } |
174 | 180 |
175 Node* NewNode(const Operator* op, Node* n1) { | 181 Node* NewNode(const Operator* op, Node* n1) { |
176 return MakeNode(op, 1, &n1, false); | 182 return MakeNode(op, 1, &n1, false); |
177 } | 183 } |
178 | 184 |
179 Node* NewNode(const Operator* op, Node* n1, Node* n2) { | 185 Node* NewNode(const Operator* op, Node* n1, Node* n2) { |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 | 598 |
593 // Prepare environment to be used as loop header. | 599 // Prepare environment to be used as loop header. |
594 void PrepareForLoop(BitVector* assigned, bool is_osr = false); | 600 void PrepareForLoop(BitVector* assigned, bool is_osr = false); |
595 }; | 601 }; |
596 | 602 |
597 } // namespace compiler | 603 } // namespace compiler |
598 } // namespace internal | 604 } // namespace internal |
599 } // namespace v8 | 605 } // namespace v8 |
600 | 606 |
601 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ | 607 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ |
OLD | NEW |