Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(468)

Unified Diff: src/compiler/scheduler.cc

Issue 896783002: Turn throws into basic block terminators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_trycatch-1
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | test/cctest/compiler/test-run-jsexceptions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | test/cctest/compiler/test-run-jsexceptions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698