Index: src/compiler/node-properties-inl.h |
diff --git a/src/compiler/node-properties-inl.h b/src/compiler/node-properties-inl.h |
index a0319e7b9b00c8635d33eda7306dbac3478af9be..5fe0cb6bedb6b8112c469e7a6716bb8987ecaed7 100644 |
--- a/src/compiler/node-properties-inl.h |
+++ b/src/compiler/node-properties-inl.h |
@@ -101,7 +101,7 @@ inline int NodeProperties::GetFrameStateIndex(Node* node) { |
// ----------------------------------------------------------------------------- |
// Edge kinds. |
-inline bool NodeProperties::IsInputRange(Node::Edge edge, int first, int num) { |
+inline bool NodeProperties::IsInputRange(Edge edge, int first, int num) { |
// TODO(titzer): edge.index() is linear time; |
// edges maybe need to be marked as value/effect/control. |
if (num == 0) return false; |
@@ -109,25 +109,25 @@ inline bool NodeProperties::IsInputRange(Node::Edge edge, int first, int num) { |
return first <= index && index < first + num; |
} |
-inline bool NodeProperties::IsValueEdge(Node::Edge edge) { |
+inline bool NodeProperties::IsValueEdge(Edge edge) { |
Node* node = edge.from(); |
return IsInputRange(edge, FirstValueIndex(node), |
node->op()->ValueInputCount()); |
} |
-inline bool NodeProperties::IsContextEdge(Node::Edge edge) { |
+inline bool NodeProperties::IsContextEdge(Edge edge) { |
Node* node = edge.from(); |
return IsInputRange(edge, FirstContextIndex(node), |
OperatorProperties::GetContextInputCount(node->op())); |
} |
-inline bool NodeProperties::IsEffectEdge(Node::Edge edge) { |
+inline bool NodeProperties::IsEffectEdge(Edge edge) { |
Node* node = edge.from(); |
return IsInputRange(edge, FirstEffectIndex(node), |
node->op()->EffectInputCount()); |
} |
-inline bool NodeProperties::IsControlEdge(Node::Edge edge) { |
+inline bool NodeProperties::IsControlEdge(Edge edge) { |
Node* node = edge.from(); |
return IsInputRange(edge, FirstControlIndex(node), |
node->op()->ControlInputCount()); |
@@ -176,13 +176,12 @@ inline void NodeProperties::ReplaceWithValue(Node* node, Node* value, |
} |
// Requires distinguishing between value and effect edges. |
- UseIter iter = node->uses().begin(); |
- while (iter != node->uses().end()) { |
- if (NodeProperties::IsEffectEdge(iter.edge())) { |
+ for (Edge edge : node->use_edges()) { |
+ if (NodeProperties::IsEffectEdge(edge)) { |
DCHECK_NE(NULL, effect); |
- iter = iter.UpdateToAndIncrement(effect); |
+ edge.UpdateTo(effect); |
} else { |
- iter = iter.UpdateToAndIncrement(value); |
+ edge.UpdateTo(value); |
} |
} |
} |