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/heap/heap.h" | 8 #include "src/heap/heap.h" |
9 #include "src/heap/slot-set.h" | 9 #include "src/heap/slot-set.h" |
10 #include "src/heap/spaces.h" | 10 #include "src/heap/spaces.h" |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 // just freed free space object. | 229 // just freed free space object. |
230 if (heap->InToSpace(object)) { | 230 if (heap->InToSpace(object)) { |
231 return KEEP_SLOT; | 231 return KEEP_SLOT; |
232 } | 232 } |
233 } else { | 233 } else { |
234 DCHECK(!heap->InNewSpace(object)); | 234 DCHECK(!heap->InNewSpace(object)); |
235 } | 235 } |
236 return REMOVE_SLOT; | 236 return REMOVE_SLOT; |
237 } | 237 } |
238 | 238 |
239 static bool IsValidSlot(Heap* heap, Object** slot); | 239 static bool IsValidSlot(Heap* heap, MemoryChunk* chunk, Object** slot); |
240 }; | 240 }; |
241 | 241 |
242 // Buffer for keeping thead local migration slots during compaction. | 242 // Buffer for keeping thead local migration slots during compaction. |
243 // TODO(ulan): Remove this once every thread gets local pages in compaction | 243 // TODO(ulan): Remove this once every thread gets local pages in compaction |
244 // space. | 244 // space. |
245 class LocalSlotsBuffer BASE_EMBEDDED { | 245 class LocalSlotsBuffer BASE_EMBEDDED { |
246 public: | 246 public: |
247 LocalSlotsBuffer() : top_(new Node(nullptr)) {} | 247 LocalSlotsBuffer() : top_(new Node(nullptr)) {} |
248 | 248 |
249 ~LocalSlotsBuffer() { | 249 ~LocalSlotsBuffer() { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 int count; | 316 int count; |
317 }; | 317 }; |
318 | 318 |
319 Node* top_; | 319 Node* top_; |
320 }; | 320 }; |
321 | 321 |
322 } // namespace internal | 322 } // namespace internal |
323 } // namespace v8 | 323 } // namespace v8 |
324 | 324 |
325 #endif // V8_REMEMBERED_SET_H | 325 #endif // V8_REMEMBERED_SET_H |
OLD | NEW |