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

Unified Diff: src/ic/ic-inl.h

Issue 650073002: vector-based ICs did not update type feedback counts correctly. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ports. Created 6 years, 2 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
Index: src/ic/ic-inl.h
diff --git a/src/ic/ic-inl.h b/src/ic/ic-inl.h
index e10fb456ce5cc6a8bdc75216a99a59749537b884..bf76e86bbb8f530ce913dba722e2934f8dcf371d 100644
--- a/src/ic/ic-inl.h
+++ b/src/ic/ic-inl.h
@@ -208,21 +208,34 @@ Handle<Map> IC::GetICCacheHolder(HeapType* type, Isolate* isolate,
}
-IC::State CallIC::FeedbackToState(Handle<TypeFeedbackVector> vector,
- Handle<Smi> slot) const {
+// static
+IC::State CallIC::FeedbackToState(Isolate* isolate, TypeFeedbackVector* vector,
+ FeedbackVectorICSlot slot) {
IC::State state = UNINITIALIZED;
- Object* feedback = vector->get(slot->value());
+ Object* feedback = vector->Get(slot);
- if (feedback == *TypeFeedbackVector::MegamorphicSentinel(isolate())) {
+ if (feedback == *TypeFeedbackVector::MegamorphicSentinel(isolate)) {
state = GENERIC;
} else if (feedback->IsAllocationSite() || feedback->IsJSFunction()) {
state = MONOMORPHIC;
} else {
- CHECK(feedback == *TypeFeedbackVector::UninitializedSentinel(isolate()));
+ CHECK(feedback == *TypeFeedbackVector::UninitializedSentinel(isolate));
}
return state;
}
+
+
+IC::State CallIC::FeedbackToState(Handle<TypeFeedbackVector> vector,
+ FeedbackVectorICSlot slot) const {
+ return FeedbackToState(isolate(), *vector, slot);
+}
+
+
+void CallIC::OnTypeFeedbackChanged(Handle<TypeFeedbackVector> vector,
+ State old_state, State new_state) {
+ OnTypeFeedbackChanged(isolate(), address(), *vector, old_state, new_state);
+}
}
} // namespace v8::internal

Powered by Google App Engine
This is Rietveld 408576698