Index: test/unittests/compiler/scheduler-unittest.cc |
diff --git a/test/unittests/compiler/scheduler-unittest.cc b/test/unittests/compiler/scheduler-unittest.cc |
index 5ebe270677dfe26880364e1de93745639554aea0..22b04ef9ec17d4e8ff01ce66191626a61443eea4 100644 |
--- a/test/unittests/compiler/scheduler-unittest.cc |
+++ b/test/unittests/compiler/scheduler-unittest.cc |
@@ -138,6 +138,8 @@ const Operator kIntAdd(IrOpcode::kInt32Add, Operator::kPure, "Int32Add", 2, 0, |
0, 1, 0, 0); |
const Operator kMockCall(IrOpcode::kCall, Operator::kNoProperties, "MockCall", |
0, 0, 1, 1, 0, 2); |
+const Operator kMockTailCall(IrOpcode::kTailCall, Operator::kNoProperties, |
+ "MockTailCall", 1, 1, 1, 0, 0, 1); |
} // namespace |
@@ -2406,6 +2408,20 @@ TARGET_TEST_F(SchedulerTest, CallException) { |
} |
+TARGET_TEST_F(SchedulerTest, TailCall) { |
+ Node* start = graph()->NewNode(common()->Start(1)); |
+ graph()->SetStart(start); |
+ |
+ Node* p0 = graph()->NewNode(common()->Parameter(0), start); |
+ Node* call = graph()->NewNode(&kMockTailCall, p0, start, start); |
+ Node* end = graph()->NewNode(common()->End(), call); |
+ |
+ graph()->SetEnd(end); |
+ |
+ ComputeAndVerifySchedule(4); |
+} |
+ |
+ |
TARGET_TEST_F(SchedulerTest, Switch) { |
Node* start = graph()->NewNode(common()->Start(1)); |
graph()->SetStart(start); |