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

Unified Diff: src/mark-compact.cc

Issue 20329002: Merged r15868, r15871, r15880, r15884 into trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 7 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/hydrogen.cc ('k') | src/platform-posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index bfeeae9efc04531b39c0577fbc23d8b3cf07e81c..a3834980b6baf155e421aa3ac7a2c10389e1b247 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -2724,21 +2724,11 @@ 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)) ==
- heap_->old_pointer_space());
+ HeapObject* heap_object = HeapObject::FromAddress(src);
+ CHECK(heap_object->IsExternalString() ||
+ heap_->TargetSpace(heap_object) == heap_->old_pointer_space());
Address src_slot = src;
Address dst_slot = dst;
ASSERT(IsAligned(size, kPointerSize));
@@ -2784,6 +2774,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;
« no previous file with comments | « src/hydrogen.cc ('k') | src/platform-posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698