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 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 std::ostream& os) { // NOLINT | 717 std::ostream& os) { // NOLINT |
718 HeapObject::PrintHeader(os, "TypeFeedbackMetadata"); | 718 HeapObject::PrintHeader(os, "TypeFeedbackMetadata"); |
719 os << "\n - length: " << length(); | 719 os << "\n - length: " << length(); |
720 if (length() == 0) { | 720 if (length() == 0) { |
721 os << " (empty)\n"; | 721 os << " (empty)\n"; |
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; | |
728 while (iter.HasNext()) { | 727 while (iter.HasNext()) { |
729 FeedbackVectorSlot slot = iter.Next(); | 728 FeedbackVectorSlot slot = iter.Next(); |
730 FeedbackVectorSlotKind kind = iter.kind(); | 729 FeedbackVectorSlotKind kind = iter.kind(); |
731 os << "\n Slot " << slot << " " << kind; | 730 os << "\n Slot " << slot << " " << kind; |
732 } | 731 } |
733 os << "\n"; | 732 os << "\n"; |
734 } | 733 } |
735 | 734 |
736 | 735 |
737 void TypeFeedbackVector::Print() { | 736 void TypeFeedbackVector::Print() { |
738 OFStream os(stdout); | 737 OFStream os(stdout); |
739 TypeFeedbackVectorPrint(os); | 738 TypeFeedbackVectorPrint(os); |
740 os << std::flush; | 739 os << std::flush; |
741 } | 740 } |
742 | 741 |
743 | 742 |
744 void TypeFeedbackVector::TypeFeedbackVectorPrint(std::ostream& os) { // NOLINT | 743 void TypeFeedbackVector::TypeFeedbackVectorPrint(std::ostream& os) { // NOLINT |
745 HeapObject::PrintHeader(os, "TypeFeedbackVector"); | 744 HeapObject::PrintHeader(os, "TypeFeedbackVector"); |
746 os << "\n - length: " << length(); | 745 os << "\n - length: " << length(); |
747 if (length() == 0) { | 746 if (length() == 0) { |
748 os << " (empty)\n"; | 747 os << " (empty)\n"; |
749 return; | 748 return; |
750 } | 749 } |
751 | 750 |
752 int parameter_index = 0; | |
753 TypeFeedbackMetadataIterator iter(metadata()); | 751 TypeFeedbackMetadataIterator iter(metadata()); |
754 while (iter.HasNext()) { | 752 while (iter.HasNext()) { |
755 FeedbackVectorSlot slot = iter.Next(); | 753 FeedbackVectorSlot slot = iter.Next(); |
756 FeedbackVectorSlotKind kind = iter.kind(); | 754 FeedbackVectorSlotKind kind = iter.kind(); |
757 | 755 |
758 os << "\n Slot " << slot << " " << kind; | 756 os << "\n Slot " << slot << " " << kind; |
759 os << " "; | 757 os << " "; |
760 switch (kind) { | 758 switch (kind) { |
761 case FeedbackVectorSlotKind::LOAD_IC: { | 759 case FeedbackVectorSlotKind::LOAD_IC: { |
762 LoadICNexus nexus(this, slot); | 760 LoadICNexus nexus(this, slot); |
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1715 printf("Not a transition array\n"); | 1713 printf("Not a transition array\n"); |
1716 } else { | 1714 } else { |
1717 reinterpret_cast<i::TransitionArray*>(object)->Print(); | 1715 reinterpret_cast<i::TransitionArray*>(object)->Print(); |
1718 } | 1716 } |
1719 } | 1717 } |
1720 | 1718 |
1721 extern void _v8_internal_Print_StackTrace() { | 1719 extern void _v8_internal_Print_StackTrace() { |
1722 i::Isolate* isolate = i::Isolate::Current(); | 1720 i::Isolate* isolate = i::Isolate::Current(); |
1723 isolate->PrintStack(stdout); | 1721 isolate->PrintStack(stdout); |
1724 } | 1722 } |
OLD | NEW |