| Index: test/compiler-unittests/instruction-selector-unittest.h
|
| diff --git a/test/compiler-unittests/instruction-selector-unittest.h b/test/compiler-unittests/instruction-selector-unittest.h
|
| index 42aac9f44ebaba619bc03f7c610d207439fa6363..127cc1d479df10ccf367f31094908f8717ff9a61 100644
|
| --- a/test/compiler-unittests/instruction-selector-unittest.h
|
| +++ b/test/compiler-unittests/instruction-selector-unittest.h
|
| @@ -24,7 +24,6 @@ class InstructionSelectorTest : public CompilerTest {
|
|
|
| base::RandomNumberGenerator* rng() { return &rng_; }
|
|
|
| - protected:
|
| class Stream;
|
|
|
| enum StreamBuilderMode { kAllInstructions, kTargetInstructions };
|
| @@ -116,10 +115,23 @@ class InstructionSelectorTest : public CompilerTest {
|
| return instructions_[index];
|
| }
|
|
|
| + bool IsDouble(const InstructionOperand* operand) const {
|
| + return IsDouble(ToVreg(operand));
|
| + }
|
| bool IsDouble(int virtual_register) const {
|
| return doubles_.find(virtual_register) != doubles_.end();
|
| }
|
|
|
| + bool IsInteger(const InstructionOperand* operand) const {
|
| + return IsInteger(ToVreg(operand));
|
| + }
|
| + bool IsInteger(int virtual_register) const {
|
| + return !IsDouble(virtual_register) && !IsReference(virtual_register);
|
| + }
|
| +
|
| + bool IsReference(const InstructionOperand* operand) const {
|
| + return IsReference(ToVreg(operand));
|
| + }
|
| bool IsReference(int virtual_register) const {
|
| return references_.find(virtual_register) != references_.end();
|
| }
|
| @@ -129,6 +141,7 @@ class InstructionSelectorTest : public CompilerTest {
|
| }
|
|
|
| int ToVreg(const InstructionOperand* operand) const {
|
| + if (operand->IsConstant()) return operand->index();
|
| EXPECT_EQ(InstructionOperand::UNALLOCATED, operand->kind());
|
| return UnallocatedOperand::cast(operand)->virtual_register();
|
| }
|
|
|