OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/interpreter/bytecode-array-builder.h" | 7 #include "src/interpreter/bytecode-array-builder.h" |
8 #include "src/interpreter/bytecode-register-allocator.h" | 8 #include "src/interpreter/bytecode-register-allocator.h" |
| 9 #include "src/objects-inl.h" |
9 #include "test/unittests/test-utils.h" | 10 #include "test/unittests/test-utils.h" |
10 | 11 |
11 namespace v8 { | 12 namespace v8 { |
12 namespace internal { | 13 namespace internal { |
13 namespace interpreter { | 14 namespace interpreter { |
14 | 15 |
15 class BytecodeRegisterAllocatorTest : public TestWithIsolateAndZone { | 16 class BytecodeRegisterAllocatorTest : public TestWithIsolateAndZone { |
16 public: | 17 public: |
17 BytecodeRegisterAllocatorTest() : allocator_(0) {} | 18 BytecodeRegisterAllocatorTest() : allocator_(0) {} |
18 ~BytecodeRegisterAllocatorTest() override {} | 19 ~BytecodeRegisterAllocatorTest() override {} |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 CHECK_EQ(reg_list[0].index(), 1); | 105 CHECK_EQ(reg_list[0].index(), 1); |
105 CHECK_EQ(reg_list[1].index(), 2); | 106 CHECK_EQ(reg_list[1].index(), 2); |
106 CHECK_EQ(reg_list[2].index(), 3); | 107 CHECK_EQ(reg_list[2].index(), 3); |
107 CHECK_EQ(allocator()->maximum_register_count(), 4); | 108 CHECK_EQ(allocator()->maximum_register_count(), 4); |
108 CHECK_EQ(allocator()->next_register_index(), 4); | 109 CHECK_EQ(allocator()->next_register_index(), 4); |
109 } | 110 } |
110 | 111 |
111 } // namespace interpreter | 112 } // namespace interpreter |
112 } // namespace internal | 113 } // namespace internal |
113 } // namespace v8 | 114 } // namespace v8 |
OLD | NEW |