| 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_TYPE_FEEDBACK_VECTOR_H_ | 5 #ifndef V8_TYPE_FEEDBACK_VECTOR_H_ |
| 6 #define V8_TYPE_FEEDBACK_VECTOR_H_ | 6 #define V8_TYPE_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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 static inline TypeFeedbackMetadata* cast(Object* obj); | 211 static inline TypeFeedbackMetadata* cast(Object* obj); |
| 212 | 212 |
| 213 static const int kSlotsCountIndex = 0; | 213 static const int kSlotsCountIndex = 0; |
| 214 static const int kReservedIndexCount = 1; | 214 static const int kReservedIndexCount = 1; |
| 215 | 215 |
| 216 // Returns number of feedback vector elements used by given slot kind. | 216 // Returns number of feedback vector elements used by given slot kind. |
| 217 static inline int GetSlotSize(FeedbackVectorSlotKind kind); | 217 static inline int GetSlotSize(FeedbackVectorSlotKind kind); |
| 218 | 218 |
| 219 bool SpecDiffersFrom(const FeedbackVectorSpec* other_spec) const; | 219 bool SpecDiffersFrom(const FeedbackVectorSpec* other_spec) const; |
| 220 | 220 |
| 221 bool DiffersFrom(const TypeFeedbackMetadata* other_metadata) const; | |
| 222 | |
| 223 inline bool is_empty() const; | 221 inline bool is_empty() const; |
| 224 | 222 |
| 225 // Returns number of slots in the vector. | 223 // Returns number of slots in the vector. |
| 226 inline int slot_count() const; | 224 inline int slot_count() const; |
| 227 | 225 |
| 228 // Returns slot kind for given slot. | 226 // Returns slot kind for given slot. |
| 229 FeedbackVectorSlotKind GetKind(FeedbackVectorSlot slot) const; | 227 FeedbackVectorSlotKind GetKind(FeedbackVectorSlot slot) const; |
| 230 | 228 |
| 231 template <typename Spec> | 229 template <typename Spec> |
| 232 static Handle<TypeFeedbackMetadata> New(Isolate* isolate, const Spec* spec); | 230 static Handle<TypeFeedbackMetadata> New(Isolate* isolate, const Spec* spec); |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 InlineCacheState StateFromFeedback() const override; | 744 InlineCacheState StateFromFeedback() const override; |
| 747 }; | 745 }; |
| 748 | 746 |
| 749 inline BinaryOperationHint BinaryOperationHintFromFeedback(int type_feedback); | 747 inline BinaryOperationHint BinaryOperationHintFromFeedback(int type_feedback); |
| 750 inline CompareOperationHint CompareOperationHintFromFeedback(int type_feedback); | 748 inline CompareOperationHint CompareOperationHintFromFeedback(int type_feedback); |
| 751 | 749 |
| 752 } // namespace internal | 750 } // namespace internal |
| 753 } // namespace v8 | 751 } // namespace v8 |
| 754 | 752 |
| 755 #endif // V8_TRANSITIONS_H_ | 753 #endif // V8_TRANSITIONS_H_ |
| OLD | NEW |