Index: src/objects-printer.cc |
diff --git a/src/objects-printer.cc b/src/objects-printer.cc |
index a02297558d8fa6a13c77099e9400f8b520cd1c8b..d20fb9e8d91074b8053d5d3661ef1d895e46764c 100644 |
--- a/src/objects-printer.cc |
+++ b/src/objects-printer.cc |
@@ -570,26 +570,38 @@ void TypeFeedbackVector::TypeFeedbackVectorPrint(std::ostream& os) { // NOLINT |
for (int i = 0; i < ICSlots(); i++) { |
FeedbackVectorICSlot slot(i); |
- Code::Kind kind = GetKind(slot); |
- os << "\n ICSlot " << i; |
- if (kind == Code::LOAD_IC) { |
- LoadICNexus nexus(this, slot); |
- os << " LOAD_IC " << Code::ICState2String(nexus.StateFromFeedback()); |
- } else if (kind == Code::KEYED_LOAD_IC) { |
- KeyedLoadICNexus nexus(this, slot); |
- os << " KEYED_LOAD_IC " |
- << Code::ICState2String(nexus.StateFromFeedback()); |
- } else if (kind == Code::CALL_IC) { |
- CallICNexus nexus(this, slot); |
- os << " CALL_IC " << Code::ICState2String(nexus.StateFromFeedback()); |
- } else if (kind == Code::STORE_IC) { |
- StoreICNexus nexus(this, slot); |
- os << " STORE_IC " << Code::ICState2String(nexus.StateFromFeedback()); |
- } else { |
- DCHECK(kind == Code::KEYED_STORE_IC); |
- KeyedStoreICNexus nexus(this, slot); |
- os << " KEYED_STORE_IC " |
- << Code::ICState2String(nexus.StateFromFeedback()); |
+ FeedbackVectorSlotKind kind = GetKind(slot); |
+ os << "\n ICSlot " << i << " " << kind << " "; |
+ switch (kind) { |
+ case FeedbackVectorSlotKind::LOAD_IC: { |
+ LoadICNexus nexus(this, slot); |
+ os << Code::ICState2String(nexus.StateFromFeedback()); |
+ break; |
+ } |
+ case FeedbackVectorSlotKind::KEYED_LOAD_IC: { |
+ KeyedLoadICNexus nexus(this, slot); |
+ os << Code::ICState2String(nexus.StateFromFeedback()); |
+ break; |
+ } |
+ case FeedbackVectorSlotKind::CALL_IC: { |
+ CallICNexus nexus(this, slot); |
+ os << Code::ICState2String(nexus.StateFromFeedback()); |
+ break; |
+ } |
+ case FeedbackVectorSlotKind::STORE_IC: { |
+ StoreICNexus nexus(this, slot); |
+ os << Code::ICState2String(nexus.StateFromFeedback()); |
+ break; |
+ } |
+ case FeedbackVectorSlotKind::KEYED_STORE_IC: { |
+ KeyedStoreICNexus nexus(this, slot); |
+ os << Code::ICState2String(nexus.StateFromFeedback()); |
+ break; |
+ } |
+ case FeedbackVectorSlotKind::UNUSED: |
+ case FeedbackVectorSlotKind::KINDS_NUMBER: |
+ UNREACHABLE(); |
+ break; |
} |
os << "\n [" << GetIndex(slot) << "]: " << Brief(Get(slot)); |