| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 | 168 |
| 169 // The object that indicates an uninitialized cache. | 169 // The object that indicates an uninitialized cache. |
| 170 static inline Handle<Object> UninitializedSentinel(Isolate* isolate); | 170 static inline Handle<Object> UninitializedSentinel(Isolate* isolate); |
| 171 | 171 |
| 172 // The object that indicates a megamorphic state. | 172 // The object that indicates a megamorphic state. |
| 173 static inline Handle<Object> MegamorphicSentinel(Isolate* isolate); | 173 static inline Handle<Object> MegamorphicSentinel(Isolate* isolate); |
| 174 | 174 |
| 175 // The object that indicates a premonomorphic state. | 175 // The object that indicates a premonomorphic state. |
| 176 static inline Handle<Object> PremonomorphicSentinel(Isolate* isolate); | 176 static inline Handle<Object> PremonomorphicSentinel(Isolate* isolate); |
| 177 | 177 |
| 178 // The object that indicates a generic state. | |
| 179 static inline Handle<Object> GenericSentinel(Isolate* isolate); | |
| 180 | |
| 181 // The object that indicates a monomorphic state of Array with | 178 // The object that indicates a monomorphic state of Array with |
| 182 // ElementsKind | 179 // ElementsKind |
| 183 static inline Handle<Object> MonomorphicArraySentinel( | 180 static inline Handle<Object> MonomorphicArraySentinel( |
| 184 Isolate* isolate, ElementsKind elements_kind); | 181 Isolate* isolate, ElementsKind elements_kind); |
| 185 | 182 |
| 186 // A raw version of the uninitialized sentinel that's safe to read during | 183 // A raw version of the uninitialized sentinel that's safe to read during |
| 187 // garbage collection (e.g., for patching the cache). | 184 // garbage collection (e.g., for patching the cache). |
| 188 static inline Object* RawUninitializedSentinel(Heap* heap); | 185 static inline Object* RawUninitializedSentinel(Heap* heap); |
| 189 | 186 |
| 190 private: | 187 private: |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 : FeedbackNexus(vector, slot) { | 338 : FeedbackNexus(vector, slot) { |
| 342 DCHECK(vector->GetKind(slot) == Code::KEYED_LOAD_IC); | 339 DCHECK(vector->GetKind(slot) == Code::KEYED_LOAD_IC); |
| 343 } | 340 } |
| 344 KeyedLoadICNexus(TypeFeedbackVector* vector, FeedbackVectorICSlot slot) | 341 KeyedLoadICNexus(TypeFeedbackVector* vector, FeedbackVectorICSlot slot) |
| 345 : FeedbackNexus(vector, slot) { | 342 : FeedbackNexus(vector, slot) { |
| 346 DCHECK(vector->GetKind(slot) == Code::KEYED_LOAD_IC); | 343 DCHECK(vector->GetKind(slot) == Code::KEYED_LOAD_IC); |
| 347 } | 344 } |
| 348 | 345 |
| 349 void Clear(Code* host); | 346 void Clear(Code* host); |
| 350 | 347 |
| 351 void ConfigureGeneric(); | 348 void ConfigureMegamorphic(); |
| 352 void ConfigurePremonomorphic(); | 349 void ConfigurePremonomorphic(); |
| 353 // name can be a null handle for element loads. | 350 // name can be a null handle for element loads. |
| 354 void ConfigureMonomorphic(Handle<Name> name, Handle<HeapType> type, | 351 void ConfigureMonomorphic(Handle<Name> name, Handle<HeapType> type, |
| 355 Handle<Code> handler); | 352 Handle<Code> handler); |
| 356 // name can be null. | 353 // name can be null. |
| 357 void ConfigurePolymorphic(Handle<Name> name, TypeHandleList* types, | 354 void ConfigurePolymorphic(Handle<Name> name, TypeHandleList* types, |
| 358 CodeHandleList* handlers); | 355 CodeHandleList* handlers); |
| 359 | 356 |
| 360 InlineCacheState StateFromFeedback() const OVERRIDE; | 357 InlineCacheState StateFromFeedback() const OVERRIDE; |
| 361 int ExtractMaps(MapHandleList* maps) const OVERRIDE; | 358 int ExtractMaps(MapHandleList* maps) const OVERRIDE; |
| 362 MaybeHandle<Code> FindHandlerForMap(Handle<Map> map) const OVERRIDE; | 359 MaybeHandle<Code> FindHandlerForMap(Handle<Map> map) const OVERRIDE; |
| 363 virtual bool FindHandlers(CodeHandleList* code_list, | 360 virtual bool FindHandlers(CodeHandleList* code_list, |
| 364 int length = -1) const OVERRIDE; | 361 int length = -1) const OVERRIDE; |
| 365 Name* FindFirstName() const OVERRIDE; | 362 Name* FindFirstName() const OVERRIDE; |
| 366 }; | 363 }; |
| 367 } | 364 } |
| 368 } // namespace v8::internal | 365 } // namespace v8::internal |
| 369 | 366 |
| 370 #endif // V8_TRANSITIONS_H_ | 367 #endif // V8_TRANSITIONS_H_ |
| OLD | NEW |