| 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/compiler/pipeline.h" | 5 #include "src/compiler/pipeline.h" |
| 6 #include "test/unittests/compiler/instruction-sequence-unittest.h" | 6 #include "test/unittests/compiler/instruction-sequence-unittest.h" |
| 7 | 7 |
| 8 namespace v8 { | 8 namespace v8 { |
| 9 namespace internal { | 9 namespace internal { |
| 10 namespace compiler { | 10 namespace compiler { |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 | 314 |
| 315 Allocate(); | 315 Allocate(); |
| 316 } | 316 } |
| 317 | 317 |
| 318 | 318 |
| 319 TEST_F(RegisterAllocatorTest, SpillPhi) { | 319 TEST_F(RegisterAllocatorTest, SpillPhi) { |
| 320 StartBlock(); | 320 StartBlock(); |
| 321 EndBlock(Branch(Imm(), 1, 2)); | 321 EndBlock(Branch(Imm(), 1, 2)); |
| 322 | 322 |
| 323 StartBlock(); | 323 StartBlock(); |
| 324 auto left = Define(Reg(0)); | 324 auto left = Define(Reg(GetAllocatableCode(0))); |
| 325 EndBlock(Jump(2)); | 325 EndBlock(Jump(2)); |
| 326 | 326 |
| 327 StartBlock(); | 327 StartBlock(); |
| 328 auto right = Define(Reg(0)); | 328 auto right = Define(Reg(GetAllocatableCode(0))); |
| 329 EndBlock(); | 329 EndBlock(); |
| 330 | 330 |
| 331 StartBlock(); | 331 StartBlock(); |
| 332 auto phi = Phi(left, right); | 332 auto phi = Phi(left, right); |
| 333 EmitCall(Slot(-1)); | 333 EmitCall(Slot(-1)); |
| 334 Return(Reg(phi)); | 334 Return(Reg(phi)); |
| 335 EndBlock(); | 335 EndBlock(); |
| 336 | 336 |
| 337 Allocate(); | 337 Allocate(); |
| 338 } | 338 } |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 INSTANTIATE_TEST_CASE_P( | 789 INSTANTIATE_TEST_CASE_P( |
| 790 RegisterAllocatorTest, SlotConstraintTest, | 790 RegisterAllocatorTest, SlotConstraintTest, |
| 791 ::testing::Combine(::testing::ValuesIn(kParameterTypes), | 791 ::testing::Combine(::testing::ValuesIn(kParameterTypes), |
| 792 ::testing::Range(0, SlotConstraintTest::kMaxVariant))); | 792 ::testing::Range(0, SlotConstraintTest::kMaxVariant))); |
| 793 | 793 |
| 794 #endif // GTEST_HAS_COMBINE | 794 #endif // GTEST_HAS_COMBINE |
| 795 | 795 |
| 796 } // namespace compiler | 796 } // namespace compiler |
| 797 } // namespace internal | 797 } // namespace internal |
| 798 } // namespace v8 | 798 } // namespace v8 |
| OLD | NEW |