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/base/utils/random-number-generator.h" | 5 #include "src/base/utils/random-number-generator.h" |
6 #include "src/compiler/instruction.h" | 6 #include "src/compiler/instruction.h" |
7 #include "src/compiler/pipeline.h" | 7 #include "src/compiler/pipeline.h" |
8 #include "test/unittests/test-utils.h" | 8 #include "test/unittests/test-utils.h" |
9 #include "testing/gmock/include/gmock/gmock.h" | 9 #include "testing/gmock/include/gmock/gmock.h" |
10 | 10 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 completions_.push_back(completion); | 212 completions_.push_back(completion); |
213 CHECK(current_block_ != nullptr); | 213 CHECK(current_block_ != nullptr); |
214 sequence()->EndBlock(current_block_->rpo_number()); | 214 sequence()->EndBlock(current_block_->rpo_number()); |
215 current_block_ = nullptr; | 215 current_block_ = nullptr; |
216 return instruction_index; | 216 return instruction_index; |
217 } | 217 } |
218 | 218 |
219 void Allocate() { | 219 void Allocate() { |
220 CHECK_EQ(nullptr, current_block_); | 220 CHECK_EQ(nullptr, current_block_); |
221 WireBlocks(); | 221 WireBlocks(); |
222 Pipeline::AllocateRegisters(config(), sequence(), true); | 222 Pipeline::AllocateRegistersForTesting(config(), sequence(), true); |
223 } | 223 } |
224 | 224 |
225 TestOperand Imm(int32_t imm = 0) { | 225 TestOperand Imm(int32_t imm = 0) { |
226 int index = sequence()->AddImmediate(Constant(imm)); | 226 int index = sequence()->AddImmediate(Constant(imm)); |
227 return TestOperand(kImmediate, index); | 227 return TestOperand(kImmediate, index); |
228 } | 228 } |
229 | 229 |
230 VReg Parameter(TestOperand output_op = Reg()) { | 230 VReg Parameter(TestOperand output_op = Reg()) { |
231 VReg vreg = NewReg(); | 231 VReg vreg = NewReg(); |
232 InstructionOperand* outputs[1]{ConvertOutputOp(vreg, output_op)}; | 232 InstructionOperand* outputs[1]{ConvertOutputOp(vreg, output_op)}; |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 StartBlock(); | 724 StartBlock(); |
725 Return(DefineConstant()); | 725 Return(DefineConstant()); |
726 EndBlock(); | 726 EndBlock(); |
727 | 727 |
728 Allocate(); | 728 Allocate(); |
729 } | 729 } |
730 | 730 |
731 } // namespace compiler | 731 } // namespace compiler |
732 } // namespace internal | 732 } // namespace internal |
733 } // namespace v8 | 733 } // namespace v8 |
OLD | NEW |