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

Unified Diff: src/objects-printer.cc

Issue 1369973002: Use FeedbackVectorSlotKind instead of Code::Kind for type feedback vector. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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/ic/ic.cc ('k') | src/prettyprinter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« no previous file with comments | « src/ic/ic.cc ('k') | src/prettyprinter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698