Index: src/compiler/scheduler.cc |
diff --git a/src/compiler/scheduler.cc b/src/compiler/scheduler.cc |
index 3a2af0234614794baed8bd80677891aac9432847..066b4a13776444b54ca5aea936f9bcdd3894266b 100644 |
--- a/src/compiler/scheduler.cc |
+++ b/src/compiler/scheduler.cc |
@@ -345,6 +345,10 @@ class CFGBuilder : public ZoneObject { |
scheduler_->UpdatePlacement(node, Scheduler::kFixed); |
ConnectDeoptimize(node); |
break; |
+ case IrOpcode::kTailCall: |
+ scheduler_->UpdatePlacement(node, Scheduler::kFixed); |
+ ConnectTailCall(node); |
+ break; |
case IrOpcode::kReturn: |
scheduler_->UpdatePlacement(node, Scheduler::kFixed); |
ConnectReturn(node); |
@@ -487,6 +491,13 @@ class CFGBuilder : public ZoneObject { |
} |
} |
+ void ConnectTailCall(Node* call) { |
+ Node* call_control = NodeProperties::GetControlInput(call); |
+ BasicBlock* call_block = FindPredecessorBlock(call_control); |
+ TraceConnect(call, call_block, NULL); |
+ schedule_->AddTailCall(call_block, call); |
+ } |
+ |
void ConnectReturn(Node* ret) { |
Node* return_control = NodeProperties::GetControlInput(ret); |
BasicBlock* return_block = FindPredecessorBlock(return_control); |