| 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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 DCHECK(depth >= 0 && depth <= stack_height()); | 533 DCHECK(depth >= 0 && depth <= stack_height()); |
| 534 values()->erase(values()->end() - depth, values()->end()); | 534 values()->erase(values()->end() - depth, values()->end()); |
| 535 } | 535 } |
| 536 | 536 |
| 537 // Preserve a checkpoint of the environment for the IR graph. Any | 537 // Preserve a checkpoint of the environment for the IR graph. Any |
| 538 // further mutation of the environment will not affect checkpoints. | 538 // further mutation of the environment will not affect checkpoints. |
| 539 Node* Checkpoint(BailoutId ast_id, OutputFrameStateCombine combine = | 539 Node* Checkpoint(BailoutId ast_id, OutputFrameStateCombine combine = |
| 540 OutputFrameStateCombine::Ignore(), | 540 OutputFrameStateCombine::Ignore(), |
| 541 bool node_has_exception = false); | 541 bool node_has_exception = false); |
| 542 | 542 |
| 543 // Inserts a loop exit control node and renames the environment. |
| 544 // This is useful for loop peeling to insert phis at loop exits. |
| 545 void PrepareForLoopExit(Node* loop, BitVector* assigned_variables); |
| 546 |
| 543 // Control dependency tracked by this environment. | 547 // Control dependency tracked by this environment. |
| 544 Node* GetControlDependency() { return control_dependency_; } | 548 Node* GetControlDependency() { return control_dependency_; } |
| 545 void UpdateControlDependency(Node* dependency) { | 549 void UpdateControlDependency(Node* dependency) { |
| 546 control_dependency_ = dependency; | 550 control_dependency_ = dependency; |
| 547 } | 551 } |
| 548 | 552 |
| 549 // Effect dependency tracked by this environment. | 553 // Effect dependency tracked by this environment. |
| 550 Node* GetEffectDependency() { return effect_dependency_; } | 554 Node* GetEffectDependency() { return effect_dependency_; } |
| 551 void UpdateEffectDependency(Node* dependency) { | 555 void UpdateEffectDependency(Node* dependency) { |
| 552 effect_dependency_ = dependency; | 556 effect_dependency_ = dependency; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 | 607 |
| 604 // Prepare environment to be used as loop header. | 608 // Prepare environment to be used as loop header. |
| 605 void PrepareForLoop(BitVector* assigned, bool is_osr = false); | 609 void PrepareForLoop(BitVector* assigned, bool is_osr = false); |
| 606 }; | 610 }; |
| 607 | 611 |
| 608 } // namespace compiler | 612 } // namespace compiler |
| 609 } // namespace internal | 613 } // namespace internal |
| 610 } // namespace v8 | 614 } // namespace v8 |
| 611 | 615 |
| 612 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ | 616 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ |
| OLD | NEW |