Chromium Code Reviews

Unified Diff: src/compiler/schedule.cc

Issue 961973002: [turbofan] First shot at eager deoptimization in Turbofan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix 2 Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: src/compiler/schedule.cc
diff --git a/src/compiler/schedule.cc b/src/compiler/schedule.cc
index c3ee33a446802c12fd6503a1fb9d696857daf773..f30e5f61ceb9d944a8afdbe0c16ba2a5822f4a62 100644
--- a/src/compiler/schedule.cc
+++ b/src/compiler/schedule.cc
@@ -106,6 +106,8 @@ std::ostream& operator<<(std::ostream& os, const BasicBlock::Control& c) {
return os << "branch";
case BasicBlock::kSwitch:
return os << "switch";
+ case BasicBlock::kDeoptimize:
+ return os << "deoptimize";
case BasicBlock::kReturn:
return os << "return";
case BasicBlock::kThrow:
@@ -239,6 +241,14 @@ void Schedule::AddReturn(BasicBlock* block, Node* input) {
}
+void Schedule::AddDeoptimize(BasicBlock* block, Node* input) {
+ DCHECK_EQ(BasicBlock::kNone, block->control());
+ block->set_control(BasicBlock::kDeoptimize);
+ SetControlInput(block, input);
+ if (block != end()) AddSuccessor(block, end());
+}
+
+
void Schedule::AddThrow(BasicBlock* block, Node* input) {
DCHECK_EQ(BasicBlock::kNone, block->control());
block->set_control(BasicBlock::kThrow);

Powered by Google App Engine