Chromium Code Reviews

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

Issue 1563213002: Type Feedback Vector lives in the closure (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ports. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: src/type-feedback-vector-inl.h
diff --git a/src/type-feedback-vector-inl.h b/src/type-feedback-vector-inl.h
index 97df1b9ae994abac87a7615d865a08bede05192c..47b43d3dfe1a94834f98f69089c287442fbd8883 100644
--- a/src/type-feedback-vector-inl.h
+++ b/src/type-feedback-vector-inl.h
@@ -81,16 +81,17 @@ FeedbackVectorSlotKind TypeFeedbackVector::GetKind(
}
-int TypeFeedbackVector::GetIndex(FeedbackVectorSlot slot) const {
- DCHECK(slot.ToInt() < slot_count());
+// static
+int TypeFeedbackVector::GetIndex(FeedbackVectorSlot slot) {
return kReservedIndexCount + slot.ToInt();
}
// Conversion from an integer index to either a slot or an ic slot. The caller
// should know what kind she expects.
-FeedbackVectorSlot TypeFeedbackVector::ToSlot(int index) const {
- DCHECK(index >= kReservedIndexCount && index < length());
+// static
+FeedbackVectorSlot TypeFeedbackVector::ToSlot(int index) {
+ DCHECK(index >= kReservedIndexCount);
return FeedbackVectorSlot(index - kReservedIndexCount);
}

Powered by Google App Engine