BUG=
Review URL: https://codereview.chromium.org/
11415070
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13063
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
if (Marking::IsBlack(obj_bit)) {
MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address());
if (chunk->IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR)) {
- WhiteToGreyAndPush(value_heap_obj, value_bit);
- RestartIfNotMarking();
+ if (chunk->IsLeftOfProgressBar(slot)) {
+ WhiteToGreyAndPush(value_heap_obj, value_bit);
+ RestartIfNotMarking();
+ } else {
+ return false;
+ }
} else {
BlackToGreyAndUnshift(obj, obj_bit);
RestartIfNotMarking();
}
}
+ bool IsLeftOfProgressBar(Object** slot) {
+ Address slot_address = reinterpret_cast<Address>(slot);
+ ASSERT(slot_address > this->address());
+ return (slot_address - this->address() + kObjectStartOffset) <
+ progress_bar();
+ }
static void IncrementLiveBytesFromGC(Address address, int by) {
MemoryChunk::FromAddress(address)->IncrementLiveBytes(by);