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

Unified Diff: src/ic/ic.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: REBASE. 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/ia32/lithium-codegen-ia32.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic.h
diff --git a/src/ic/ic.h b/src/ic/ic.h
index 44df480f5500f7b8d10c9bdede035cd36d44d407..5177ff8e22881aa53bd119419142a96a5894a830 100644
--- a/src/ic/ic.h
+++ b/src/ic/ic.h
@@ -86,6 +86,10 @@ class IC {
static void Clear(Isolate* isolate, Address address,
ConstantPoolArray* constant_pool);
+ // Clear the vector-based inline cache to initial state.
+ static void Clear(Isolate* isolate, Code::Kind kind, Code* host,
+ TypeFeedbackVector* vector, FeedbackVectorICSlot slot);
+
#ifdef DEBUG
bool IsLoadStub() const {
return target()->is_load_stub() || target()->is_keyed_load_stub();
@@ -294,26 +298,35 @@ class CallIC : public IC {
explicit CallIC(Isolate* isolate) : IC(EXTRA_CALL_FRAME, isolate) {}
void PatchMegamorphic(Handle<Object> function,
- Handle<TypeFeedbackVector> vector, Handle<Smi> slot);
+ Handle<TypeFeedbackVector> vector,
+ FeedbackVectorICSlot slot);
void HandleMiss(Handle<Object> receiver, Handle<Object> function,
- Handle<TypeFeedbackVector> vector, Handle<Smi> slot);
+ Handle<TypeFeedbackVector> vector, FeedbackVectorICSlot slot);
// Returns true if a custom handler was installed.
bool DoCustomHandler(Handle<Object> receiver, Handle<Object> function,
- Handle<TypeFeedbackVector> vector, Handle<Smi> slot,
- const CallICState& state);
+ Handle<TypeFeedbackVector> vector,
+ FeedbackVectorICSlot slot, const CallICState& state);
// Code generator routines.
static Handle<Code> initialize_stub(Isolate* isolate, int argc,
CallICState::CallType call_type);
- static void Clear(Isolate* isolate, Address address, Code* target,
- ConstantPoolArray* constant_pool);
+ static void Clear(Isolate* isolate, Code* host, TypeFeedbackVector* vector,
+ FeedbackVectorICSlot slot);
private:
- inline IC::State FeedbackToState(Handle<TypeFeedbackVector> vector,
- Handle<Smi> slot) const;
+ static inline IC::State FeedbackToState(Isolate* isolate,
+ TypeFeedbackVector* vector,
+ FeedbackVectorICSlot slot);
+
+ inline Code* get_host();
+
+ // As a vector-based IC, type feedback must be updated differently.
+ static void OnTypeFeedbackChanged(Isolate* isolate, Code* host,
+ TypeFeedbackVector* vector, State old_state,
+ State new_state);
};
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698