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

Unified Diff: src/heap/heap.cc

Issue 2372173002: [ic] Properly initialize dummy feedback vector. (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | src/type-feedback-vector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 2472d45b7faf8eced8091f8205348530c80902b7..2c51600aeb2e624bcd010f831530b252eea4ded0 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -2779,18 +2779,18 @@ void Heap::CreateInitialObjects() {
{
StaticFeedbackVectorSpec spec;
- FeedbackVectorSlot load_ic_slot = spec.AddLoadICSlot();
- FeedbackVectorSlot keyed_load_ic_slot = spec.AddKeyedLoadICSlot();
- FeedbackVectorSlot store_ic_slot = spec.AddStoreICSlot();
- FeedbackVectorSlot keyed_store_ic_slot = spec.AddKeyedStoreICSlot();
-
- DCHECK_EQ(load_ic_slot,
- FeedbackVectorSlot(TypeFeedbackVector::kDummyLoadICSlot));
- DCHECK_EQ(keyed_load_ic_slot,
+ FeedbackVectorSlot slot = spec.AddLoadICSlot();
+ DCHECK_EQ(slot, FeedbackVectorSlot(TypeFeedbackVector::kDummyLoadICSlot));
+
+ slot = spec.AddKeyedLoadICSlot();
+ DCHECK_EQ(slot,
FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedLoadICSlot));
- DCHECK_EQ(store_ic_slot,
- FeedbackVectorSlot(TypeFeedbackVector::kDummyStoreICSlot));
- DCHECK_EQ(keyed_store_ic_slot,
+
+ slot = spec.AddStoreICSlot();
+ DCHECK_EQ(slot, FeedbackVectorSlot(TypeFeedbackVector::kDummyStoreICSlot));
+
+ slot = spec.AddKeyedStoreICSlot();
+ DCHECK_EQ(slot,
FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot));
Handle<TypeFeedbackMetadata> dummy_metadata =
@@ -2798,13 +2798,13 @@ void Heap::CreateInitialObjects() {
Handle<TypeFeedbackVector> dummy_vector =
TypeFeedbackVector::New(isolate(), dummy_metadata);
- Object* megamorphic = *TypeFeedbackVector::MegamorphicSentinel(isolate());
- dummy_vector->Set(load_ic_slot, megamorphic, SKIP_WRITE_BARRIER);
- dummy_vector->Set(keyed_load_ic_slot, megamorphic, SKIP_WRITE_BARRIER);
- dummy_vector->Set(store_ic_slot, megamorphic, SKIP_WRITE_BARRIER);
- dummy_vector->Set(keyed_store_ic_slot, megamorphic, SKIP_WRITE_BARRIER);
-
set_dummy_vector(*dummy_vector);
+
+ // Now initialize dummy vector's entries.
+ LoadICNexus(isolate()).ConfigureMegamorphic();
+ StoreICNexus(isolate()).ConfigureMegamorphic();
+ KeyedLoadICNexus(isolate()).ConfigureMegamorphicKeyed(PROPERTY);
+ KeyedStoreICNexus(isolate()).ConfigureMegamorphicKeyed(PROPERTY);
}
{
« no previous file with comments | « no previous file | src/type-feedback-vector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698