| Index: src/compiler/node.cc
|
| diff --git a/src/compiler/node.cc b/src/compiler/node.cc
|
| index e4e22b402357ef1dbe7f0984612eff5081c2e070..f4e7b17ed235fda2c6d0e7b6ac19e950c98e7d26 100644
|
| --- a/src/compiler/node.cc
|
| +++ b/src/compiler/node.cc
|
| @@ -193,6 +193,22 @@ void Node::InsertInput(Zone* zone, int index, Node* new_to) {
|
| Verify();
|
| }
|
|
|
| +void Node::InsertInputs(Zone* zone, int index, int count) {
|
| + DCHECK_NOT_NULL(zone);
|
| + DCHECK_LE(0, index);
|
| + DCHECK_LT(0, count);
|
| + DCHECK_LT(index, InputCount());
|
| + for (int i = 0; i < count; i++) {
|
| + AppendInput(zone, InputAt(Max(InputCount() - count, 0)));
|
| + }
|
| + for (int i = InputCount() - count - 1; i >= Max(index, count); --i) {
|
| + ReplaceInput(i, InputAt(i - count));
|
| + }
|
| + for (int i = 0; i < count; i++) {
|
| + ReplaceInput(index + i, nullptr);
|
| + }
|
| + Verify();
|
| +}
|
|
|
| void Node::RemoveInput(int index) {
|
| DCHECK_LE(0, index);
|
|
|