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 #include "src/compiler/ast-graph-builder.h" | 5 #include "src/compiler/ast-graph-builder.h" |
6 | 6 |
7 #include "src/compiler.h" | 7 #include "src/compiler.h" |
8 #include "src/compiler/ast-loop-assignment-analyzer.h" | 8 #include "src/compiler/ast-loop-assignment-analyzer.h" |
9 #include "src/compiler/control-builders.h" | 9 #include "src/compiler/control-builders.h" |
10 #include "src/compiler/js-type-feedback.h" | 10 #include "src/compiler/js-type-feedback.h" |
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 void AstGraphBuilder::Environment::UpdateStateValuesWithCache( | 731 void AstGraphBuilder::Environment::UpdateStateValuesWithCache( |
732 Node** state_values, int offset, int count) { | 732 Node** state_values, int offset, int count) { |
733 Node** env_values = (count == 0) ? nullptr : &values()->at(offset); | 733 Node** env_values = (count == 0) ? nullptr : &values()->at(offset); |
734 *state_values = builder_->state_values_cache_.GetNodeForValues( | 734 *state_values = builder_->state_values_cache_.GetNodeForValues( |
735 env_values, static_cast<size_t>(count)); | 735 env_values, static_cast<size_t>(count)); |
736 } | 736 } |
737 | 737 |
738 | 738 |
739 Node* AstGraphBuilder::Environment::Checkpoint( | 739 Node* AstGraphBuilder::Environment::Checkpoint( |
740 BailoutId ast_id, OutputFrameStateCombine combine) { | 740 BailoutId ast_id, OutputFrameStateCombine combine) { |
741 if (!FLAG_turbo_deoptimization) return nullptr; | 741 if (!builder()->info()->is_deoptimization_enabled()) { |
| 742 return builder()->jsgraph()->EmptyFrameState(); |
| 743 } |
742 | 744 |
743 UpdateStateValues(¶meters_node_, 0, parameters_count()); | 745 UpdateStateValues(¶meters_node_, 0, parameters_count()); |
744 UpdateStateValuesWithCache(&locals_node_, parameters_count(), locals_count()); | 746 UpdateStateValuesWithCache(&locals_node_, parameters_count(), locals_count()); |
745 UpdateStateValues(&stack_node_, parameters_count() + locals_count(), | 747 UpdateStateValues(&stack_node_, parameters_count() + locals_count(), |
746 stack_height()); | 748 stack_height()); |
747 | 749 |
748 const Operator* op = common()->FrameState(JS_FRAME, ast_id, combine); | 750 const Operator* op = common()->FrameState(JS_FRAME, ast_id, combine); |
749 | 751 |
750 Node* result = graph()->NewNode(op, parameters_node_, locals_node_, | 752 Node* result = graph()->NewNode(op, parameters_node_, locals_node_, |
751 stack_node_, builder()->current_context(), | 753 stack_node_, builder()->current_context(), |
(...skipping 2825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3577 // Phi does not exist yet, introduce one. | 3579 // Phi does not exist yet, introduce one. |
3578 value = NewPhi(inputs, value, control); | 3580 value = NewPhi(inputs, value, control); |
3579 value->ReplaceInput(inputs - 1, other); | 3581 value->ReplaceInput(inputs - 1, other); |
3580 } | 3582 } |
3581 return value; | 3583 return value; |
3582 } | 3584 } |
3583 | 3585 |
3584 } // namespace compiler | 3586 } // namespace compiler |
3585 } // namespace internal | 3587 } // namespace internal |
3586 } // namespace v8 | 3588 } // namespace v8 |
OLD | NEW |