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

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

Issue 683883002: Revert "Introduce FeedbackNexus for vector-based ics." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
« no previous file with comments | « src/ic/ic.cc ('k') | src/ic/ic-state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic-inl.h
diff --git a/src/ic/ic-inl.h b/src/ic/ic-inl.h
index 22f66d0409b03d45ce443c95caf897d4cb5d8628..91b8955fd47ca08b7eb2cd6d63aa788cf67efb23 100644
--- a/src/ic/ic-inl.h
+++ b/src/ic/ic-inl.h
@@ -208,12 +208,30 @@ Handle<Map> IC::GetICCacheHolder(HeapType* type, Isolate* isolate,
}
-inline Code* IC::get_host() {
+inline Code* CallIC::get_host() {
return isolate()
->inner_pointer_to_code_cache()
->GetCacheEntry(address())
->code;
}
+
+
+// static
+IC::State CallIC::FeedbackToState(Isolate* isolate, TypeFeedbackVector* vector,
+ FeedbackVectorICSlot slot) {
+ IC::State state = UNINITIALIZED;
+ Object* feedback = vector->Get(slot);
+
+ if (feedback == *TypeFeedbackVector::MegamorphicSentinel(isolate)) {
+ state = GENERIC;
+ } else if (feedback->IsAllocationSite() || feedback->IsJSFunction()) {
+ state = MONOMORPHIC;
+ } else {
+ CHECK(feedback == *TypeFeedbackVector::UninitializedSentinel(isolate));
+ }
+
+ return state;
+}
}
} // namespace v8::internal
« no previous file with comments | « src/ic/ic.cc ('k') | src/ic/ic-state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698