Chromium Code Reviews| Index: src/incremental-marking-inl.h |
| diff --git a/src/incremental-marking-inl.h b/src/incremental-marking-inl.h |
| index bbe9a9d209b36cca76360b2f9b091b755dc0587a..3a62bfecce9032733391213e5dd3b6f8f7471c88 100644 |
| --- a/src/incremental-marking-inl.h |
| +++ b/src/incremental-marking-inl.h |
| @@ -37,16 +37,24 @@ 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(); |
| + bool is_black = Marking::IsBlack(obj_bit); |
| + if (is_black) { |
|
Michael Starzinger
2012/11/18 22:07:02
Move the "Marking::IsBlack(obj_bit)" into the if c
Hannes Payer (out of office)
2012/11/19 10:56:20
Done.
|
| + 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); |