OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef V8_FEEDBACK_VECTOR_H_ | 5 #ifndef V8_FEEDBACK_VECTOR_H_ |
6 #define V8_FEEDBACK_VECTOR_H_ | 6 #define V8_FEEDBACK_VECTOR_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "src/base/logging.h" | 10 #include "src/base/logging.h" |
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 CollectTypeProfileNexus(Handle<FeedbackVector> vector, FeedbackSlot slot) | 757 CollectTypeProfileNexus(Handle<FeedbackVector> vector, FeedbackSlot slot) |
758 : FeedbackNexus(vector, slot) { | 758 : FeedbackNexus(vector, slot) { |
759 DCHECK_EQ(FeedbackSlotKind::kTypeProfile, vector->GetKind(slot)); | 759 DCHECK_EQ(FeedbackSlotKind::kTypeProfile, vector->GetKind(slot)); |
760 } | 760 } |
761 CollectTypeProfileNexus(FeedbackVector* vector, FeedbackSlot slot) | 761 CollectTypeProfileNexus(FeedbackVector* vector, FeedbackSlot slot) |
762 : FeedbackNexus(vector, slot) { | 762 : FeedbackNexus(vector, slot) { |
763 DCHECK_EQ(FeedbackSlotKind::kTypeProfile, vector->GetKind(slot)); | 763 DCHECK_EQ(FeedbackSlotKind::kTypeProfile, vector->GetKind(slot)); |
764 } | 764 } |
765 | 765 |
766 // Add a type to the list of types. | 766 // Add a type to the list of types. |
767 void Collect(Handle<Name> type); | 767 void Collect(Handle<Name> type, int position); |
768 | 768 |
769 // Dump the types to stdout. | 769 // Dump the types to stdout. |
770 // TODO(franzih): pass this information to the debugger protocol instead of | 770 // TODO(franzih): pass this information to the debugger protocol instead of |
771 // stdout. | 771 // stdout. |
772 void Print() const; | 772 void Print() const; |
773 | 773 |
774 InlineCacheState StateFromFeedback() const override; | 774 InlineCacheState StateFromFeedback() const override; |
775 }; | 775 }; |
776 | 776 |
777 inline BinaryOperationHint BinaryOperationHintFromFeedback(int type_feedback); | 777 inline BinaryOperationHint BinaryOperationHintFromFeedback(int type_feedback); |
778 inline CompareOperationHint CompareOperationHintFromFeedback(int type_feedback); | 778 inline CompareOperationHint CompareOperationHintFromFeedback(int type_feedback); |
779 | 779 |
780 } // namespace internal | 780 } // namespace internal |
781 } // namespace v8 | 781 } // namespace v8 |
782 | 782 |
783 #endif // V8_FEEDBACK_VECTOR_H_ | 783 #endif // V8_FEEDBACK_VECTOR_H_ |
OLD | NEW |