| Index: test/unittests/interpreter/bytecode-register-allocator-unittest.cc
|
| diff --git a/test/unittests/interpreter/bytecode-register-allocator-unittest.cc b/test/unittests/interpreter/bytecode-register-allocator-unittest.cc
|
| index f06e454cc943b233fffdfd95e31c61a9ea7f1320..81c6da5f8fe9da9e12ce029599f512b3b8c08631 100644
|
| --- a/test/unittests/interpreter/bytecode-register-allocator-unittest.cc
|
| +++ b/test/unittests/interpreter/bytecode-register-allocator-unittest.cc
|
| @@ -91,6 +91,23 @@ TEST_F(BytecodeRegisterAllocatorTest, RegisterListAllocations) {
|
| CHECK_EQ(allocator()->next_register_index(), 3);
|
| }
|
|
|
| +TEST_F(BytecodeRegisterAllocatorTest, GrowableRegisterListAllocations) {
|
| + CHECK_EQ(allocator()->maximum_register_count(), 0);
|
| + Register reg = allocator()->NewRegister();
|
| + CHECK_EQ(reg.index(), 0);
|
| + RegisterList reg_list = allocator()->NewGrowableRegisterList();
|
| + CHECK_EQ(reg_list.register_count(), 0);
|
| + allocator()->GrowRegisterList(®_list);
|
| + allocator()->GrowRegisterList(®_list);
|
| + allocator()->GrowRegisterList(®_list);
|
| + CHECK_EQ(reg_list.register_count(), 3);
|
| + CHECK_EQ(reg_list[0].index(), 1);
|
| + CHECK_EQ(reg_list[1].index(), 2);
|
| + CHECK_EQ(reg_list[2].index(), 3);
|
| + CHECK_EQ(allocator()->maximum_register_count(), 4);
|
| + CHECK_EQ(allocator()->next_register_index(), 4);
|
| +}
|
| +
|
| } // namespace interpreter
|
| } // namespace internal
|
| } // namespace v8
|
|
|