| Index: src/compiler/tail-call-optimization.cc
|
| diff --git a/src/compiler/tail-call-optimization.cc b/src/compiler/tail-call-optimization.cc
|
| index 7e1623aeca6147dda804b1375711aad7f55f67b4..2a4ea149816890da7fb24a4f247ecfdf72039221 100644
|
| --- a/src/compiler/tail-call-optimization.cc
|
| +++ b/src/compiler/tail-call-optimization.cc
|
| @@ -18,7 +18,7 @@ Reduction TailCallOptimization::Reduce(Node* node) {
|
| // The value which is returned must be the result of a potential tail call,
|
| // there must be no try/catch/finally around the Call, and there must be no
|
| // other effect between the Call and the Return nodes.
|
| - Node* const call = NodeProperties::GetValueInput(node, 0);
|
| + Node* const call = NodeProperties::GetValueInput(node, 1);
|
| if (call->opcode() == IrOpcode::kCall &&
|
| CallDescriptorOf(call->op())->SupportsTailCalls() &&
|
| NodeProperties::GetEffectInput(node) == call &&
|
| @@ -62,9 +62,10 @@ Reduction TailCallOptimization::Reduce(Node* node) {
|
| // |
|
|
|
| DCHECK_EQ(call, NodeProperties::GetControlInput(control, 0));
|
| - DCHECK_EQ(3, node->InputCount());
|
| + DCHECK_EQ(4, node->InputCount());
|
| node->ReplaceInput(0, NodeProperties::GetEffectInput(call));
|
| node->ReplaceInput(1, NodeProperties::GetControlInput(call));
|
| + node->RemoveInput(3);
|
| node->RemoveInput(2);
|
| for (int index = 0; index < call->op()->ValueInputCount(); ++index) {
|
| node->InsertInput(graph()->zone(), index,
|
|
|