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