| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_HEAP_INCREMENTAL_MARKING_H_ | 5 #ifndef V8_HEAP_INCREMENTAL_MARKING_H_ |
| 6 #define V8_HEAP_INCREMENTAL_MARKING_H_ | 6 #define V8_HEAP_INCREMENTAL_MARKING_H_ |
| 7 | 7 |
| 8 #include "src/cancelable-task.h" | 8 #include "src/cancelable-task.h" |
| 9 #include "src/execution.h" | 9 #include "src/execution.h" |
| 10 #include "src/heap/heap.h" | 10 #include "src/heap/heap.h" |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 void RecordWriteSlow(HeapObject* obj, Object** slot, Object* value); | 216 void RecordWriteSlow(HeapObject* obj, Object** slot, Object* value); |
| 217 void RecordWriteIntoCodeSlow(Code* host, RelocInfo* rinfo, Object* value); | 217 void RecordWriteIntoCodeSlow(Code* host, RelocInfo* rinfo, Object* value); |
| 218 void RecordWriteOfCodeEntrySlow(JSFunction* host, Object** slot, Code* value); | 218 void RecordWriteOfCodeEntrySlow(JSFunction* host, Object** slot, Code* value); |
| 219 void RecordCodeTargetPatch(Code* host, Address pc, HeapObject* value); | 219 void RecordCodeTargetPatch(Code* host, Address pc, HeapObject* value); |
| 220 void RecordCodeTargetPatch(Address pc, HeapObject* value); | 220 void RecordCodeTargetPatch(Address pc, HeapObject* value); |
| 221 | 221 |
| 222 // Returns true if the function succeeds in transitioning the object | 222 // Returns true if the function succeeds in transitioning the object |
| 223 // from white to grey. | 223 // from white to grey. |
| 224 bool WhiteToGreyAndPush(HeapObject* obj); | 224 bool WhiteToGreyAndPush(HeapObject* obj); |
| 225 | 225 |
| 226 // This function is used to color the object black before it undergoes an |
| 227 // unsafe layout change. This is a part of synchronization protocol with |
| 228 // the concurrent marker. |
| 229 void MarkBlackAndPush(HeapObject* obj); |
| 230 |
| 226 inline void SetOldSpacePageFlags(MemoryChunk* chunk) { | 231 inline void SetOldSpacePageFlags(MemoryChunk* chunk) { |
| 227 SetOldSpacePageFlags(chunk, IsMarking(), IsCompacting()); | 232 SetOldSpacePageFlags(chunk, IsMarking(), IsCompacting()); |
| 228 } | 233 } |
| 229 | 234 |
| 230 inline void SetNewSpacePageFlags(Page* chunk) { | 235 inline void SetNewSpacePageFlags(Page* chunk) { |
| 231 SetNewSpacePageFlags(chunk, IsMarking()); | 236 SetNewSpacePageFlags(chunk, IsMarking()); |
| 232 } | 237 } |
| 233 | 238 |
| 234 bool IsCompacting() { return IsMarking() && is_compacting_; } | 239 bool IsCompacting() { return IsMarking() && is_compacting_; } |
| 235 | 240 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 | 354 |
| 350 Observer new_generation_observer_; | 355 Observer new_generation_observer_; |
| 351 Observer old_generation_observer_; | 356 Observer old_generation_observer_; |
| 352 | 357 |
| 353 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 358 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
| 354 }; | 359 }; |
| 355 } // namespace internal | 360 } // namespace internal |
| 356 } // namespace v8 | 361 } // namespace v8 |
| 357 | 362 |
| 358 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ | 363 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ |
| OLD | NEW |