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: test/cctest/test-heap.cc

Issue 650073002: vector-based ICs did not update type feedback counts correctly. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed problematic field TypeFeedbackInfo::feedback_vector(). Created 6 years, 2 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: test/cctest/test-heap.cc
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
index ee476db6cdc4729b1a65a560fe03734a65f2bfdb..af81bfae332b1d0ed9aa80a33b0bb06edfa5b155 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -3147,20 +3147,18 @@ TEST(IncrementalMarkingClearsTypeFeedbackInfo) {
Handle<TypeFeedbackVector> feedback_vector(f->shared()->feedback_vector());
- int expected_length = FLAG_vector_ics ? 4 : 2;
- CHECK_EQ(expected_length, feedback_vector->length());
- for (int i = 0; i < expected_length; i++) {
- if ((i % 2) == 1) {
- CHECK(feedback_vector->get(i)->IsJSFunction());
- }
+ int expected_slots = 2;
+ CHECK_EQ(expected_slots, feedback_vector->ICSlots());
+ for (int i = 0; i < expected_slots; i++) {
+ CHECK(feedback_vector->Get(FeedbackVectorICSlot(i))->IsJSFunction());
}
SimulateIncrementalMarking(CcTest::heap());
CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
- CHECK_EQ(expected_length, feedback_vector->length());
- for (int i = 0; i < expected_length; i++) {
- CHECK_EQ(feedback_vector->get(i),
+ CHECK_EQ(expected_slots, feedback_vector->ICSlots());
+ for (int i = 0; i < expected_slots; i++) {
+ CHECK_EQ(feedback_vector->Get(FeedbackVectorICSlot(i)),
*TypeFeedbackVector::UninitializedSentinel(CcTest::i_isolate()));
}
}

Powered by Google App Engine
This is Rietveld 408576698