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

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

Issue 2209633002: [Interpreter] Assign feedback slots for binary operations and use them in ignition. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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-feedback-vector.cc
diff --git a/test/cctest/test-feedback-vector.cc b/test/cctest/test-feedback-vector.cc
index ba4d9a9026cc654a4d4ae7d19e85b34f8c3c4cde..bd7e55a2e12c38045666b4792c4f4dce2cf66e84 100644
--- a/test/cctest/test-feedback-vector.cc
+++ b/test/cctest/test-feedback-vector.cc
@@ -365,8 +365,8 @@ TEST(VectorLoadICSlotSharing) {
CompileRun(
"o = 10;"
"function f() {"
- " var x = o + 10;"
- " return o + x + o;"
+ " var x = o || 10;"
+ " return o , x , o;"
"}"
"f();");
Handle<JSFunction> f = GetFunction("f");
@@ -544,13 +544,16 @@ TEST(ReferenceContextAllocatesNoSlots) {
// of x.old and x.young.
Handle<TypeFeedbackVector> feedback_vector(f->feedback_vector());
FeedbackVectorHelper helper(feedback_vector);
- CHECK_EQ(6, helper.slot_count());
+ // we also assign slot for binary operations.
+ CHECK_EQ(7, helper.slot_count());
CHECK_SLOT_KIND(helper, 0, FeedbackVectorSlotKind::LOAD_GLOBAL_IC);
CHECK_SLOT_KIND(helper, 1, FeedbackVectorSlotKind::STORE_IC);
CHECK_SLOT_KIND(helper, 2, FeedbackVectorSlotKind::STORE_IC);
CHECK_SLOT_KIND(helper, 3, FeedbackVectorSlotKind::STORE_IC);
CHECK_SLOT_KIND(helper, 4, FeedbackVectorSlotKind::LOAD_IC);
CHECK_SLOT_KIND(helper, 5, FeedbackVectorSlotKind::LOAD_IC);
+ // Binary operation feedback is a general slot.
+ CHECK_SLOT_KIND(helper, 6, FeedbackVectorSlotKind::GENERAL);
}
}

Powered by Google App Engine
This is Rietveld 408576698