Chromium Code Reviews| Index: src/compiler/node-properties.cc |
| diff --git a/src/compiler/node-properties.cc b/src/compiler/node-properties.cc |
| index 1575310a7f3a26517fba1289cbdde6263c783159..4ed40b87ff07233ed5e2a9e910c33d733fb349e1 100644 |
| --- a/src/compiler/node-properties.cc |
| +++ b/src/compiler/node-properties.cc |
| @@ -152,14 +152,20 @@ void NodeProperties::RemoveNonValueInputs(Node* node) { |
| // static |
| void NodeProperties::ReplaceWithValue(Node* node, Node* value, Node* effect) { |
| - DCHECK(node->op()->ControlOutputCount() == 0); |
| + // TODO(mstarzinger): Enable once call-sites are in the right order. |
| + // DCHECK(node->op()->HasProperty(Operator::kNoThrow)); |
|
titzer
2015/02/17 10:32:52
Not a fan of these DCHECKS here.
Node is the old
Michael Starzinger
2015/02/17 10:58:29
Done. Dropped it.
|
| if (!effect && node->op()->EffectInputCount() > 0) { |
| effect = NodeProperties::GetEffectInput(node); |
| } |
| - // Requires distinguishing between value and effect edges. |
| + // Requires distinguishing between value, effect and control edges. |
| for (Edge edge : node->use_edges()) { |
| - if (IsEffectEdge(edge)) { |
| + if (IsControlEdge(edge)) { |
| + DCHECK_EQ(IrOpcode::kIfSuccess, edge.from()->opcode()); |
| + Node* control = NodeProperties::GetControlInput(node); |
| + edge.from()->ReplaceUses(control); |
| + edge.UpdateTo(NULL); |
| + } else if (IsEffectEdge(edge)) { |
| DCHECK_NOT_NULL(effect); |
| edge.UpdateTo(effect); |
| } else { |