Index: src/machine-type.cc |
diff --git a/src/machine-type.cc b/src/machine-type.cc |
index fcc3e9797375bccd8b4c6b7a3c3e67a3d095d7db..7c4ddd3967f88cdc9bc6ee2488bca743318f6383 100644 |
--- a/src/machine-type.cc |
+++ b/src/machine-type.cc |
@@ -9,33 +9,36 @@ namespace v8 { |
namespace internal { |
std::ostream& operator<<(std::ostream& os, MachineRepresentation rep) { |
+ return os << MachineReprToString(rep); |
+} |
+ |
+const char* MachineReprToString(MachineRepresentation rep) { |
switch (rep) { |
case MachineRepresentation::kNone: |
- return os << "kMachNone"; |
+ return "kMachNone"; |
case MachineRepresentation::kBit: |
- return os << "kRepBit"; |
+ return "kRepBit"; |
case MachineRepresentation::kWord8: |
- return os << "kRepWord8"; |
+ return "kRepWord8"; |
case MachineRepresentation::kWord16: |
- return os << "kRepWord16"; |
+ return "kRepWord16"; |
case MachineRepresentation::kWord32: |
- return os << "kRepWord32"; |
+ return "kRepWord32"; |
case MachineRepresentation::kWord64: |
- return os << "kRepWord64"; |
+ return "kRepWord64"; |
case MachineRepresentation::kFloat32: |
- return os << "kRepFloat32"; |
+ return "kRepFloat32"; |
case MachineRepresentation::kFloat64: |
- return os << "kRepFloat64"; |
+ return "kRepFloat64"; |
case MachineRepresentation::kSimd128: |
- return os << "kRepSimd128"; |
+ return "kRepSimd128"; |
case MachineRepresentation::kTagged: |
- return os << "kRepTagged"; |
+ return "kRepTagged"; |
} |
UNREACHABLE(); |
- return os; |
+ return nullptr; |
} |
- |
std::ostream& operator<<(std::ostream& os, MachineSemantic type) { |
switch (type) { |
case MachineSemantic::kNone: |