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

Unified Diff: src/ic-inl.h

Issue 445943002: CallIC must update type feedback info correctly. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Code comments. Created 6 years, 4 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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic-inl.h
diff --git a/src/ic-inl.h b/src/ic-inl.h
index 4a3edbe3f9bdcc59f2d7510ce3a967ba92092323..ad0078e886565cb89f9e91eb58b340d8d965b4a3 100644
--- a/src/ic-inl.h
+++ b/src/ic-inl.h
@@ -168,6 +168,20 @@ Handle<Map> IC::GetICCacheHolder(HeapType* type, Isolate* isolate,
return TypeToMap(type, isolate);
}
+
+IC::State CallIC::FeedbackObjectToState(Object* feedback) const {
+ IC::State state = UNINITIALIZED;
+
+ if (feedback == *TypeFeedbackInfo::MegamorphicSentinel(isolate())) {
+ state = GENERIC;
+ } else if (feedback->IsAllocationSite() || feedback->IsJSFunction()) {
+ state = MONOMORPHIC;
+ } else {
+ CHECK(feedback == *TypeFeedbackInfo::UninitializedSentinel(isolate()));
+ }
+
+ return state;
+}
} } // namespace v8::internal
#endif // V8_IC_INL_H_
« no previous file with comments | « src/ic.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698