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

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

Issue 754303003: Flesh out vector ic state query and set mechanisms. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Patch one. Created 6 years, 1 month 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/type-feedback-vector.h
diff --git a/src/type-feedback-vector.h b/src/type-feedback-vector.h
index de5a7e151266ed2ad32cea574b6b315c022f0211..e42051798c74b676ede638747d0377e4936d5604 100644
--- a/src/type-feedback-vector.h
+++ b/src/type-feedback-vector.h
@@ -202,6 +202,9 @@ class FeedbackNexus {
return NULL;
}
+ // TODO(mvstanton): remove FindAllMaps, it didn't survive a code review.
+ void FindAllMaps(MapHandleList* maps) const { ExtractMaps(maps); }
+
virtual InlineCacheState StateFromFeedback() const = 0;
virtual int ExtractMaps(MapHandleList* maps) const = 0;
virtual MaybeHandle<Code> FindHandlerForMap(Handle<Map> map) const = 0;
@@ -250,6 +253,8 @@ class CallICNexus : public FeedbackNexus {
DCHECK(vector->GetKind(slot) == Code::CALL_IC);
}
+ void Clear(Code* host);
+
void ConfigureUninitialized();
void ConfigureGeneric();
void ConfigureMonomorphicArray();
@@ -269,6 +274,65 @@ class CallICNexus : public FeedbackNexus {
return length == 0;
}
};
+
+
+class LoadICNexus : public FeedbackNexus {
+ public:
+ LoadICNexus(Handle<TypeFeedbackVector> vector, FeedbackVectorICSlot slot)
+ : FeedbackNexus(vector, slot) {
+ DCHECK(vector->GetKind(slot) == Code::LOAD_IC);
+ }
+ LoadICNexus(TypeFeedbackVector* vector, FeedbackVectorICSlot slot)
+ : FeedbackNexus(vector, slot) {
+ DCHECK(vector->GetKind(slot) == Code::LOAD_IC);
+ }
+
+ void Clear(Code* host);
+
+ void ConfigureMegamorphic();
+ void ConfigurePremonomorphic();
+ void ConfigureMonomorphic(Handle<HeapType> type, Handle<Code> handler);
+
+ void ConfigurePolymorphic(TypeHandleList* types, CodeHandleList* handlers);
+
+ virtual InlineCacheState StateFromFeedback() const OVERRIDE;
+ virtual int ExtractMaps(MapHandleList* maps) const OVERRIDE;
+ virtual MaybeHandle<Code> FindHandlerForMap(Handle<Map> map) const OVERRIDE;
+ virtual bool FindHandlers(CodeHandleList* code_list,
+ int length = -1) const OVERRIDE;
+};
+
+
+class KeyedLoadICNexus : public FeedbackNexus {
+ public:
+ KeyedLoadICNexus(Handle<TypeFeedbackVector> vector, FeedbackVectorICSlot slot)
+ : FeedbackNexus(vector, slot) {
+ DCHECK(vector->GetKind(slot) == Code::KEYED_LOAD_IC);
+ }
+ KeyedLoadICNexus(TypeFeedbackVector* vector, FeedbackVectorICSlot slot)
+ : FeedbackNexus(vector, slot) {
+ DCHECK(vector->GetKind(slot) == Code::KEYED_LOAD_IC);
+ }
+
+ void Clear(Code* host);
+
+ void ConfigureMegamorphic();
+ void ConfigureGeneric();
+ void ConfigurePremonomorphic();
+ // name can be a null handle for element loads.
+ void ConfigureMonomorphic(Handle<Name> name, Handle<HeapType> type,
+ Handle<Code> handler);
+ // name can be null.
+ void ConfigurePolymorphic(Handle<Name> name, TypeHandleList* types,
+ CodeHandleList* handlers);
+
+ virtual InlineCacheState StateFromFeedback() const OVERRIDE;
+ virtual int ExtractMaps(MapHandleList* maps) const OVERRIDE;
+ virtual MaybeHandle<Code> FindHandlerForMap(Handle<Map> map) const OVERRIDE;
+ virtual bool FindHandlers(CodeHandleList* code_list,
+ int length = -1) const OVERRIDE;
+ virtual Name* FindFirstName() const OVERRIDE;
+};
}
} // namespace v8::internal

Powered by Google App Engine
This is Rietveld 408576698