| 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.h" | 8 #include "src/ast.h" |
| 9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
| 10 | 10 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 ZoneVector<Handle<Object>> globals_; | 81 ZoneVector<Handle<Object>> globals_; |
| 82 | 82 |
| 83 // Stack of control scopes currently entered by the visitor. | 83 // Stack of control scopes currently entered by the visitor. |
| 84 ControlScope* execution_control_; | 84 ControlScope* execution_control_; |
| 85 | 85 |
| 86 // Stack of context objects pushed onto the chain by the visitor. | 86 // Stack of context objects pushed onto the chain by the visitor. |
| 87 ContextScope* execution_context_; | 87 ContextScope* execution_context_; |
| 88 | 88 |
| 89 // Nodes representing values in the activation record. | 89 // Nodes representing values in the activation record. |
| 90 SetOncePointer<Node> function_closure_; | 90 SetOncePointer<Node> function_closure_; |
| 91 Node* function_context_; | 91 SetOncePointer<Node> function_context_; |
| 92 | 92 |
| 93 // Temporary storage for building node input lists. | 93 // Temporary storage for building node input lists. |
| 94 int input_buffer_size_; | 94 int input_buffer_size_; |
| 95 Node** input_buffer_; | 95 Node** input_buffer_; |
| 96 | 96 |
| 97 // Merge of all control nodes that exit the function body. | 97 // Merge of all control nodes that exit the function body. |
| 98 Node* exit_control_; | 98 Node* exit_control_; |
| 99 | 99 |
| 100 // Result of loop assignment analysis performed before graph creation. | 100 // Result of loop assignment analysis performed before graph creation. |
| 101 LoopAssignmentAnalysis* loop_assignment_analysis_; | 101 LoopAssignmentAnalysis* loop_assignment_analysis_; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 | 167 |
| 168 Node* NewNode(const Operator* op, int value_input_count, Node** value_inputs, | 168 Node* NewNode(const Operator* op, int value_input_count, Node** value_inputs, |
| 169 bool incomplete = false) { | 169 bool incomplete = false) { |
| 170 return MakeNode(op, value_input_count, value_inputs, incomplete); | 170 return MakeNode(op, value_input_count, value_inputs, incomplete); |
| 171 } | 171 } |
| 172 | 172 |
| 173 // Creates a new Phi node having {count} input values. | 173 // Creates a new Phi node having {count} input values. |
| 174 Node* NewPhi(int count, Node* input, Node* control); | 174 Node* NewPhi(int count, Node* input, Node* control); |
| 175 Node* NewEffectPhi(int count, Node* input, Node* control); | 175 Node* NewEffectPhi(int count, Node* input, Node* control); |
| 176 | 176 |
| 177 // Creates new context nodes. |
| 177 Node* NewOuterContextParam(); | 178 Node* NewOuterContextParam(); |
| 178 Node* NewCurrentContextOsrValue(); | 179 Node* NewCurrentContextOsrValue(); |
| 179 | 180 |
| 180 // Helpers for merging control, effect or value dependencies. | 181 // Helpers for merging control, effect or value dependencies. |
| 181 Node* MergeControl(Node* control, Node* other); | 182 Node* MergeControl(Node* control, Node* other); |
| 182 Node* MergeEffect(Node* value, Node* other, Node* control); | 183 Node* MergeEffect(Node* value, Node* other, Node* control); |
| 183 Node* MergeValue(Node* value, Node* other, Node* control); | 184 Node* MergeValue(Node* value, Node* other, Node* control); |
| 184 | 185 |
| 185 // The main node creation chokepoint. Adds context, frame state, effect, | 186 // The main node creation chokepoint. Adds context, frame state, effect, |
| 186 // and control dependencies depending on the operator. | 187 // and control dependencies depending on the operator. |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 | 467 |
| 467 // Prepare environment to be used as loop header. | 468 // Prepare environment to be used as loop header. |
| 468 void PrepareForLoop(BitVector* assigned, bool is_osr = false); | 469 void PrepareForLoop(BitVector* assigned, bool is_osr = false); |
| 469 }; | 470 }; |
| 470 | 471 |
| 471 } // namespace compiler | 472 } // namespace compiler |
| 472 } // namespace internal | 473 } // namespace internal |
| 473 } // namespace v8 | 474 } // namespace v8 |
| 474 | 475 |
| 475 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ | 476 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ |
| OLD | NEW |