| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 bool IncrementalMarking::BaseRecordWrite(HeapObject* obj, | 37 bool IncrementalMarking::BaseRecordWrite(HeapObject* obj, |
| 38 Object** slot, | 38 Object** slot, |
| 39 Object* value) { | 39 Object* value) { |
| 40 HeapObject* value_heap_obj = HeapObject::cast(value); | 40 HeapObject* value_heap_obj = HeapObject::cast(value); |
| 41 MarkBit value_bit = Marking::MarkBitFrom(value_heap_obj); | 41 MarkBit value_bit = Marking::MarkBitFrom(value_heap_obj); |
| 42 if (Marking::IsWhite(value_bit)) { | 42 if (Marking::IsWhite(value_bit)) { |
| 43 MarkBit obj_bit = Marking::MarkBitFrom(obj); | 43 MarkBit obj_bit = Marking::MarkBitFrom(obj); |
| 44 if (Marking::IsBlack(obj_bit)) { | 44 if (Marking::IsBlack(obj_bit)) { |
| 45 MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address()); | 45 MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address()); |
| 46 if (chunk->IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR)) { | 46 if (chunk->IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR)) { |
| 47 WhiteToGreyAndPush(value_heap_obj, value_bit); | 47 if (chunk->IsLeftOfProgressBar(slot)) { |
| 48 RestartIfNotMarking(); | 48 WhiteToGreyAndPush(value_heap_obj, value_bit); |
| 49 RestartIfNotMarking(); |
| 50 } else { |
| 51 return false; |
| 52 } |
| 49 } else { | 53 } else { |
| 50 BlackToGreyAndUnshift(obj, obj_bit); | 54 BlackToGreyAndUnshift(obj, obj_bit); |
| 51 RestartIfNotMarking(); | 55 RestartIfNotMarking(); |
| 52 return false; | 56 return false; |
| 53 } | 57 } |
| 54 } else { | 58 } else { |
| 55 return false; | 59 return false; |
| 56 } | 60 } |
| 57 } | 61 } |
| 58 if (!is_compacting_) return false; | 62 if (!is_compacting_) return false; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 136 |
| 133 void IncrementalMarking::WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit) { | 137 void IncrementalMarking::WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit) { |
| 134 Marking::WhiteToGrey(mark_bit); | 138 Marking::WhiteToGrey(mark_bit); |
| 135 marking_deque_.PushGrey(obj); | 139 marking_deque_.PushGrey(obj); |
| 136 } | 140 } |
| 137 | 141 |
| 138 | 142 |
| 139 } } // namespace v8::internal | 143 } } // namespace v8::internal |
| 140 | 144 |
| 141 #endif // V8_INCREMENTAL_MARKING_INL_H_ | 145 #endif // V8_INCREMENTAL_MARKING_INL_H_ |
| OLD | NEW |