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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 DCHECK(vector_ == NULL); | 393 DCHECK(vector_ == NULL); |
394 return vector_handle_; | 394 return vector_handle_; |
395 } | 395 } |
396 TypeFeedbackVector* vector() const { | 396 TypeFeedbackVector* vector() const { |
397 return vector_handle_.is_null() ? vector_ : *vector_handle_; | 397 return vector_handle_.is_null() ? vector_ : *vector_handle_; |
398 } | 398 } |
399 FeedbackVectorSlot slot() const { return slot_; } | 399 FeedbackVectorSlot slot() const { return slot_; } |
400 | 400 |
401 InlineCacheState ic_state() const { return StateFromFeedback(); } | 401 InlineCacheState ic_state() const { return StateFromFeedback(); } |
402 bool IsUninitialized() const { return StateFromFeedback() == UNINITIALIZED; } | 402 bool IsUninitialized() const { return StateFromFeedback() == UNINITIALIZED; } |
| 403 bool IsPremonomorphic() const { |
| 404 return StateFromFeedback() == PREMONOMORPHIC; |
| 405 } |
403 Map* FindFirstMap() const { | 406 Map* FindFirstMap() const { |
404 MapHandleList maps; | 407 MapHandleList maps; |
405 ExtractMaps(&maps); | 408 ExtractMaps(&maps); |
406 if (maps.length() > 0) return *maps.at(0); | 409 if (maps.length() > 0) return *maps.at(0); |
407 return NULL; | 410 return NULL; |
408 } | 411 } |
409 | 412 |
410 // TODO(mvstanton): remove FindAllMaps, it didn't survive a code review. | 413 // TODO(mvstanton): remove FindAllMaps, it didn't survive a code review. |
411 void FindAllMaps(MapHandleList* maps) const { ExtractMaps(maps); } | 414 void FindAllMaps(MapHandleList* maps) const { ExtractMaps(maps); } |
412 | 415 |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 KeyedAccessStoreMode GetKeyedAccessStoreMode() const; | 630 KeyedAccessStoreMode GetKeyedAccessStoreMode() const; |
628 IcCheckType GetKeyType() const; | 631 IcCheckType GetKeyType() const; |
629 | 632 |
630 InlineCacheState StateFromFeedback() const override; | 633 InlineCacheState StateFromFeedback() const override; |
631 Name* FindFirstName() const override; | 634 Name* FindFirstName() const override; |
632 }; | 635 }; |
633 } // namespace internal | 636 } // namespace internal |
634 } // namespace v8 | 637 } // namespace v8 |
635 | 638 |
636 #endif // V8_TRANSITIONS_H_ | 639 #endif // V8_TRANSITIONS_H_ |
OLD | NEW |