Commit 8a6947af authored by hpayer@chromium.org's avatar hpayer@chromium.org

Forward transition objects to grey if they are referenced by a large object

BUG=

Review URL: https://codereview.chromium.org/11418032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13004 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 397f5291
......@@ -37,16 +37,23 @@ namespace internal {
bool IncrementalMarking::BaseRecordWrite(HeapObject* obj,
Object** slot,
Object* value) {
MarkBit value_bit = Marking::MarkBitFrom(HeapObject::cast(value));
HeapObject* value_heap_obj = HeapObject::cast(value);
MarkBit value_bit = Marking::MarkBitFrom(value_heap_obj);
if (Marking::IsWhite(value_bit)) {
MarkBit obj_bit = Marking::MarkBitFrom(obj);
if (Marking::IsBlack(obj_bit)) {
BlackToGreyAndUnshift(obj, obj_bit);
RestartIfNotMarking();
MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address());
if (chunk->IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR)) {
WhiteToGreyAndPush(value_heap_obj, value_bit);
RestartIfNotMarking();
} else {
BlackToGreyAndUnshift(obj, obj_bit);
RestartIfNotMarking();
return false;
}
} else {
return false;
}
// Object is either grey or white. It will be scanned if survives.
return false;
}
if (!is_compacting_) return false;
MarkBit obj_bit = Marking::MarkBitFrom(obj);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment