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

Unified Diff: src/objects-printer.cc

Issue 1370303004: Distinction between FeedbackVectorICSlot and FeedbackVectorSlot eliminated. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed release builds 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/objects.cc ('k') | src/ppc/lithium-codegen-ppc.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 8dfd0a17b09d45fc677e74e044f9b76c1cbaa7a1..9a50ccf7a9e74dd265d5220ad28d10f0b21eb60b 100644
--- a/src/objects-printer.cc
+++ b/src/objects-printer.cc
@@ -557,56 +557,50 @@ void TypeFeedbackVector::TypeFeedbackVectorPrint(std::ostream& os) { // NOLINT
os << "\n - ics with type info: " << ic_with_type_info_count();
os << "\n - generic ics: " << ic_generic_count();
- if (Slots() > 0) {
- for (int i = 0; i < Slots(); i++) {
- FeedbackVectorSlot slot(i);
- os << "\n Slot " << i << " [" << GetIndex(slot)
- << "]: " << Brief(Get(slot));
- }
- }
-
- if (ICSlots() > 0) {
- DCHECK(elements_per_ic_slot() == 2);
-
- for (int i = 0; i < ICSlots(); i++) {
- FeedbackVectorICSlot slot(i);
- 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;
+ TypeFeedbackMetadataIterator iter(this);
+ while (iter.HasNext()) {
+ FeedbackVectorSlot slot = iter.Next();
+ FeedbackVectorSlotKind kind = iter.kind();
+
+ os << "\n ICSlot " << slot.ToInt() << " " << 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::GENERAL:
+ break;
+ case FeedbackVectorSlotKind::INVALID:
+ case FeedbackVectorSlotKind::KINDS_NUMBER:
+ UNREACHABLE();
+ break;
+ }
- os << "\n [" << GetIndex(slot) << "]: " << Brief(Get(slot));
- os << "\n [" << (GetIndex(slot) + 1)
- << "]: " << Brief(get(GetIndex(slot) + 1));
+ int entry_size = iter.entry_size();
+ for (int i = 0; i < entry_size; i++) {
+ int index = GetIndex(slot) + i;
+ os << "\n [" << index << "]: " << Brief(get(index));
}
}
os << "\n";
« no previous file with comments | « src/objects.cc ('k') | src/ppc/lithium-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698