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

Unified Diff: test/cctest/test-feedback-vector.cc

Issue 767743002: Hydrogen code stubs for vector-based ICs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 6 years 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 | « test/cctest/test-api.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-feedback-vector.cc
diff --git a/test/cctest/test-feedback-vector.cc b/test/cctest/test-feedback-vector.cc
index 79ceb7fc663568afe2f2605a398a324166e1aec1..fa2f195b64289244f9bce59b37388971570ecb1f 100644
--- a/test/cctest/test-feedback-vector.cc
+++ b/test/cctest/test-feedback-vector.cc
@@ -40,11 +40,17 @@ TEST(VectorStructure) {
CHECK_EQ(0, vector->ICSlots());
FeedbackVectorSpec one_icslot(0, 1);
+ if (FLAG_vector_ics) {
+ one_icslot.SetKind(0, Code::CALL_IC);
+ }
vector = factory->NewTypeFeedbackVector(one_icslot);
CHECK_EQ(0, vector->Slots());
CHECK_EQ(1, vector->ICSlots());
FeedbackVectorSpec spec(3, 5);
+ if (FLAG_vector_ics) {
+ for (int i = 0; i < 5; i++) spec.SetKind(i, Code::CALL_IC);
+ }
vector = factory->NewTypeFeedbackVector(spec);
CHECK_EQ(3, vector->Slots());
CHECK_EQ(5, vector->ICSlots());
@@ -295,8 +301,8 @@ TEST(VectorLoadICStates) {
CHECK_EQ(MEGAMORPHIC, nexus.StateFromFeedback());
CHECK_EQ(NULL, nexus.FindFirstMap());
- // After a collection, state should be reset to PREMONOMORPHIC.
+ // After a collection, state should not be reset to PREMONOMORPHIC.
heap->CollectAllGarbage(i::Heap::kNoGCFlags);
- CHECK_EQ(PREMONOMORPHIC, nexus.StateFromFeedback());
+ CHECK_EQ(MEGAMORPHIC, nexus.StateFromFeedback());
}
}
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698