From 09b1b9e4d53905841603b77beb6fc5efd56ab0a0 Mon Sep 17 00:00:00 2001 From: "hpayer@chromium.org" Date: Thu, 25 Jul 2013 08:44:40 +0000 Subject: [PATCH] Removed pointer space to pointer space compaction check when migrating objects. BUG= R=jkummerow@chromium.org Review URL: https://codereview.chromium.org/20279002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15871 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/mark-compact.cc | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/mark-compact.cc b/src/mark-compact.cc index 246a512..fb546bf 100644 --- a/src/mark-compact.cc +++ b/src/mark-compact.cc @@ -2740,17 +2740,6 @@ void MarkCompactCollector::MigrateObject(Address dst, HEAP_PROFILE(heap(), ObjectMoveEvent(src, dst)); // TODO(hpayer): Replace that check with an assert. CHECK(dest != LO_SPACE && size <= Page::kMaxNonCodeHeapObjectSize); - // Objects in old pointer space and old data space can just be moved by - // compaction to a different page in the same space. - // TODO(hpayer): Replace that following checks with asserts. - CHECK(!heap_->old_pointer_space()->Contains(src) || - (heap_->old_pointer_space()->Contains(dst) && - heap_->TargetSpace(HeapObject::FromAddress(src)) == - heap_->old_pointer_space())); - CHECK(!heap_->old_data_space()->Contains(src) || - (heap_->old_data_space()->Contains(dst) && - heap_->TargetSpace(HeapObject::FromAddress(src)) == - heap_->old_data_space())); if (dest == OLD_POINTER_SPACE) { // TODO(hpayer): Replace this check with an assert. CHECK(heap_->TargetSpace(HeapObject::FromAddress(src)) == @@ -2800,6 +2789,13 @@ void MarkCompactCollector::MigrateObject(Address dst, Code::cast(HeapObject::FromAddress(dst))->Relocate(dst - src); } else { ASSERT(dest == OLD_DATA_SPACE || dest == NEW_SPACE); + // Objects in old data space can just be moved by compaction to a different + // page in old data space. + // TODO(hpayer): Replace the following check with an assert. + CHECK(!heap_->old_data_space()->Contains(src) || + (heap_->old_data_space()->Contains(dst) && + heap_->TargetSpace(HeapObject::FromAddress(src)) == + heap_->old_data_space())); heap()->MoveBlock(dst, src, size); } Memory::Address_at(src) = dst; -- 2.7.4