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

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

Issue 882633002: Reland "Only use FreeSpace objects in the free list" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix windows build Created 5 years, 11 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 | « test/cctest/test-serialize.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-spaces.cc
diff --git a/test/cctest/test-spaces.cc b/test/cctest/test-spaces.cc
index a84b867f8de0ef387ad15d7bbdc02a95decaed40..331ea025109dd4112eb5f2176dec9dc6c479a268 100644
--- a/test/cctest/test-spaces.cc
+++ b/test/cctest/test-spaces.cc
@@ -459,18 +459,6 @@ TEST(SizeOfFirstPageIsLargeEnough) {
}
-static inline void FillCurrentPage(v8::internal::NewSpace* space) {
- int new_linear_size = static_cast<int>(*space->allocation_limit_address() -
- *space->allocation_top_address());
- if (new_linear_size == 0) return;
- v8::internal::AllocationResult allocation =
- space->AllocateRaw(new_linear_size);
- v8::internal::FreeListNode* node =
- v8::internal::FreeListNode::cast(allocation.ToObjectChecked());
- node->set_size(space->heap(), new_linear_size);
-}
-
-
UNINITIALIZED_TEST(NewSpaceGrowsToTargetCapacity) {
FLAG_target_semi_space_size = 2;
if (FLAG_optimize_for_size) return;
@@ -502,9 +490,9 @@ UNINITIALIZED_TEST(NewSpaceGrowsToTargetCapacity) {
// Turn the allocation into a proper object so isolate teardown won't
// crash.
- v8::internal::FreeListNode* node =
- v8::internal::FreeListNode::cast(allocation.ToObjectChecked());
- node->set_size(new_space->heap(), 80);
+ HeapObject* free_space = NULL;
+ CHECK(allocation.To(&free_space));
+ new_space->heap()->CreateFillerObjectAt(free_space->address(), 80);
}
}
isolate->Dispose();
« no previous file with comments | « test/cctest/test-serialize.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698