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

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

Issue 2504153002: [TypeFeedbackVector] Root literal arrays in function literals slots (Closed)
Patch Set: REBASE. Created 4 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
Index: test/cctest/test-feedback-vector.cc
diff --git a/test/cctest/test-feedback-vector.cc b/test/cctest/test-feedback-vector.cc
index 1f9ddc6f55ea22e23f2c2c3ccd13303e8d379edd..9a3e2563bccd6fae63e0d6975bd9a97b283647c7 100644
--- a/test/cctest/test-feedback-vector.cc
+++ b/test/cctest/test-feedback-vector.cc
@@ -95,6 +95,22 @@ TEST(VectorStructure) {
FeedbackVectorSlotKind::CALL_IC),
vector->length());
}
+
+ {
+ FeedbackVectorSpec spec(&zone);
+ spec.AddGeneralSlot();
+ spec.AddCreateClosureSlot(5);
+ spec.AddGeneralSlot();
+ vector = NewTypeFeedbackVector(isolate, &spec);
+ FeedbackVectorHelper helper(vector);
+ CHECK_EQ(1, TypeFeedbackMetadata::GetSlotSize(
+ FeedbackVectorSlotKind::CREATE_CLOSURE));
+ FeedbackVectorSlot slot = helper.slot(1);
+ FixedArray* array = FixedArray::cast(vector->Get(slot));
+ CHECK_EQ(5, array->length());
+ CHECK_EQ(5, vector->GetParameter(slot));
+ CHECK_EQ(array->get(0), *factory->undefined_value());
+ }
}
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/TopLevelObjectLiterals.golden ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698