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 #include "src/compiler/liveness-analyzer.h" | 10 #include "src/compiler/liveness-analyzer.h" |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 void set_execution_control(ControlScope* ctrl) { execution_control_ = ctrl; } | 138 void set_execution_control(ControlScope* ctrl) { execution_control_ = ctrl; } |
139 void set_execution_context(ContextScope* ctx) { execution_context_ = ctx; } | 139 void set_execution_context(ContextScope* ctx) { execution_context_ = ctx; } |
140 | 140 |
141 // Create the main graph body by visiting the AST. | 141 // Create the main graph body by visiting the AST. |
142 void CreateGraphBody(bool stack_check); | 142 void CreateGraphBody(bool stack_check); |
143 | 143 |
144 // Create the node that represents the outer context of the function. | 144 // Create the node that represents the outer context of the function. |
145 void CreateFunctionContext(bool constant_context); | 145 void CreateFunctionContext(bool constant_context); |
146 | 146 |
147 // Get or create the node that represents the outer function closure. | 147 // Get or create the node that represents the outer function closure. |
| 148 Node* GetFunctionClosureForContext(); |
148 Node* GetFunctionClosure(); | 149 Node* GetFunctionClosure(); |
149 | 150 |
150 // Node creation helpers. | 151 // Node creation helpers. |
151 Node* NewNode(const Operator* op, bool incomplete = false) { | 152 Node* NewNode(const Operator* op, bool incomplete = false) { |
152 return MakeNode(op, 0, static_cast<Node**>(NULL), incomplete); | 153 return MakeNode(op, 0, static_cast<Node**>(NULL), incomplete); |
153 } | 154 } |
154 | 155 |
155 Node* NewNode(const Operator* op, Node* n1) { | 156 Node* NewNode(const Operator* op, Node* n1) { |
156 return MakeNode(op, 1, &n1, false); | 157 return MakeNode(op, 1, &n1, false); |
157 } | 158 } |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 | 527 |
527 // Prepare environment to be used as loop header. | 528 // Prepare environment to be used as loop header. |
528 void PrepareForLoop(BitVector* assigned, bool is_osr = false); | 529 void PrepareForLoop(BitVector* assigned, bool is_osr = false); |
529 }; | 530 }; |
530 | 531 |
531 } // namespace compiler | 532 } // namespace compiler |
532 } // namespace internal | 533 } // namespace internal |
533 } // namespace v8 | 534 } // namespace v8 |
534 | 535 |
535 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ | 536 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ |
OLD | NEW |