Index: src/compiler/node-properties.cc |
diff --git a/src/compiler/node-properties.cc b/src/compiler/node-properties.cc |
index 2719749546f8c5cd43eb02dcb25e06d83336e4ee..cb6c3c43d83c694bc9eebadeb5b893ff53ef2a91 100644 |
--- a/src/compiler/node-properties.cc |
+++ b/src/compiler/node-properties.cc |
@@ -139,6 +139,17 @@ void NodeProperties::ReplaceValueInput(Node* node, Node* value, int index) { |
// static |
+void NodeProperties::ReplaceValueInputs(Node* node, Node* value) { |
+ int value_input_count = node->op()->ValueInputCount(); |
+ DCHECK_LE(1, value_input_count); |
+ node->ReplaceInput(0, value); |
+ while (--value_input_count > 0) { |
+ node->RemoveInput(value_input_count); |
+ } |
+} |
+ |
+ |
+// static |
void NodeProperties::ReplaceContextInput(Node* node, Node* context) { |
node->ReplaceInput(FirstContextIndex(node), context); |
} |