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

Unified Diff: src/heap/heap.cc

Issue 1370303004: Distinction between FeedbackVectorICSlot and FeedbackVectorSlot eliminated. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed release builds Created 5 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 | « src/heap/heap.h ('k') | src/heap/heap-inl.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 2b072f302144b48a82ee29453d60fc813de2ae5d..bc24f454e0db7a09a29356778416958236f94e22 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -2720,18 +2720,30 @@ void Heap::CreateInitialObjects() {
set_microtask_queue(empty_fixed_array());
{
- FeedbackVectorSlotKind kinds[] = {FeedbackVectorSlotKind::LOAD_IC,
- FeedbackVectorSlotKind::KEYED_LOAD_IC,
- FeedbackVectorSlotKind::STORE_IC,
- FeedbackVectorSlotKind::KEYED_STORE_IC};
- StaticFeedbackVectorSpec spec(0, 4, kinds);
+ 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(TypeFeedbackVector::kDummyKeyedLoadICSlot));
+ DCHECK_EQ(store_ic_slot,
+ FeedbackVectorSlot(TypeFeedbackVector::kDummyStoreICSlot));
+ DCHECK_EQ(keyed_store_ic_slot,
+ FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot));
+
Handle<TypeFeedbackVector> dummy_vector =
- factory->NewTypeFeedbackVector(&spec);
- for (int i = 0; i < 4; i++) {
- dummy_vector->Set(FeedbackVectorICSlot(0),
- *TypeFeedbackVector::MegamorphicSentinel(isolate()),
- SKIP_WRITE_BARRIER);
- }
+ TypeFeedbackVector::New(isolate(), &spec);
+
+ 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);
}
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/heap-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698