Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(370)

Unified Diff: src/type-feedback-vector-inl.h

Issue 2043723002: Make type-feedback-vector.h be self-contained. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/type-feedback-vector.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/type-feedback-vector-inl.h
diff --git a/src/type-feedback-vector-inl.h b/src/type-feedback-vector-inl.h
index 02a567bb350ddeb1f2c2486771e8ac737cef4c63..2c971cac5d93aaef5e10017364d5fc8927d5ba67 100644
--- a/src/type-feedback-vector-inl.h
+++ b/src/type-feedback-vector-inl.h
@@ -78,12 +78,6 @@ TypeFeedbackMetadata* TypeFeedbackVector::metadata() const {
}
-FeedbackVectorSlotKind TypeFeedbackVector::GetKind(
- FeedbackVectorSlot slot) const {
- DCHECK(!is_empty());
- return metadata()->GetKind(slot);
-}
-
// static
int TypeFeedbackVector::GetIndex(FeedbackVectorSlot slot) {
return kReservedIndexCount + slot.ToInt();
@@ -153,6 +147,21 @@ Symbol* TypeFeedbackVector::RawUninitializedSentinel(Isolate* isolate) {
return isolate->heap()->uninitialized_symbol();
}
+bool TypeFeedbackMetadataIterator::HasNext() const {
+ return slot_.ToInt() < metadata()->slot_count();
+}
+
+FeedbackVectorSlot TypeFeedbackMetadataIterator::Next() {
+ DCHECK(HasNext());
+ FeedbackVectorSlot slot = slot_;
+ slot_kind_ = metadata()->GetKind(slot);
+ slot_ = FeedbackVectorSlot(slot_.ToInt() + entry_size());
+ return slot;
+}
+
+int TypeFeedbackMetadataIterator::entry_size() const {
+ return TypeFeedbackMetadata::GetSlotSize(kind());
+}
Object* FeedbackNexus::GetFeedback() const { return vector()->Get(slot()); }
« no previous file with comments | « src/type-feedback-vector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698