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

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: 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
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 2b072f302144b48a82ee29453d60fc813de2ae5d..3e49fea21d61da6b1b8e10e46b549f97fe266703 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -2721,17 +2721,36 @@ void Heap::CreateInitialObjects() {
{
FeedbackVectorSlotKind kinds[] = {FeedbackVectorSlotKind::LOAD_IC,
+ FeedbackVectorSlotKind::INVALID,
FeedbackVectorSlotKind::KEYED_LOAD_IC,
+ FeedbackVectorSlotKind::INVALID,
FeedbackVectorSlotKind::STORE_IC,
- FeedbackVectorSlotKind::KEYED_STORE_IC};
- StaticFeedbackVectorSpec spec(0, 4, kinds);
+ FeedbackVectorSlotKind::INVALID,
+ FeedbackVectorSlotKind::KEYED_STORE_IC,
+ FeedbackVectorSlotKind::INVALID};
+ StaticFeedbackVectorSpec spec(arraysize(kinds), kinds);
Handle<TypeFeedbackVector> dummy_vector =
- factory->NewTypeFeedbackVector(&spec);
- for (int i = 0; i < 4; i++) {
- dummy_vector->Set(FeedbackVectorICSlot(0),
Igor Sheludko 2015/09/30 16:30:56 I guess we wanted to use FeedbackVectorICSlot(i) h
mvstanton 2015/10/01 10:24:31 Good catch.
- *TypeFeedbackVector::MegamorphicSentinel(isolate()),
- SKIP_WRITE_BARRIER);
+ TypeFeedbackVector::New(isolate(), &spec);
+ for (int i = 0; i < spec.slots(); i++) {
+ if (kinds[i] != FeedbackVectorSlotKind::INVALID) {
+ dummy_vector->Set(FeedbackVectorSlot(i),
+ *TypeFeedbackVector::MegamorphicSentinel(isolate()),
+ SKIP_WRITE_BARRIER);
+ }
}
+ DCHECK_EQ(FeedbackVectorSlotKind::LOAD_IC,
+ dummy_vector->GetKind(
+ FeedbackVectorSlot(TypeFeedbackVector::kDummyLoadICSlot)));
+ DCHECK_EQ(FeedbackVectorSlotKind::KEYED_LOAD_IC,
+ dummy_vector->GetKind(FeedbackVectorSlot(
+ TypeFeedbackVector::kDummyKeyedLoadICSlot)));
+ DCHECK_EQ(FeedbackVectorSlotKind::STORE_IC,
+ dummy_vector->GetKind(
+ FeedbackVectorSlot(TypeFeedbackVector::kDummyStoreICSlot)));
+ DCHECK_EQ(FeedbackVectorSlotKind::KEYED_STORE_IC,
+ dummy_vector->GetKind(FeedbackVectorSlot(
+ TypeFeedbackVector::kDummyKeyedStoreICSlot)));
+
set_dummy_vector(*dummy_vector);
}

Powered by Google App Engine
This is Rietveld 408576698