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

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

Issue 1912633002: [ic] Split LoadIC into LoadGlobalIC and LoadIC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/type-feedback-vector.h
diff --git a/src/type-feedback-vector.h b/src/type-feedback-vector.h
index bf09e1df5d9cb4a03644ac7bd2e2f3edd4c90a8c..8cd16d847b176721241f80c103eb0821620338a1 100644
--- a/src/type-feedback-vector.h
+++ b/src/type-feedback-vector.h
@@ -15,7 +15,6 @@
namespace v8 {
namespace internal {
-
enum class FeedbackVectorSlotKind {
// This kind means that the slot points to the middle of other slot
// which occupies more than one feedback vector element.
@@ -24,6 +23,7 @@ enum class FeedbackVectorSlotKind {
CALL_IC,
LOAD_IC,
+ LOAD_GLOBAL_IC,
KEYED_LOAD_IC,
STORE_IC,
KEYED_STORE_IC,
@@ -34,7 +34,6 @@ enum class FeedbackVectorSlotKind {
KINDS_NUMBER // Last value indicating number of kinds.
};
-
std::ostream& operator<<(std::ostream& os, FeedbackVectorSlotKind kind);
@@ -51,6 +50,10 @@ class FeedbackVectorSpecBase {
return AddSlot(FeedbackVectorSlotKind::LOAD_IC);
}
+ FeedbackVectorSlot AddLoadGlobalICSlot() {
+ return AddSlot(FeedbackVectorSlotKind::LOAD_GLOBAL_IC);
+ }
+
FeedbackVectorSlot AddKeyedLoadICSlot() {
return AddSlot(FeedbackVectorSlotKind::KEYED_LOAD_IC);
}
@@ -159,7 +162,7 @@ class TypeFeedbackMetadata : public FixedArray {
static const char* Kind2String(FeedbackVectorSlotKind kind);
private:
- static const int kFeedbackVectorSlotKindBits = 3;
+ static const int kFeedbackVectorSlotKindBits = 4;
STATIC_ASSERT(static_cast<int>(FeedbackVectorSlotKind::KINDS_NUMBER) <
(1 << kFeedbackVectorSlotKindBits));
@@ -448,6 +451,25 @@ class LoadICNexus : public FeedbackNexus {
InlineCacheState StateFromFeedback() const override;
};
+class LoadGlobalICNexus : public FeedbackNexus {
+ public:
+ LoadGlobalICNexus(Handle<TypeFeedbackVector> vector, FeedbackVectorSlot slot)
+ : FeedbackNexus(vector, slot) {
+ DCHECK_EQ(FeedbackVectorSlotKind::LOAD_GLOBAL_IC, vector->GetKind(slot));
+ }
+ LoadGlobalICNexus(TypeFeedbackVector* vector, FeedbackVectorSlot slot)
+ : FeedbackNexus(vector, slot) {
+ DCHECK_EQ(FeedbackVectorSlotKind::LOAD_GLOBAL_IC, vector->GetKind(slot));
+ }
+
+ void Clear(Code* host);
+
+ void ConfigureMonomorphic(Handle<Map> receiver_map, Handle<Code> handler);
+
+ void ConfigurePolymorphic(MapHandleList* maps, CodeHandleList* handlers);
+
+ InlineCacheState StateFromFeedback() const override;
+};
class KeyedLoadICNexus : public FeedbackNexus {
public:
« src/ast/ast.cc ('K') | « src/runtime/runtime-object.cc ('k') | src/type-feedback-vector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698