| 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 #ifndef V8_UNITTESTS_COMPILER_INSTRUCTION_SEQUENCE_UNITTEST_H_ | 5 #ifndef V8_UNITTESTS_COMPILER_INSTRUCTION_SEQUENCE_UNITTEST_H_ |
| 6 #define V8_UNITTESTS_COMPILER_INSTRUCTION_SEQUENCE_UNITTEST_H_ | 6 #define V8_UNITTESTS_COMPILER_INSTRUCTION_SEQUENCE_UNITTEST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "src/compiler/instruction.h" | 10 #include "src/compiler/instruction.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 static BlockCompletion Last() { | 149 static BlockCompletion Last() { |
| 150 BlockCompletion completion = {kBlockEnd, TestOperand(), kNoValue, kNoValue}; | 150 BlockCompletion completion = {kBlockEnd, TestOperand(), kNoValue, kNoValue}; |
| 151 return completion; | 151 return completion; |
| 152 } | 152 } |
| 153 | 153 |
| 154 InstructionSequenceTest(); | 154 InstructionSequenceTest(); |
| 155 | 155 |
| 156 void SetNumRegs(int num_general_registers, int num_double_registers); | 156 void SetNumRegs(int num_general_registers, int num_double_registers); |
| 157 int GetNumRegs(MachineRepresentation rep); | 157 int GetNumRegs(MachineRepresentation rep); |
| 158 int GetAllocatableCode(int index, MachineRepresentation rep = kNoRep); | 158 int GetAllocatableCode(int index, MachineRepresentation rep = kNoRep); |
| 159 RegisterConfiguration* config(); | 159 const RegisterConfiguration* config(); |
| 160 InstructionSequence* sequence(); | 160 InstructionSequence* sequence(); |
| 161 | 161 |
| 162 void StartLoop(int loop_blocks); | 162 void StartLoop(int loop_blocks); |
| 163 void EndLoop(); | 163 void EndLoop(); |
| 164 void StartBlock(bool deferred = false); | 164 void StartBlock(bool deferred = false); |
| 165 Instruction* EndBlock(BlockCompletion completion = FallThrough()); | 165 Instruction* EndBlock(BlockCompletion completion = FallThrough()); |
| 166 | 166 |
| 167 TestOperand Imm(int32_t imm = 0); | 167 TestOperand Imm(int32_t imm = 0); |
| 168 VReg Define(TestOperand output_op); | 168 VReg Define(TestOperand output_op); |
| 169 VReg Parameter(TestOperand output_op = Reg()) { return Define(output_op); } | 169 VReg Parameter(TestOperand output_op = Reg()) { return Define(output_op); } |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 bool block_returns_; | 285 bool block_returns_; |
| 286 | 286 |
| 287 DISALLOW_COPY_AND_ASSIGN(InstructionSequenceTest); | 287 DISALLOW_COPY_AND_ASSIGN(InstructionSequenceTest); |
| 288 }; | 288 }; |
| 289 | 289 |
| 290 } // namespace compiler | 290 } // namespace compiler |
| 291 } // namespace internal | 291 } // namespace internal |
| 292 } // namespace v8 | 292 } // namespace v8 |
| 293 | 293 |
| 294 #endif // V8_UNITTESTS_COMPILER_INSTRUCTION_SEQUENCE_UNITTEST_H_ | 294 #endif // V8_UNITTESTS_COMPILER_INSTRUCTION_SEQUENCE_UNITTEST_H_ |
| OLD | NEW |