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

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

Issue 1670813005: Revert of Type Feedback Vector lives in the closure (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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') | src/x64/builtins-x64.cc » ('j') | 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 f3f5929fef20e26f5462625a44d138ffa5db6292..97df1b9ae994abac87a7615d865a08bede05192c 100644
--- a/src/type-feedback-vector-inl.h
+++ b/src/type-feedback-vector-inl.h
@@ -80,17 +80,17 @@
return metadata()->GetKind(slot);
}
-// static
-int TypeFeedbackVector::GetIndex(FeedbackVectorSlot slot) {
+
+int TypeFeedbackVector::GetIndex(FeedbackVectorSlot slot) const {
+ DCHECK(slot.ToInt() < slot_count());
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.
-// static
-FeedbackVectorSlot TypeFeedbackVector::ToSlot(int index) {
- DCHECK(index >= kReservedIndexCount);
+FeedbackVectorSlot TypeFeedbackVector::ToSlot(int index) const {
+ DCHECK(index >= kReservedIndexCount && index < length());
return FeedbackVectorSlot(index - kReservedIndexCount);
}
« no previous file with comments | « src/type-feedback-vector.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698