Index: src/feedback-vector.cc |
diff --git a/src/feedback-vector.cc b/src/feedback-vector.cc |
index 9b07ba016faaff69960276bc02890f362293ec1c..e175044beb93ea0cc9c119d17556a00652678967 100644 |
--- a/src/feedback-vector.cc |
+++ b/src/feedback-vector.cc |
@@ -177,6 +177,17 @@ FeedbackSlotKind FeedbackVector::GetKind(FeedbackSlot slot) const { |
return metadata()->GetKind(slot); |
} |
+FeedbackSlot FeedbackVector::GetTypeProfileSlot() const { |
+ FeedbackMetadataIterator iter(metadata()); |
+ while (iter.HasNext()) { |
+ FeedbackSlot slot = iter.Next(); |
+ if (IsTypeProfile(slot)) { |
+ return slot; |
+ } |
+ } |
+ return FeedbackSlot(); |
+} |
+ |
// static |
Handle<FeedbackVector> FeedbackVector::New(Isolate* isolate, |
Handle<SharedFunctionInfo> shared) { |