| 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 | 210 |
| 211 // Returns slot kind for given slot. | 211 // Returns slot kind for given slot. |
| 212 FeedbackVectorSlotKind GetKind(FeedbackVectorSlot slot) const; | 212 FeedbackVectorSlotKind GetKind(FeedbackVectorSlot slot) const; |
| 213 | 213 |
| 214 // Returns parameter for given index (note: this is not the slot) | 214 // Returns parameter for given index (note: this is not the slot) |
| 215 int GetParameter(int parameter_index) const; | 215 int GetParameter(int parameter_index) const; |
| 216 | 216 |
| 217 template <typename Spec> | 217 template <typename Spec> |
| 218 static Handle<TypeFeedbackMetadata> New(Isolate* isolate, const Spec* spec); | 218 static Handle<TypeFeedbackMetadata> New(Isolate* isolate, const Spec* spec); |
| 219 | 219 |
| 220 // Ensure that the given shared function info has type feedback metadata with | |
| 221 // the given spec. | |
| 222 static void EnsureAllocated(Isolate* isolate, Handle<SharedFunctionInfo> sfi, | |
| 223 const FeedbackVectorSpec* spec); | |
| 224 | |
| 225 #ifdef OBJECT_PRINT | 220 #ifdef OBJECT_PRINT |
| 226 // For gdb debugging. | 221 // For gdb debugging. |
| 227 void Print(); | 222 void Print(); |
| 228 #endif // OBJECT_PRINT | 223 #endif // OBJECT_PRINT |
| 229 | 224 |
| 230 DECLARE_PRINTER(TypeFeedbackMetadata) | 225 DECLARE_PRINTER(TypeFeedbackMetadata) |
| 231 | 226 |
| 232 static const char* Kind2String(FeedbackVectorSlotKind kind); | 227 static const char* Kind2String(FeedbackVectorSlotKind kind); |
| 233 | 228 |
| 234 private: | 229 private: |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 InlineCacheState StateFromFeedback() const override; | 734 InlineCacheState StateFromFeedback() const override; |
| 740 }; | 735 }; |
| 741 | 736 |
| 742 inline BinaryOperationHint BinaryOperationHintFromFeedback(int type_feedback); | 737 inline BinaryOperationHint BinaryOperationHintFromFeedback(int type_feedback); |
| 743 inline CompareOperationHint CompareOperationHintFromFeedback(int type_feedback); | 738 inline CompareOperationHint CompareOperationHintFromFeedback(int type_feedback); |
| 744 | 739 |
| 745 } // namespace internal | 740 } // namespace internal |
| 746 } // namespace v8 | 741 } // namespace v8 |
| 747 | 742 |
| 748 #endif // V8_TRANSITIONS_H_ | 743 #endif // V8_TRANSITIONS_H_ |
| OLD | NEW |