| 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 "src/compiler/access-builder.h" | 7 #include "src/compiler/access-builder.h" |
| 8 #include "src/compiler/js-graph.h" | 8 #include "src/compiler/js-graph.h" |
| 9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 default: | 38 default: |
| 39 break; | 39 break; |
| 40 } | 40 } |
| 41 return NoChange(); | 41 return NoChange(); |
| 42 } | 42 } |
| 43 | 43 |
| 44 | 44 |
| 45 Reduction JSIntrinsicLowering::ReduceDeoptimizeNow(Node* node) { | 45 Reduction JSIntrinsicLowering::ReduceDeoptimizeNow(Node* node) { |
| 46 if (!FLAG_turbo_deoptimization) return NoChange(); | 46 if (!FLAG_turbo_deoptimization) return NoChange(); |
| 47 | 47 |
| 48 Node* frame_state = NodeProperties::GetFrameStateInput(node); | 48 Node* frame_state = NodeProperties::GetFrameStateInput(node, 0); |
| 49 DCHECK_EQ(frame_state->opcode(), IrOpcode::kFrameState); | 49 DCHECK_EQ(frame_state->opcode(), IrOpcode::kFrameState); |
| 50 | 50 |
| 51 Node* effect = NodeProperties::GetEffectInput(node); | 51 Node* effect = NodeProperties::GetEffectInput(node); |
| 52 Node* control = NodeProperties::GetControlInput(node); | 52 Node* control = NodeProperties::GetControlInput(node); |
| 53 | 53 |
| 54 // We are making the continuation after the call dead. To | 54 // We are making the continuation after the call dead. To |
| 55 // model this, we generate if (true) statement with deopt | 55 // model this, we generate if (true) statement with deopt |
| 56 // in the true branch and continuation in the false branch. | 56 // in the true branch and continuation in the false branch. |
| 57 Node* branch = | 57 Node* branch = |
| 58 graph()->NewNode(common()->Branch(), jsgraph()->TrueConstant(), control); | 58 graph()->NewNode(common()->Branch(), jsgraph()->TrueConstant(), control); |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 } | 225 } |
| 226 | 226 |
| 227 | 227 |
| 228 MachineOperatorBuilder* JSIntrinsicLowering::machine() const { | 228 MachineOperatorBuilder* JSIntrinsicLowering::machine() const { |
| 229 return jsgraph()->machine(); | 229 return jsgraph()->machine(); |
| 230 } | 230 } |
| 231 | 231 |
| 232 } // namespace compiler | 232 } // namespace compiler |
| 233 } // namespace internal | 233 } // namespace internal |
| 234 } // namespace v8 | 234 } // namespace v8 |
| OLD | NEW |