Index: src/compiler/node-properties-inl.h |
diff --git a/src/compiler/node-properties-inl.h b/src/compiler/node-properties-inl.h |
index 78baf4d142bb96e1542739f530319769624d7b57..541c302e708e734471b854df290ce988bdcb4ac8 100644 |
--- a/src/compiler/node-properties-inl.h |
+++ b/src/compiler/node-properties-inl.h |
@@ -44,8 +44,7 @@ inline int NodeProperties::FirstControlIndex(Node* node) { |
inline int NodeProperties::PastValueIndex(Node* node) { |
- return FirstValueIndex(node) + |
- OperatorProperties::GetValueInputCount(node->op()); |
+ return FirstValueIndex(node) + node->op()->ValueInputCount(); |
} |
inline int NodeProperties::PastContextIndex(Node* node) { |
@@ -59,13 +58,11 @@ inline int NodeProperties::PastFrameStateIndex(Node* node) { |
} |
inline int NodeProperties::PastEffectIndex(Node* node) { |
- return FirstEffectIndex(node) + |
- OperatorProperties::GetEffectInputCount(node->op()); |
+ return FirstEffectIndex(node) + node->op()->EffectInputCount(); |
} |
inline int NodeProperties::PastControlIndex(Node* node) { |
- return FirstControlIndex(node) + |
- OperatorProperties::GetControlInputCount(node->op()); |
+ return FirstControlIndex(node) + node->op()->ControlInputCount(); |
} |
@@ -73,8 +70,7 @@ inline int NodeProperties::PastControlIndex(Node* node) { |
// Input accessors. |
inline Node* NodeProperties::GetValueInput(Node* node, int index) { |
- DCHECK(0 <= index && |
- index < OperatorProperties::GetValueInputCount(node->op())); |
+ DCHECK(0 <= index && index < node->op()->ValueInputCount()); |
return node->InputAt(FirstValueIndex(node) + index); |
} |
@@ -89,14 +85,12 @@ inline Node* NodeProperties::GetFrameStateInput(Node* node) { |
} |
inline Node* NodeProperties::GetEffectInput(Node* node, int index) { |
- DCHECK(0 <= index && |
- index < OperatorProperties::GetEffectInputCount(node->op())); |
+ DCHECK(0 <= index && index < node->op()->EffectInputCount()); |
return node->InputAt(FirstEffectIndex(node) + index); |
} |
inline Node* NodeProperties::GetControlInput(Node* node, int index) { |
- DCHECK(0 <= index && |
- index < OperatorProperties::GetControlInputCount(node->op())); |
+ DCHECK(0 <= index && index < node->op()->ControlInputCount()); |
return node->InputAt(FirstControlIndex(node) + index); |
} |
@@ -119,7 +113,7 @@ inline bool NodeProperties::IsInputRange(Node::Edge edge, int first, int num) { |
inline bool NodeProperties::IsValueEdge(Node::Edge edge) { |
Node* node = edge.from(); |
return IsInputRange(edge, FirstValueIndex(node), |
- OperatorProperties::GetValueInputCount(node->op())); |
+ node->op()->ValueInputCount()); |
} |
inline bool NodeProperties::IsContextEdge(Node::Edge edge) { |
@@ -131,13 +125,13 @@ inline bool NodeProperties::IsContextEdge(Node::Edge edge) { |
inline bool NodeProperties::IsEffectEdge(Node::Edge edge) { |
Node* node = edge.from(); |
return IsInputRange(edge, FirstEffectIndex(node), |
- OperatorProperties::GetEffectInputCount(node->op())); |
+ node->op()->EffectInputCount()); |
} |
inline bool NodeProperties::IsControlEdge(Node::Edge edge) { |
Node* node = edge.from(); |
return IsInputRange(edge, FirstControlIndex(node), |
- OperatorProperties::GetControlInputCount(node->op())); |
+ node->op()->ControlInputCount()); |
} |
@@ -158,7 +152,7 @@ inline void NodeProperties::ReplaceControlInput(Node* node, Node* control) { |
inline void NodeProperties::ReplaceEffectInput(Node* node, Node* effect, |
int index) { |
- DCHECK(index < OperatorProperties::GetEffectInputCount(node->op())); |
+ DCHECK(index < node->op()->EffectInputCount()); |
return node->ReplaceInput(FirstEffectIndex(node) + index, effect); |
} |
@@ -169,7 +163,7 @@ inline void NodeProperties::ReplaceFrameStateInput(Node* node, |
} |
inline void NodeProperties::RemoveNonValueInputs(Node* node) { |
- node->TrimInputCount(OperatorProperties::GetValueInputCount(node->op())); |
+ node->TrimInputCount(node->op()->ValueInputCount()); |
} |
@@ -177,8 +171,8 @@ inline void NodeProperties::RemoveNonValueInputs(Node* node) { |
// {effect}. If {effect == NULL}, then use the effect input to {node}. |
inline void NodeProperties::ReplaceWithValue(Node* node, Node* value, |
Node* effect) { |
- DCHECK(!OperatorProperties::HasControlOutput(node->op())); |
- if (effect == NULL && OperatorProperties::HasEffectInput(node->op())) { |
+ DCHECK(node->op()->ControlOutputCount() == 0); |
+ if (effect == NULL && node->op()->EffectInputCount() > 0) { |
effect = NodeProperties::GetEffectInput(node); |
} |
@@ -215,7 +209,7 @@ inline void NodeProperties::SetBounds(Node* node, Bounds b) { |
} |
inline bool NodeProperties::AllValueInputsAreTyped(Node* node) { |
- int input_count = OperatorProperties::GetValueInputCount(node->op()); |
+ int input_count = node->op()->ValueInputCount(); |
for (int i = 0; i < input_count; ++i) { |
if (!IsTyped(GetValueInput(node, i))) return false; |
} |