| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/js-intrinsic-lowering.h" | 5 #include "src/compiler/js-intrinsic-lowering.h" |
| 6 | 6 |
| 7 #include <stack> | 7 #include <stack> |
| 8 | 8 |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/compiler/access-builder.h" | 10 #include "src/compiler/access-builder.h" |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 142 |
| 143 | 143 |
| 144 Reduction JSIntrinsicLowering::ReduceDeoptimizeNow(Node* node) { | 144 Reduction JSIntrinsicLowering::ReduceDeoptimizeNow(Node* node) { |
| 145 if (mode() != kDeoptimizationEnabled) return NoChange(); | 145 if (mode() != kDeoptimizationEnabled) return NoChange(); |
| 146 Node* const frame_state = NodeProperties::GetFrameStateInput(node, 0); | 146 Node* const frame_state = NodeProperties::GetFrameStateInput(node, 0); |
| 147 Node* const effect = NodeProperties::GetEffectInput(node); | 147 Node* const effect = NodeProperties::GetEffectInput(node); |
| 148 Node* const control = NodeProperties::GetControlInput(node); | 148 Node* const control = NodeProperties::GetControlInput(node); |
| 149 | 149 |
| 150 // TODO(bmeurer): Move MergeControlToEnd() to the AdvancedReducer. | 150 // TODO(bmeurer): Move MergeControlToEnd() to the AdvancedReducer. |
| 151 Node* deoptimize = | 151 Node* deoptimize = |
| 152 graph()->NewNode(common()->Deoptimize(), frame_state, effect, control); | 152 graph()->NewNode(common()->Deoptimize(DeoptimizeKind::kEager), |
| 153 frame_state, effect, control); |
| 153 NodeProperties::MergeControlToEnd(graph(), common(), deoptimize); | 154 NodeProperties::MergeControlToEnd(graph(), common(), deoptimize); |
| 154 | 155 |
| 155 node->TrimInputCount(0); | 156 node->TrimInputCount(0); |
| 156 NodeProperties::ChangeOp(node, common()->Dead()); | 157 NodeProperties::ChangeOp(node, common()->Dead()); |
| 157 return Changed(node); | 158 return Changed(node); |
| 158 } | 159 } |
| 159 | 160 |
| 160 | 161 |
| 161 Reduction JSIntrinsicLowering::ReduceDoubleHi(Node* node) { | 162 Reduction JSIntrinsicLowering::ReduceDoubleHi(Node* node) { |
| 162 return Change(node, machine()->Float64ExtractHighWord32()); | 163 return Change(node, machine()->Float64ExtractHighWord32()); |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 | 460 |
| 460 | 461 |
| 461 Reduction JSIntrinsicLowering::ReduceThrowNotDateError(Node* node) { | 462 Reduction JSIntrinsicLowering::ReduceThrowNotDateError(Node* node) { |
| 462 if (mode() != kDeoptimizationEnabled) return NoChange(); | 463 if (mode() != kDeoptimizationEnabled) return NoChange(); |
| 463 Node* const frame_state = NodeProperties::GetFrameStateInput(node, 1); | 464 Node* const frame_state = NodeProperties::GetFrameStateInput(node, 1); |
| 464 Node* const effect = NodeProperties::GetEffectInput(node); | 465 Node* const effect = NodeProperties::GetEffectInput(node); |
| 465 Node* const control = NodeProperties::GetControlInput(node); | 466 Node* const control = NodeProperties::GetControlInput(node); |
| 466 | 467 |
| 467 // TODO(bmeurer): Move MergeControlToEnd() to the AdvancedReducer. | 468 // TODO(bmeurer): Move MergeControlToEnd() to the AdvancedReducer. |
| 468 Node* deoptimize = | 469 Node* deoptimize = |
| 469 graph()->NewNode(common()->Deoptimize(), frame_state, effect, control); | 470 graph()->NewNode(common()->Deoptimize(DeoptimizeKind::kEager), |
| 471 frame_state, effect, control); |
| 470 NodeProperties::MergeControlToEnd(graph(), common(), deoptimize); | 472 NodeProperties::MergeControlToEnd(graph(), common(), deoptimize); |
| 471 | 473 |
| 472 node->TrimInputCount(0); | 474 node->TrimInputCount(0); |
| 473 NodeProperties::ChangeOp(node, common()->Dead()); | 475 NodeProperties::ChangeOp(node, common()->Dead()); |
| 474 return Changed(node); | 476 return Changed(node); |
| 475 } | 477 } |
| 476 | 478 |
| 477 | 479 |
| 478 Reduction JSIntrinsicLowering::ReduceToInteger(Node* node) { | 480 Reduction JSIntrinsicLowering::ReduceToInteger(Node* node) { |
| 479 Node* value = NodeProperties::GetValueInput(node, 0); | 481 Node* value = NodeProperties::GetValueInput(node, 0); |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 } | 648 } |
| 647 | 649 |
| 648 | 650 |
| 649 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const { | 651 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const { |
| 650 return jsgraph()->simplified(); | 652 return jsgraph()->simplified(); |
| 651 } | 653 } |
| 652 | 654 |
| 653 } // namespace compiler | 655 } // namespace compiler |
| 654 } // namespace internal | 656 } // namespace internal |
| 655 } // namespace v8 | 657 } // namespace v8 |
| OLD | NEW |