Index: src/compiler/scheduler.cc |
diff --git a/src/compiler/scheduler.cc b/src/compiler/scheduler.cc |
index 6281371abacc6b737045d38ac1f5de4ef32c4bcb..e0d659822c857a6bac8cd602b31cc2c77bebf195 100644 |
--- a/src/compiler/scheduler.cc |
+++ b/src/compiler/scheduler.cc |
@@ -336,6 +336,10 @@ class CFGBuilder : public ZoneObject { |
scheduler_->UpdatePlacement(node, Scheduler::kFixed); |
ConnectReturn(node); |
break; |
+ case IrOpcode::kThrow: |
+ scheduler_->UpdatePlacement(node, Scheduler::kFixed); |
+ ConnectThrow(node); |
+ break; |
default: |
break; |
} |
@@ -447,6 +451,13 @@ class CFGBuilder : public ZoneObject { |
schedule_->AddReturn(return_block, ret); |
} |
+ void ConnectThrow(Node* thr) { |
+ Node* throw_block_node = NodeProperties::GetControlInput(thr); |
+ BasicBlock* throw_block = schedule_->block(throw_block_node); |
+ TraceConnect(thr, throw_block, NULL); |
+ schedule_->AddThrow(throw_block, thr); |
+ } |
+ |
void TraceConnect(Node* node, BasicBlock* block, BasicBlock* succ) { |
DCHECK(block); |
if (succ == NULL) { |