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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 Node* const done = NodeProperties::GetValueInput(node, 1); | 92 Node* const done = NodeProperties::GetValueInput(node, 1); |
93 Node* const context = NodeProperties::GetContextInput(node); | 93 Node* const context = NodeProperties::GetContextInput(node); |
94 Node* const effect = NodeProperties::GetEffectInput(node); | 94 Node* const effect = NodeProperties::GetEffectInput(node); |
95 return Change(node, javascript()->CreateIterResultObject(), value, done, | 95 return Change(node, javascript()->CreateIterResultObject(), value, done, |
96 context, effect); | 96 context, effect); |
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); |
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 = graph()->NewNode( | 107 Node* deoptimize = graph()->NewNode( |
108 common()->Deoptimize(DeoptimizeKind::kEager, DeoptimizeReason::kNoReason), | 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 |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 return jsgraph_->javascript(); | 386 return jsgraph_->javascript(); |
387 } | 387 } |
388 | 388 |
389 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const { | 389 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const { |
390 return jsgraph()->simplified(); | 390 return jsgraph()->simplified(); |
391 } | 391 } |
392 | 392 |
393 } // namespace compiler | 393 } // namespace compiler |
394 } // namespace internal | 394 } // namespace internal |
395 } // namespace v8 | 395 } // namespace v8 |
OLD | NEW |