Index: test/unittests/compiler/live-range-unittest.cc |
diff --git a/test/unittests/compiler/live-range-unittest.cc b/test/unittests/compiler/live-range-unittest.cc |
index e802aedff19d8cd088dda11df92aa847e2b1c8bc..886a8121c7c4e0f36f0da1989c07654fb1784272 100644 |
--- a/test/unittests/compiler/live-range-unittest.cc |
+++ b/test/unittests/compiler/live-range-unittest.cc |
@@ -32,14 +32,11 @@ |
TopLevelLiveRange* Splinter(TopLevelLiveRange* top, int start, int end, |
int new_id = 0) { |
- if (top->splinter() == nullptr) { |
- TopLevelLiveRange* ret = |
- new (zone()) TopLevelLiveRange(new_id, MachineType::kRepTagged); |
- top->SetSplinter(ret); |
- } |
+ TopLevelLiveRange* ret = |
+ new (zone()) TopLevelLiveRange(new_id, MachineType::kRepTagged); |
top->Splinter(LifetimePosition::FromInt(start), |
- LifetimePosition::FromInt(end), zone()); |
- return top->splinter(); |
+ LifetimePosition::FromInt(end), ret, zone()); |
+ return ret; |
} |
// Ranges first and second match structurally. |
@@ -380,25 +377,6 @@ |
} |
-TEST_F(LiveRangeUnitTest, SplinterMergeMultipleTimes) { |
- TopLevelLiveRange* range = |
- TestRangeBuilder(zone()).Add(0, 3).Add(5, 10).Add(12, 16).Build(); |
- Splinter(range, 4, 6); |
- Splinter(range, 8, 14); |
- TopLevelLiveRange* splinter = range->splinter(); |
- EXPECT_EQ(nullptr, range->next()); |
- EXPECT_EQ(nullptr, splinter->next()); |
- EXPECT_EQ(range, splinter->splintered_from()); |
- |
- TopLevelLiveRange* expected_source = |
- TestRangeBuilder(zone()).Add(0, 3).Add(6, 8).Add(14, 16).Build(); |
- TopLevelLiveRange* expected_splinter = |
- TestRangeBuilder(zone()).Add(5, 6).Add(8, 10).Add(12, 14).Build(); |
- EXPECT_TRUE(RangesMatch(expected_source, range)); |
- EXPECT_TRUE(RangesMatch(expected_splinter, splinter)); |
-} |
- |
- |
TEST_F(LiveRangeUnitTest, MergeMultipleIntervalsRight) { |
TopLevelLiveRange* original = |
TestRangeBuilder(zone()).Add(0, 3).Add(5, 8).Build(); |
@@ -438,9 +416,8 @@ |
TopLevelLiveRange* splinter = |
new (zone()) TopLevelLiveRange(101, MachineType::kRepTagged); |
- vreg->SetSplinter(splinter); |
vreg->Splinter(LifetimePosition::FromInt(4), LifetimePosition::FromInt(12), |
- zone()); |
+ splinter, zone()); |
EXPECT_EQ(101, splinter->vreg()); |
EXPECT_EQ(1, splinter->relative_id()); |