| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/objects.h" | 5 #include "src/objects.h" |
| 6 | 6 |
| 7 #include <iomanip> | 7 #include <iomanip> |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 return; | 722 return; |
| 723 } | 723 } |
| 724 os << "\n - slot_count: " << slot_count(); | 724 os << "\n - slot_count: " << slot_count(); |
| 725 | 725 |
| 726 TypeFeedbackMetadataIterator iter(this); | 726 TypeFeedbackMetadataIterator iter(this); |
| 727 int parameter_index = 0; | 727 int parameter_index = 0; |
| 728 while (iter.HasNext()) { | 728 while (iter.HasNext()) { |
| 729 FeedbackVectorSlot slot = iter.Next(); | 729 FeedbackVectorSlot slot = iter.Next(); |
| 730 FeedbackVectorSlotKind kind = iter.kind(); | 730 FeedbackVectorSlotKind kind = iter.kind(); |
| 731 os << "\n Slot " << slot << " " << kind; | 731 os << "\n Slot " << slot << " " << kind; |
| 732 if (TypeFeedbackMetadata::SlotRequiresParameter(kind)) { | |
| 733 int parameter_value = this->GetParameter(parameter_index++); | |
| 734 os << " [" << parameter_value << "]"; | |
| 735 } | |
| 736 } | 732 } |
| 737 os << "\n"; | 733 os << "\n"; |
| 738 } | 734 } |
| 739 | 735 |
| 740 | 736 |
| 741 void TypeFeedbackVector::Print() { | 737 void TypeFeedbackVector::Print() { |
| 742 OFStream os(stdout); | 738 OFStream os(stdout); |
| 743 TypeFeedbackVectorPrint(os); | 739 TypeFeedbackVectorPrint(os); |
| 744 os << std::flush; | 740 os << std::flush; |
| 745 } | 741 } |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 case FeedbackVectorSlotKind::INTERPRETER_COMPARE_IC: { | 796 case FeedbackVectorSlotKind::INTERPRETER_COMPARE_IC: { |
| 801 CompareICNexus nexus(this, slot); | 797 CompareICNexus nexus(this, slot); |
| 802 os << Code::ICState2String(nexus.StateFromFeedback()); | 798 os << Code::ICState2String(nexus.StateFromFeedback()); |
| 803 break; | 799 break; |
| 804 } | 800 } |
| 805 case FeedbackVectorSlotKind::STORE_DATA_PROPERTY_IN_LITERAL_IC: { | 801 case FeedbackVectorSlotKind::STORE_DATA_PROPERTY_IN_LITERAL_IC: { |
| 806 StoreDataPropertyInLiteralICNexus nexus(this, slot); | 802 StoreDataPropertyInLiteralICNexus nexus(this, slot); |
| 807 os << Code::ICState2String(nexus.StateFromFeedback()); | 803 os << Code::ICState2String(nexus.StateFromFeedback()); |
| 808 break; | 804 break; |
| 809 } | 805 } |
| 810 case FeedbackVectorSlotKind::CREATE_CLOSURE: { | 806 case FeedbackVectorSlotKind::CREATE_CLOSURE: |
| 811 // TODO(mvstanton): Integrate this into the iterator. | |
| 812 int parameter_value = metadata()->GetParameter(parameter_index++); | |
| 813 os << "[" << parameter_value << "]"; | |
| 814 break; | |
| 815 } | |
| 816 case FeedbackVectorSlotKind::GENERAL: | 807 case FeedbackVectorSlotKind::GENERAL: |
| 817 break; | 808 break; |
| 818 case FeedbackVectorSlotKind::INVALID: | 809 case FeedbackVectorSlotKind::INVALID: |
| 819 case FeedbackVectorSlotKind::KINDS_NUMBER: | 810 case FeedbackVectorSlotKind::KINDS_NUMBER: |
| 820 UNREACHABLE(); | 811 UNREACHABLE(); |
| 821 break; | 812 break; |
| 822 } | 813 } |
| 823 | 814 |
| 824 int entry_size = iter.entry_size(); | 815 int entry_size = iter.entry_size(); |
| 825 for (int i = 0; i < entry_size; i++) { | 816 for (int i = 0; i < entry_size; i++) { |
| (...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1724 printf("Not a transition array\n"); | 1715 printf("Not a transition array\n"); |
| 1725 } else { | 1716 } else { |
| 1726 reinterpret_cast<i::TransitionArray*>(object)->Print(); | 1717 reinterpret_cast<i::TransitionArray*>(object)->Print(); |
| 1727 } | 1718 } |
| 1728 } | 1719 } |
| 1729 | 1720 |
| 1730 extern void _v8_internal_Print_StackTrace() { | 1721 extern void _v8_internal_Print_StackTrace() { |
| 1731 i::Isolate* isolate = i::Isolate::Current(); | 1722 i::Isolate* isolate = i::Isolate::Current(); |
| 1732 isolate->PrintStack(stdout); | 1723 isolate->PrintStack(stdout); |
| 1733 } | 1724 } |
| OLD | NEW |