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

Unified Diff: src/compiler/code-generator.cc

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/arm64/code-generator-arm64.cc ('k') | src/compiler/code-generator-impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/code-generator.cc
diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc
index f1a0975fe286f225a379131c65f0f665f7e24ee5..1fa61041d9b0648d3a39d988aaeaa4fd2b84cd21 100644
--- a/src/compiler/code-generator.cc
+++ b/src/compiler/code-generator.cc
@@ -176,9 +176,11 @@ void CodeGenerator::RecordSafepoint(PointerMap* pointers, Safepoint::Kind kind,
for (int i = 0; i < operands->length(); i++) {
InstructionOperand* pointer = operands->at(i);
if (pointer->IsStackSlot()) {
- safepoint.DefinePointerSlot(pointer->index(), zone());
+ safepoint.DefinePointerSlot(StackSlotOperand::cast(pointer)->index(),
+ zone());
} else if (pointer->IsRegister() && (kind & Safepoint::kWithRegisters)) {
- Register reg = Register::FromAllocationIndex(pointer->index());
+ Register reg = Register::FromAllocationIndex(
+ RegisterOperand::cast(pointer)->index());
safepoint.DefinePointerRegister(reg, zone());
}
}
@@ -512,18 +514,19 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation,
// rather than creating an int value.
if (type == kMachBool || type == kRepBit || type == kMachInt32 ||
type == kMachInt8 || type == kMachInt16) {
- translation->StoreInt32StackSlot(op->index());
+ translation->StoreInt32StackSlot(StackSlotOperand::cast(op)->index());
} else if (type == kMachUint32 || type == kMachUint16 ||
type == kMachUint8) {
- translation->StoreUint32StackSlot(op->index());
+ translation->StoreUint32StackSlot(StackSlotOperand::cast(op)->index());
} else if ((type & kRepMask) == kRepTagged) {
- translation->StoreStackSlot(op->index());
+ translation->StoreStackSlot(StackSlotOperand::cast(op)->index());
} else {
CHECK(false);
}
} else if (op->IsDoubleStackSlot()) {
DCHECK((type & (kRepFloat32 | kRepFloat64)) != 0);
- translation->StoreDoubleStackSlot(op->index());
+ translation->StoreDoubleStackSlot(
+ DoubleStackSlotOperand::cast(op)->index());
} else if (op->IsRegister()) {
InstructionOperandConverter converter(this, instr);
// TODO(jarin) kMachBool and kRepBit should materialize true and false
« no previous file with comments | « src/compiler/arm64/code-generator-arm64.cc ('k') | src/compiler/code-generator-impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698