| 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_SELECTOR_UNITTEST_H_ | 5 #ifndef V8_UNITTESTS_COMPILER_INSTRUCTION_SELECTOR_UNITTEST_H_ |
| 6 #define V8_UNITTESTS_COMPILER_INSTRUCTION_SELECTOR_UNITTEST_H_ | 6 #define V8_UNITTESTS_COMPILER_INSTRUCTION_SELECTOR_UNITTEST_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 165 |
| 166 int ToVreg(const InstructionOperand* operand) const { | 166 int ToVreg(const InstructionOperand* operand) const { |
| 167 if (operand->IsConstant()) return operand->index(); | 167 if (operand->IsConstant()) return operand->index(); |
| 168 EXPECT_EQ(InstructionOperand::UNALLOCATED, operand->kind()); | 168 EXPECT_EQ(InstructionOperand::UNALLOCATED, operand->kind()); |
| 169 return UnallocatedOperand::cast(operand)->virtual_register(); | 169 return UnallocatedOperand::cast(operand)->virtual_register(); |
| 170 } | 170 } |
| 171 | 171 |
| 172 int ToVreg(const Node* node) const; | 172 int ToVreg(const Node* node) const; |
| 173 | 173 |
| 174 bool IsFixed(const InstructionOperand* operand, Register reg) const; | 174 bool IsFixed(const InstructionOperand* operand, Register reg) const; |
| 175 bool IsSameAsFirst(const InstructionOperand* operand) const; |
| 175 bool IsUsedAtStart(const InstructionOperand* operand) const; | 176 bool IsUsedAtStart(const InstructionOperand* operand) const; |
| 176 | 177 |
| 177 FrameStateDescriptor* GetFrameStateDescriptor(int deoptimization_id) { | 178 FrameStateDescriptor* GetFrameStateDescriptor(int deoptimization_id) { |
| 178 EXPECT_LT(deoptimization_id, GetFrameStateDescriptorCount()); | 179 EXPECT_LT(deoptimization_id, GetFrameStateDescriptorCount()); |
| 179 return deoptimization_entries_[deoptimization_id]; | 180 return deoptimization_entries_[deoptimization_id]; |
| 180 } | 181 } |
| 181 | 182 |
| 182 int GetFrameStateDescriptorCount() { | 183 int GetFrameStateDescriptorCount() { |
| 183 return static_cast<int>(deoptimization_entries_.size()); | 184 return static_cast<int>(deoptimization_entries_.size()); |
| 184 } | 185 } |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 template <typename T> | 232 template <typename T> |
| 232 class InstructionSelectorTestWithParam | 233 class InstructionSelectorTestWithParam |
| 233 : public InstructionSelectorTest, | 234 : public InstructionSelectorTest, |
| 234 public ::testing::WithParamInterface<T> {}; | 235 public ::testing::WithParamInterface<T> {}; |
| 235 | 236 |
| 236 } // namespace compiler | 237 } // namespace compiler |
| 237 } // namespace internal | 238 } // namespace internal |
| 238 } // namespace v8 | 239 } // namespace v8 |
| 239 | 240 |
| 240 #endif // V8_UNITTESTS_COMPILER_INSTRUCTION_SELECTOR_UNITTEST_H_ | 241 #endif // V8_UNITTESTS_COMPILER_INSTRUCTION_SELECTOR_UNITTEST_H_ |
| OLD | NEW |