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

Unified Diff: src/compiler/instruction.h

Issue 1542093002: [turbofan] Exhaustive switches for MachineRepresentation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Another attempt to soothe gcc 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 | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/compiler/instruction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction.h
diff --git a/src/compiler/instruction.h b/src/compiler/instruction.h
index 4e4ffdbf729c557c73408619b8c1d86cfa6d4aa7..ca00fc0e9e0f2da1e75f5748811e9a122c06706e 100644
--- a/src/compiler/instruction.h
+++ b/src/compiler/instruction.h
@@ -437,9 +437,14 @@ class LocationOperand : public InstructionOperand {
case MachineRepresentation::kFloat64:
case MachineRepresentation::kTagged:
return true;
- default:
+ case MachineRepresentation::kBit:
+ case MachineRepresentation::kWord8:
+ case MachineRepresentation::kWord16:
+ case MachineRepresentation::kNone:
return false;
}
+ UNREACHABLE();
+ return false;
}
static LocationOperand* cast(InstructionOperand* op) {
@@ -1150,13 +1155,7 @@ class InstructionSequence final : public ZoneObject {
MachineRepresentation::kTagged;
}
bool IsFloat(int virtual_register) const {
- switch (GetRepresentation(virtual_register)) {
- case MachineRepresentation::kFloat32:
- case MachineRepresentation::kFloat64:
- return true;
- default:
- return false;
- }
+ return IsFloatingPoint(GetRepresentation(virtual_register));
}
Instruction* GetBlockStart(RpoNumber rpo) const;
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/compiler/instruction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698