| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_REMEMBERED_SET_H | 5 #ifndef V8_REMEMBERED_SET_H |
| 6 #define V8_REMEMBERED_SET_H | 6 #define V8_REMEMBERED_SET_H |
| 7 | 7 |
| 8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
| 9 #include "src/heap/heap.h" | 9 #include "src/heap/heap.h" |
| 10 #include "src/heap/slot-set.h" | 10 #include "src/heap/slot-set.h" |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 chunk->ReleaseTypedOldToOldSlots(); | 197 chunk->ReleaseTypedOldToOldSlots(); |
| 198 } | 198 } |
| 199 } | 199 } |
| 200 | 200 |
| 201 // Eliminates all stale slots from the remembered set, i.e. | 201 // Eliminates all stale slots from the remembered set, i.e. |
| 202 // slots that are not part of live objects anymore. This method must be | 202 // slots that are not part of live objects anymore. This method must be |
| 203 // called after marking, when the whole transitive closure is known and | 203 // called after marking, when the whole transitive closure is known and |
| 204 // must be called before sweeping when mark bits are still intact. | 204 // must be called before sweeping when mark bits are still intact. |
| 205 static void ClearInvalidSlots(Heap* heap); | 205 static void ClearInvalidSlots(Heap* heap); |
| 206 | 206 |
| 207 static void ClearInvalidSlots(Heap* heap, MemoryChunk* chunk); |
| 208 static void ClearInvalidTypedSlots(Heap* heap, MemoryChunk* chunk); |
| 209 |
| 207 static void VerifyValidSlots(Heap* heap); | 210 static void VerifyValidSlots(Heap* heap); |
| 208 | 211 |
| 209 private: | 212 private: |
| 210 static SlotSet* GetSlotSet(MemoryChunk* chunk) { | 213 static SlotSet* GetSlotSet(MemoryChunk* chunk) { |
| 211 if (direction == OLD_TO_OLD) { | 214 if (direction == OLD_TO_OLD) { |
| 212 return chunk->old_to_old_slots(); | 215 return chunk->old_to_old_slots(); |
| 213 } else { | 216 } else { |
| 214 return chunk->old_to_new_slots(); | 217 return chunk->old_to_new_slots(); |
| 215 } | 218 } |
| 216 } | 219 } |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 return DEBUG_TARGET_SLOT; | 382 return DEBUG_TARGET_SLOT; |
| 380 } | 383 } |
| 381 UNREACHABLE(); | 384 UNREACHABLE(); |
| 382 return CLEARED_SLOT; | 385 return CLEARED_SLOT; |
| 383 } | 386 } |
| 384 | 387 |
| 385 } // namespace internal | 388 } // namespace internal |
| 386 } // namespace v8 | 389 } // namespace v8 |
| 387 | 390 |
| 388 #endif // V8_REMEMBERED_SET_H | 391 #endif // V8_REMEMBERED_SET_H |
| OLD | NEW |