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

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: Rebasing 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
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | src/type-feedback-vector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/type-feedback-vector.h
diff --git a/src/type-feedback-vector.h b/src/type-feedback-vector.h
index bf09e1df5d9cb4a03644ac7bd2e2f3edd4c90a8c..5b1908a7a6e020034e836efa22f4a06ffb4e168d 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,24 @@ 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 ConfigureMegamorphic() override { UNREACHABLE(); }
+ void Clear(Code* host);
+
+ void ConfigureMonomorphic(Handle<Map> receiver_map, Handle<Code> handler);
+
+ InlineCacheState StateFromFeedback() const override;
+};
class KeyedLoadICNexus : public FeedbackNexus {
public:
« no previous file with comments | « 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