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

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: Fix build break. 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
« no previous file with comments | « 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 570f48abf1f4cedb446898505e49348b4f4b02fa..6eee9ffbcbfe9e1d7d594a8a110279b939126dc9 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -4464,7 +4464,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 =
+ LiteralsArray::New(isolate, 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
@@ -4520,7 +4522,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 =
+ LiteralsArray::New(isolate, vector, shared->num_literals(), TENURED);
Handle<Context> context(isolate->context());
// Add the code several times to the optimized code map.
@@ -4538,7 +4542,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 =
+ LiteralsArray::New(isolate, vector, 23, TENURED);
+
evac_page = Page::FromAddress(lit->address());
BailoutId id = BailoutId(100);
SharedFunctionInfo::AddToOptimizedCodeMap(shared, context, code, lit, id);
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698