Index: src/compiler/code-generator-impl.h |
diff --git a/src/compiler/code-generator-impl.h b/src/compiler/code-generator-impl.h |
index 74233ac6fe1dcdc47f0371d0fa99349bfbbb5042..87feddb9eb604d0da7679d9d1eb54f59999e65a6 100644 |
--- a/src/compiler/code-generator-impl.h |
+++ b/src/compiler/code-generator-impl.h |
@@ -90,20 +90,20 @@ class InstructionOperandConverter { |
} |
Register ToRegister(InstructionOperand* op) { |
- DCHECK(op->IsRegister()); |
- return Register::FromAllocationIndex(op->index()); |
+ return Register::FromAllocationIndex(RegisterOperand::cast(op)->index()); |
} |
DoubleRegister ToDoubleRegister(InstructionOperand* op) { |
- DCHECK(op->IsDoubleRegister()); |
- return DoubleRegister::FromAllocationIndex(op->index()); |
+ return DoubleRegister::FromAllocationIndex( |
+ DoubleRegisterOperand::cast(op)->index()); |
} |
Constant ToConstant(InstructionOperand* op) { |
if (op->IsImmediate()) { |
- return gen_->code()->GetImmediate(op->index()); |
+ return gen_->code()->GetImmediate(ImmediateOperand::cast(op)->index()); |
} |
- return gen_->code()->GetConstant(op->index()); |
+ return gen_->code()->GetConstant( |
+ ConstantOperand::cast(op)->virtual_register()); |
} |
double ToDouble(InstructionOperand* op) { return ToConstant(op).ToFloat64(); } |