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/checks.h" | 10 #include "src/checks.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 void change_ic_generic_count(int delta) { | 127 void change_ic_generic_count(int delta) { |
128 if (delta == 0) return; | 128 if (delta == 0) return; |
129 int value = ic_generic_count() + delta; | 129 int value = ic_generic_count() + delta; |
130 if (value >= 0) { | 130 if (value >= 0) { |
131 set(kGenericCountIndex, Smi::FromInt(value)); | 131 set(kGenericCountIndex, Smi::FromInt(value)); |
132 } | 132 } |
133 } | 133 } |
134 | 134 |
135 inline int ic_metadata_length() const; | 135 inline int ic_metadata_length() const; |
136 | 136 |
| 137 bool SpecDiffersFrom(const ZoneFeedbackVectorSpec* other_spec) const; |
| 138 |
137 int Slots() const { | 139 int Slots() const { |
138 if (length() == 0) return 0; | 140 if (length() == 0) return 0; |
139 return Max( | 141 return Max( |
140 0, first_ic_slot_index() - ic_metadata_length() - kReservedIndexCount); | 142 0, first_ic_slot_index() - ic_metadata_length() - kReservedIndexCount); |
141 } | 143 } |
142 | 144 |
143 int ICSlots() const { | 145 int ICSlots() const { |
144 if (length() == 0) return 0; | 146 if (length() == 0) return 0; |
145 return (length() - first_ic_slot_index()) / elements_per_ic_slot(); | 147 return (length() - first_ic_slot_index()) / elements_per_ic_slot(); |
146 } | 148 } |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 void ConfigurePolymorphic(Handle<Name> name, MapHandleList* maps, | 418 void ConfigurePolymorphic(Handle<Name> name, MapHandleList* maps, |
417 CodeHandleList* handlers); | 419 CodeHandleList* handlers); |
418 | 420 |
419 InlineCacheState StateFromFeedback() const OVERRIDE; | 421 InlineCacheState StateFromFeedback() const OVERRIDE; |
420 Name* FindFirstName() const OVERRIDE; | 422 Name* FindFirstName() const OVERRIDE; |
421 }; | 423 }; |
422 } | 424 } |
423 } // namespace v8::internal | 425 } // namespace v8::internal |
424 | 426 |
425 #endif // V8_TRANSITIONS_H_ | 427 #endif // V8_TRANSITIONS_H_ |
OLD | NEW |