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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 } | 97 } |
98 | 98 |
99 | 99 |
100 Reduction JSIntrinsicLowering::ReduceDeoptimizeNow(Node* node) { | 100 Reduction JSIntrinsicLowering::ReduceDeoptimizeNow(Node* node) { |
101 if (mode() != kDeoptimizationEnabled) return NoChange(); | 101 if (mode() != kDeoptimizationEnabled) return NoChange(); |
102 Node* const frame_state = NodeProperties::GetFrameStateInput(node, 0); | 102 Node* const frame_state = NodeProperties::GetFrameStateInput(node, 0); |
103 Node* const effect = NodeProperties::GetEffectInput(node); | 103 Node* const effect = NodeProperties::GetEffectInput(node); |
104 Node* const control = NodeProperties::GetControlInput(node); | 104 Node* const control = NodeProperties::GetControlInput(node); |
105 | 105 |
106 // TODO(bmeurer): Move MergeControlToEnd() to the AdvancedReducer. | 106 // TODO(bmeurer): Move MergeControlToEnd() to the AdvancedReducer. |
107 Node* deoptimize = | 107 Node* deoptimize = graph()->NewNode( |
108 graph()->NewNode(common()->Deoptimize(DeoptimizeKind::kEager), | 108 common()->Deoptimize(DeoptimizeKind::kEager, DeoptimizeReason::kNoReason), |
109 frame_state, effect, control); | 109 frame_state, effect, control); |
110 NodeProperties::MergeControlToEnd(graph(), common(), deoptimize); | 110 NodeProperties::MergeControlToEnd(graph(), common(), deoptimize); |
111 Revisit(graph()->end()); | 111 Revisit(graph()->end()); |
112 | 112 |
113 node->TrimInputCount(0); | 113 node->TrimInputCount(0); |
114 NodeProperties::ChangeOp(node, common()->Dead()); | 114 NodeProperties::ChangeOp(node, common()->Dead()); |
115 return Changed(node); | 115 return Changed(node); |
116 } | 116 } |
117 | 117 |
118 Reduction JSIntrinsicLowering::ReduceGeneratorClose(Node* node) { | 118 Reduction JSIntrinsicLowering::ReduceGeneratorClose(Node* node) { |
119 Node* const generator = NodeProperties::GetValueInput(node, 0); | 119 Node* const generator = NodeProperties::GetValueInput(node, 0); |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 } | 392 } |
393 | 393 |
394 | 394 |
395 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const { | 395 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const { |
396 return jsgraph()->simplified(); | 396 return jsgraph()->simplified(); |
397 } | 397 } |
398 | 398 |
399 } // namespace compiler | 399 } // namespace compiler |
400 } // namespace internal | 400 } // namespace internal |
401 } // namespace v8 | 401 } // namespace v8 |
OLD | NEW |