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