| 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 | 
| 206   static void VerifyValidSlots(Heap* heap); | 209   static void VerifyValidSlots(Heap* heap); | 
| 207 | 210 | 
| 208  private: | 211  private: | 
| 209   static SlotSet* GetSlotSet(MemoryChunk* chunk) { | 212   static SlotSet* GetSlotSet(MemoryChunk* chunk) { | 
| 210     if (direction == OLD_TO_OLD) { | 213     if (direction == OLD_TO_OLD) { | 
| 211       return chunk->old_to_old_slots(); | 214       return chunk->old_to_old_slots(); | 
| 212     } else { | 215     } else { | 
| 213       return chunk->old_to_new_slots(); | 216       return chunk->old_to_new_slots(); | 
| 214     } | 217     } | 
| 215   } | 218   } | 
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 378     return DEBUG_TARGET_SLOT; | 381     return DEBUG_TARGET_SLOT; | 
| 379   } | 382   } | 
| 380   UNREACHABLE(); | 383   UNREACHABLE(); | 
| 381   return CLEARED_SLOT; | 384   return CLEARED_SLOT; | 
| 382 } | 385 } | 
| 383 | 386 | 
| 384 }  // namespace internal | 387 }  // namespace internal | 
| 385 }  // namespace v8 | 388 }  // namespace v8 | 
| 386 | 389 | 
| 387 #endif  // V8_REMEMBERED_SET_H | 390 #endif  // V8_REMEMBERED_SET_H | 
| OLD | NEW | 
|---|