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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 if (direction == OLD_TO_OLD) { | 220 if (direction == OLD_TO_OLD) { |
221 chunk->AllocateTypedOldToOldSlots(); | 221 chunk->AllocateTypedOldToOldSlots(); |
222 return chunk->typed_old_to_old_slots(); | 222 return chunk->typed_old_to_old_slots(); |
223 } else { | 223 } else { |
224 chunk->AllocateTypedOldToNewSlots(); | 224 chunk->AllocateTypedOldToNewSlots(); |
225 return chunk->typed_old_to_new_slots(); | 225 return chunk->typed_old_to_new_slots(); |
226 } | 226 } |
227 } | 227 } |
228 | 228 |
229 static bool IsValidSlot(Heap* heap, MemoryChunk* chunk, Object** slot); | 229 static bool IsValidSlot(Heap* heap, MemoryChunk* chunk, Object** slot); |
| 230 static bool IsValidTypedSlot(Heap* heap, MemoryChunk* chunk, SlotType type, |
| 231 Address host_addr, Address slot); |
230 }; | 232 }; |
231 | 233 |
232 class UpdateTypedSlotHelper { | 234 class UpdateTypedSlotHelper { |
233 public: | 235 public: |
234 // Updates a cell slot using an untyped slot callback. | 236 // Updates a cell slot using an untyped slot callback. |
235 // The callback accepts (Heap*, Object**) and returns SlotCallbackResult. | 237 // The callback accepts (Heap*, Object**) and returns SlotCallbackResult. |
236 template <typename Callback> | 238 template <typename Callback> |
237 static SlotCallbackResult UpdateCell(RelocInfo* rinfo, Callback callback) { | 239 static SlotCallbackResult UpdateCell(RelocInfo* rinfo, Callback callback) { |
238 DCHECK(rinfo->rmode() == RelocInfo::CELL); | 240 DCHECK(rinfo->rmode() == RelocInfo::CELL); |
239 Object* cell = rinfo->target_cell(); | 241 Object* cell = rinfo->target_cell(); |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 } | 344 } |
343 UNREACHABLE(); | 345 UNREACHABLE(); |
344 return REMOVE_SLOT; | 346 return REMOVE_SLOT; |
345 } | 347 } |
346 }; | 348 }; |
347 | 349 |
348 } // namespace internal | 350 } // namespace internal |
349 } // namespace v8 | 351 } // namespace v8 |
350 | 352 |
351 #endif // V8_REMEMBERED_SET_H | 353 #endif // V8_REMEMBERED_SET_H |
OLD | NEW |