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

Unified Diff: test/cctest/compiler/test-gap-resolver.cc

Issue 1513543003: [turbofan] Make MachineType a pair of enums. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Moar rebase Created 5 years 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 | « test/cctest/compiler/test-changes-lowering.cc ('k') | test/cctest/compiler/test-graph-visualizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-gap-resolver.cc
diff --git a/test/cctest/compiler/test-gap-resolver.cc b/test/cctest/compiler/test-gap-resolver.cc
index e6a5dc2a2cac89ee2733ca36b08e291a4a763241..7f85088809403a73c79461c50290bfebd49f5d86 100644
--- a/test/cctest/compiler/test-gap-resolver.cc
+++ b/test/cctest/compiler/test-gap-resolver.cc
@@ -86,7 +86,7 @@ class InterpreterState {
} else {
index = LocationOperand::cast(op).index();
}
- is_float = IsFloatingPoint(LocationOperand::cast(op).machine_type());
+ is_float = IsFloatingPoint(LocationOperand::cast(op).representation());
kind = LocationOperand::cast(op).location_kind();
} else {
index = ConstantOperand::cast(op).virtual_register();
@@ -178,24 +178,24 @@ class ParallelMoveCreator : public HandleAndZoneScope {
}
private:
- MachineType RandomType() {
+ MachineRepresentation RandomRepresentation() {
int index = rng_->NextInt(3);
switch (index) {
case 0:
- return kRepWord32;
+ return MachineRepresentation::kWord32;
case 1:
- return kRepWord64;
+ return MachineRepresentation::kWord64;
case 2:
- return kRepTagged;
+ return MachineRepresentation::kTagged;
}
UNREACHABLE();
- return kMachNone;
+ return MachineRepresentation::kNone;
}
- MachineType RandomDoubleType() {
+ MachineRepresentation RandomDoubleRepresentation() {
int index = rng_->NextInt(2);
- if (index == 0) return kRepFloat64;
- return kRepFloat32;
+ if (index == 0) return MachineRepresentation::kFloat64;
+ return MachineRepresentation::kFloat32;
}
InstructionOperand CreateRandomOperand(bool is_source) {
@@ -203,24 +203,25 @@ class ParallelMoveCreator : public HandleAndZoneScope {
// destination can't be Constant.
switch (rng_->NextInt(is_source ? 7 : 6)) {
case 0:
- return AllocatedOperand(LocationOperand::STACK_SLOT, RandomType(),
- index);
+ return AllocatedOperand(LocationOperand::STACK_SLOT,
+ RandomRepresentation(), index);
case 1:
- return AllocatedOperand(LocationOperand::STACK_SLOT, RandomDoubleType(),
- index);
+ return AllocatedOperand(LocationOperand::STACK_SLOT,
+ RandomDoubleRepresentation(), index);
case 2:
- return AllocatedOperand(LocationOperand::REGISTER, RandomType(), index);
+ return AllocatedOperand(LocationOperand::REGISTER,
+ RandomRepresentation(), index);
case 3:
- return AllocatedOperand(LocationOperand::REGISTER, RandomDoubleType(),
- index);
+ return AllocatedOperand(LocationOperand::REGISTER,
+ RandomDoubleRepresentation(), index);
case 4:
return ExplicitOperand(
- LocationOperand::REGISTER, RandomType(),
+ LocationOperand::REGISTER, RandomRepresentation(),
RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN)
->GetAllocatableGeneralCode(1));
case 5:
return ExplicitOperand(
- LocationOperand::STACK_SLOT, RandomType(),
+ LocationOperand::STACK_SLOT, RandomRepresentation(),
RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN)
->GetAllocatableGeneralCode(index));
case 6:
« no previous file with comments | « test/cctest/compiler/test-changes-lowering.cc ('k') | test/cctest/compiler/test-graph-visualizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698