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

Unified Diff: test/cctest/test-heap.cc

Issue 1374723002: Introduce LiteralsArray to hide it's implementation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: More comments. 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
« src/objects-inl.h ('K') | « src/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-heap.cc
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
index ec76d586772e729b57b6beef971d9ed2439c8f40..0edc6c76b047cff24b76163e0d940d9921122f58 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -4575,7 +4575,9 @@ TEST(Regress513507) {
if (!code->is_optimized_code()) return;
}
- Handle<FixedArray> lit = isolate->factory()->empty_fixed_array();
+ Handle<TypeFeedbackVector> vector = handle(shared->feedback_vector());
+ Handle<LiteralsArray> lit = isolate->factory()->NewLiteralsArray(
+ vector, shared->num_literals(), TENURED);
Handle<Context> context(isolate->context());
// Add the new code several times to the optimized code map and also set an
@@ -4631,7 +4633,9 @@ TEST(Regress514122) {
if (!code->is_optimized_code()) return;
}
- Handle<FixedArray> lit = isolate->factory()->empty_fixed_array();
+ Handle<TypeFeedbackVector> vector = handle(shared->feedback_vector());
+ Handle<LiteralsArray> lit = isolate->factory()->NewLiteralsArray(
+ vector, shared->num_literals(), TENURED);
Handle<Context> context(isolate->context());
// Add the code several times to the optimized code map.
@@ -4649,7 +4653,11 @@ TEST(Regress514122) {
AlwaysAllocateScope always_allocate(isolate);
// Make sure literal is placed on an old-space evacuation candidate.
SimulateFullSpace(heap->old_space());
- Handle<FixedArray> lit = isolate->factory()->NewFixedArray(23, TENURED);
+
+ // Make sure there the number of literals is > 0.
+ Handle<LiteralsArray> lit =
+ isolate->factory()->NewLiteralsArray(vector, 23, TENURED);
+
evac_page = Page::FromAddress(lit->address());
BailoutId id = BailoutId(100);
SharedFunctionInfo::AddToOptimizedCodeMap(shared, context, code, lit, id);
« src/objects-inl.h ('K') | « src/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698