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

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

Issue 1212063005: Revert of Reland: Fix logic for incremental marking steps on tenured allocation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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/heap/spaces.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 878d36be33c78f71cab54a22904d20fdd2467499..3f60f60af20825f287524ff6bb38784ea1b5d3b9 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -2029,10 +2029,6 @@
HeapObject* filler2;
if (double_misalignment) {
start = AlignOldSpace(kDoubleAligned, 0);
- // If we run out of linear allocation area then we might get null here. In
- // that case we are unlucky and the test is not going to work, but it's not
- // a test failure, this is a reasonable thing to happen. Just abandon.
- if (start == NULL) return;
obj = OldSpaceAllocateAligned(kPointerSize, kDoubleAligned);
// The object is aligned, and a filler object is created after.
CHECK(IsAddressAligned(obj->address(), kDoubleAlignment));
@@ -2041,7 +2037,6 @@
filler1->Size() == kPointerSize);
// Try the opposite alignment case.
start = AlignOldSpace(kDoubleAligned, kPointerSize);
- if (start == NULL) return;
obj = OldSpaceAllocateAligned(kPointerSize, kDoubleAligned);
CHECK(IsAddressAligned(obj->address(), kDoubleAlignment));
filler1 = HeapObject::FromAddress(start);
@@ -2053,7 +2048,6 @@
// Similarly for kDoubleUnaligned.
start = AlignOldSpace(kDoubleUnaligned, 0);
- if (start == NULL) return;
obj = OldSpaceAllocateAligned(kPointerSize, kDoubleUnaligned);
// The object is aligned, and a filler object is created after.
CHECK(IsAddressAligned(obj->address(), kDoubleAlignment, kPointerSize));
@@ -2062,7 +2056,6 @@
filler1->Size() == kPointerSize);
// Try the opposite alignment case.
start = AlignOldSpace(kDoubleUnaligned, kPointerSize);
- if (start == NULL) return;
obj = OldSpaceAllocateAligned(kPointerSize, kDoubleUnaligned);
CHECK(IsAddressAligned(obj->address(), kDoubleAlignment, kPointerSize));
filler1 = HeapObject::FromAddress(start);
@@ -2073,7 +2066,6 @@
// Now test SIMD alignment. There are 2 or 4 possible alignments, depending
// on platform.
start = AlignOldSpace(kSimd128Unaligned, 0);
- if (start == NULL) return;
obj = OldSpaceAllocateAligned(kPointerSize, kSimd128Unaligned);
CHECK(IsAddressAligned(obj->address(), kSimd128Alignment, kPointerSize));
// There is a filler object after the object.
@@ -2081,7 +2073,6 @@
CHECK(obj != filler1 && filler1->IsFiller() &&
filler1->Size() == kSimd128Size - kPointerSize);
start = AlignOldSpace(kSimd128Unaligned, kPointerSize);
- if (start == NULL) return;
obj = OldSpaceAllocateAligned(kPointerSize, kSimd128Unaligned);
CHECK(IsAddressAligned(obj->address(), kSimd128Alignment, kPointerSize));
// There is a filler object before the object.
@@ -2092,7 +2083,6 @@
if (double_misalignment) {
// Test the 2 other alignments possible on 32 bit platforms.
start = AlignOldSpace(kSimd128Unaligned, 2 * kPointerSize);
- if (start == NULL) return;
obj = OldSpaceAllocateAligned(kPointerSize, kSimd128Unaligned);
CHECK(IsAddressAligned(obj->address(), kSimd128Alignment, kPointerSize));
// There are filler objects before and after the object.
@@ -2103,7 +2093,6 @@
CHECK(obj != filler2 && filler2->IsFiller() &&
filler2->Size() == kPointerSize);
start = AlignOldSpace(kSimd128Unaligned, 3 * kPointerSize);
- if (start == NULL) return;
obj = OldSpaceAllocateAligned(kPointerSize, kSimd128Unaligned);
CHECK(IsAddressAligned(obj->address(), kSimd128Alignment, kPointerSize));
// There are filler objects before and after the object.
@@ -5401,10 +5390,9 @@
Handle<JSObject> o = factory->NewJSObjectFromMap(map1, TENURED, false);
o->set_properties(*factory->empty_fixed_array());
- // Ensure that the object allocated where we need it. If not, then abandon
- // the test, since this isn't actually something we can reasonably require.
+ // Ensure that the object allocated where we need it.
Page* page = Page::FromAddress(o->address());
- if (desired_offset != page->Offset(o->address())) return;
+ CHECK_EQ(desired_offset, page->Offset(o->address()));
// Now we have an object right at the end of the page.
« no previous file with comments | « src/heap/spaces.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698