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

Side by Side Diff: src/objects-printer.cc

Issue 2676583002: [ic] Encode [Keyed]StoreIC's language mode in slot kind instead of code object's flags. (Closed)
Patch Set: Rebasing Created 3 years, 10 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 unified diff | Download patch
OLDNEW
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 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 void FeedbackVectorSpecBase<Derived>::FeedbackVectorSpecPrint( 690 void FeedbackVectorSpecBase<Derived>::FeedbackVectorSpecPrint(
691 std::ostream& os) { // NOLINT 691 std::ostream& os) { // NOLINT
692 int slot_count = This()->slots(); 692 int slot_count = This()->slots();
693 os << " - slot_count: " << slot_count; 693 os << " - slot_count: " << slot_count;
694 if (slot_count == 0) { 694 if (slot_count == 0) {
695 os << " (empty)\n"; 695 os << " (empty)\n";
696 return; 696 return;
697 } 697 }
698 698
699 for (int slot = 0; slot < slot_count;) { 699 for (int slot = 0; slot < slot_count;) {
700 FeedbackVectorSlotKind kind = This()->GetKind(slot); 700 FeedbackVectorSlotKind kind = This()->GetKind(FeedbackVectorSlot(slot));
701 int entry_size = TypeFeedbackMetadata::GetSlotSize(kind); 701 int entry_size = TypeFeedbackMetadata::GetSlotSize(kind);
702 DCHECK_LT(0, entry_size); 702 DCHECK_LT(0, entry_size);
703 os << "\n Slot #" << slot << " " << kind; 703 os << "\n Slot #" << slot << " " << kind;
704 slot += entry_size; 704 slot += entry_size;
705 } 705 }
706 os << "\n"; 706 os << "\n";
707 } 707 }
708 708
709 void TypeFeedbackMetadata::Print() { 709 void TypeFeedbackMetadata::Print() {
710 OFStream os(stdout); 710 OFStream os(stdout);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 case FeedbackVectorSlotKind::KEYED_LOAD_IC: { 769 case FeedbackVectorSlotKind::KEYED_LOAD_IC: {
770 KeyedLoadICNexus nexus(this, slot); 770 KeyedLoadICNexus nexus(this, slot);
771 os << Code::ICState2String(nexus.StateFromFeedback()); 771 os << Code::ICState2String(nexus.StateFromFeedback());
772 break; 772 break;
773 } 773 }
774 case FeedbackVectorSlotKind::CALL_IC: { 774 case FeedbackVectorSlotKind::CALL_IC: {
775 CallICNexus nexus(this, slot); 775 CallICNexus nexus(this, slot);
776 os << Code::ICState2String(nexus.StateFromFeedback()); 776 os << Code::ICState2String(nexus.StateFromFeedback());
777 break; 777 break;
778 } 778 }
779 case FeedbackVectorSlotKind::STORE_IC: { 779 case FeedbackVectorSlotKind::STORE_SLOPPY_IC:
780 case FeedbackVectorSlotKind::STORE_STRICT_IC: {
780 StoreICNexus nexus(this, slot); 781 StoreICNexus nexus(this, slot);
781 os << Code::ICState2String(nexus.StateFromFeedback()); 782 os << Code::ICState2String(nexus.StateFromFeedback());
782 break; 783 break;
783 } 784 }
784 case FeedbackVectorSlotKind::KEYED_STORE_IC: { 785 case FeedbackVectorSlotKind::KEYED_STORE_SLOPPY_IC:
786 case FeedbackVectorSlotKind::KEYED_STORE_STRICT_IC: {
785 KeyedStoreICNexus nexus(this, slot); 787 KeyedStoreICNexus nexus(this, slot);
786 os << Code::ICState2String(nexus.StateFromFeedback()); 788 os << Code::ICState2String(nexus.StateFromFeedback());
787 break; 789 break;
788 } 790 }
789 case FeedbackVectorSlotKind::INTERPRETER_BINARYOP_IC: { 791 case FeedbackVectorSlotKind::INTERPRETER_BINARYOP_IC: {
790 BinaryOpICNexus nexus(this, slot); 792 BinaryOpICNexus nexus(this, slot);
791 os << Code::ICState2String(nexus.StateFromFeedback()); 793 os << Code::ICState2String(nexus.StateFromFeedback());
792 break; 794 break;
793 } 795 }
794 case FeedbackVectorSlotKind::INTERPRETER_COMPARE_IC: { 796 case FeedbackVectorSlotKind::INTERPRETER_COMPARE_IC: {
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after
1714 printf("Not a transition array\n"); 1716 printf("Not a transition array\n");
1715 } else { 1717 } else {
1716 reinterpret_cast<i::TransitionArray*>(object)->Print(); 1718 reinterpret_cast<i::TransitionArray*>(object)->Print();
1717 } 1719 }
1718 } 1720 }
1719 1721
1720 extern void _v8_internal_Print_StackTrace() { 1722 extern void _v8_internal_Print_StackTrace() {
1721 i::Isolate* isolate = i::Isolate::Current(); 1723 i::Isolate* isolate = i::Isolate::Current();
1722 isolate->PrintStack(stdout); 1724 isolate->PrintStack(stdout);
1723 } 1725 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698