| 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/representation-change.h" | 5 #include "src/compiler/representation-change.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 } | 444 } |
| 445 | 445 |
| 446 Node* RepresentationChanger::InsertConversion(Node* node, const Operator* op, | 446 Node* RepresentationChanger::InsertConversion(Node* node, const Operator* op, |
| 447 Node* use_node) { | 447 Node* use_node) { |
| 448 if (op->ControlInputCount() > 0) { | 448 if (op->ControlInputCount() > 0) { |
| 449 // If the operator can deoptimize (which means it has control | 449 // If the operator can deoptimize (which means it has control |
| 450 // input), we need to connect it to the effect and control chains | 450 // input), we need to connect it to the effect and control chains |
| 451 // and also provide it with a frame state. | 451 // and also provide it with a frame state. |
| 452 Node* effect = NodeProperties::GetEffectInput(use_node); | 452 Node* effect = NodeProperties::GetEffectInput(use_node); |
| 453 Node* control = NodeProperties::GetControlInput(use_node); | 453 Node* control = NodeProperties::GetControlInput(use_node); |
| 454 Node* frame_state = NodeProperties::GetFrameStateInput(use_node, 0); | 454 Node* frame_state = NodeProperties::FindFrameStateBefore(use_node); |
| 455 Node* conversion = | 455 Node* conversion = |
| 456 jsgraph()->graph()->NewNode(op, node, frame_state, effect, control); | 456 jsgraph()->graph()->NewNode(op, node, frame_state, effect, control); |
| 457 NodeProperties::ReplaceControlInput(use_node, control); | 457 NodeProperties::ReplaceControlInput(use_node, control); |
| 458 NodeProperties::ReplaceEffectInput(use_node, effect); | 458 NodeProperties::ReplaceEffectInput(use_node, effect); |
| 459 return conversion; | 459 return conversion; |
| 460 } | 460 } |
| 461 return jsgraph()->graph()->NewNode(op, node); | 461 return jsgraph()->graph()->NewNode(op, node); |
| 462 } | 462 } |
| 463 | 463 |
| 464 | 464 |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 712 } | 712 } |
| 713 | 713 |
| 714 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) { | 714 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) { |
| 715 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(), | 715 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(), |
| 716 node); | 716 node); |
| 717 } | 717 } |
| 718 | 718 |
| 719 } // namespace compiler | 719 } // namespace compiler |
| 720 } // namespace internal | 720 } // namespace internal |
| 721 } // namespace v8 | 721 } // namespace v8 |
| OLD | NEW |