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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
175 // 3: feedback slot #0 (N >= 3) | 175 // 3: feedback slot #0 (N >= 3) |
176 // ... | 176 // ... |
177 // N + slot_count - 1: feedback slot #(slot_count-1) | 177 // N + slot_count - 1: feedback slot #(slot_count-1) |
178 // | 178 // |
179 class TypeFeedbackVector : public FixedArray { | 179 class TypeFeedbackVector : public FixedArray { |
180 public: | 180 public: |
181 // Casting. | 181 // Casting. |
182 static inline TypeFeedbackVector* cast(Object* obj); | 182 static inline TypeFeedbackVector* cast(Object* obj); |
183 | 183 |
184 static const int kMetadataIndex = 0; | 184 static const int kMetadataIndex = 0; |
185 static const int kWithTypesIndex = 1; | 185 static const int kReservedIndexCount = 1; |
186 static const int kGenericCountIndex = 2; | |
187 static const int kReservedIndexCount = 3; | |
188 | 186 |
189 inline int ic_with_type_info_count(); | 187 inline void compute_counts(int* with_type_info, int* generic); |
Benedikt Meurer
2015/12/09 07:23:02
ComputeCounts
mvstanton
2015/12/09 07:37:32
Done.
| |
190 inline void change_ic_with_type_info_count(int delta); | |
191 inline int ic_generic_count(); | |
192 inline void change_ic_generic_count(int delta); | |
193 | 188 |
194 inline bool is_empty() const; | 189 inline bool is_empty() const; |
195 | 190 |
196 // Returns number of slots in the vector. | 191 // Returns number of slots in the vector. |
197 inline int slot_count() const; | 192 inline int slot_count() const; |
198 | 193 |
199 inline TypeFeedbackMetadata* metadata() const; | 194 inline TypeFeedbackMetadata* metadata() const; |
200 | 195 |
201 // Conversion from a slot to an integer index to the underlying array. | 196 // Conversion from a slot to an integer index to the underlying array. |
202 inline int GetIndex(FeedbackVectorSlot slot) const; | 197 inline int GetIndex(FeedbackVectorSlot slot) const; |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
543 KeyedAccessStoreMode GetKeyedAccessStoreMode() const; | 538 KeyedAccessStoreMode GetKeyedAccessStoreMode() const; |
544 IcCheckType GetKeyType() const; | 539 IcCheckType GetKeyType() const; |
545 | 540 |
546 InlineCacheState StateFromFeedback() const override; | 541 InlineCacheState StateFromFeedback() const override; |
547 Name* FindFirstName() const override; | 542 Name* FindFirstName() const override; |
548 }; | 543 }; |
549 } // namespace internal | 544 } // namespace internal |
550 } // namespace v8 | 545 } // namespace v8 |
551 | 546 |
552 #endif // V8_TRANSITIONS_H_ | 547 #endif // V8_TRANSITIONS_H_ |
OLD | NEW |