Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Unified Diff: src/compiler/code-generator-impl.h

Issue 1050803002: [turbofan] cleanup InstructionOperand a little (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/code-generator.cc ('k') | src/compiler/gap-resolver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(); }
« no previous file with comments | « src/compiler/code-generator.cc ('k') | src/compiler/gap-resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698