Lines Matching refs:Callback
100 // Iterates and filters the remembered set with the given callback.
101 // The callback should take (Address slot) and return SlotCallbackResult.
102 template <typename Callback>
103 static void Iterate(Heap* heap, Callback callback) {
105 heap, [callback](MemoryChunk* chunk) { Iterate(chunk, callback); });
109 // The callback should take (MemoryChunk* chunk) and return void.
110 template <typename Callback>
111 static void IterateMemoryChunks(Heap* heap, Callback callback) {
118 callback(chunk);
124 // the given callback. The callback should take (Address slot) and return
126 template <typename Callback>
127 static void Iterate(MemoryChunk* chunk, Callback callback) {
134 slots[page].Iterate(callback, SlotSet::PREFREE_EMPTY_BUCKETS);
179 // Iterates and filters the remembered set with the given callback.
180 // The callback should take (SlotType slot_type, SlotAddress slot) and return
182 template <typename Callback>
183 static void IterateTyped(Heap* heap, Callback callback) {
184 IterateMemoryChunks(heap, [callback](MemoryChunk* chunk) {
185 IterateTyped(chunk, callback);
190 // with the given callback. The callback should take (SlotType slot_type,
192 template <typename Callback>
193 static void IterateTyped(MemoryChunk* chunk, Callback callback) {
196 int new_count = slots->Iterate(callback, TypedSlotSet::KEEP_EMPTY_CHUNKS);
268 // Updates a cell slot using an untyped slot callback.
269 // The callback accepts (Heap*, Object**) and returns SlotCallbackResult.
270 template <typename Callback>
271 static SlotCallbackResult UpdateCell(RelocInfo* rinfo, Callback callback) {
275 SlotCallbackResult result = callback(&cell);
282 // Updates a code entry slot using an untyped slot callback.
283 // The callback accepts (Heap*, Object**) and returns SlotCallbackResult.
284 template <typename Callback>
286 Callback callback) {
289 SlotCallbackResult result = callback(&code);
297 // Updates a code target slot using an untyped slot callback.
298 // The callback accepts (Heap*, Object**) and returns SlotCallbackResult.
299 template <typename Callback>
301 Callback callback) {
305 SlotCallbackResult result = callback(&target);
312 // Updates an embedded pointer slot using an untyped slot callback.
313 // The callback accepts (Heap*, Object**) and returns SlotCallbackResult.
314 template <typename Callback>
316 Callback callback) {
320 SlotCallbackResult result = callback(&target);
327 // Updates a debug target slot using an untyped slot callback.
328 // The callback accepts (Heap*, Object**) and returns SlotCallbackResult.
329 template <typename Callback>
331 Callback callback) {
336 SlotCallbackResult result = callback(&target);
341 // Updates a typed slot using an untyped slot callback.
342 // The callback accepts (Heap*, Object**) and returns SlotCallbackResult.
343 template <typename Callback>
346 Callback callback) {
350 return UpdateCodeTarget(&rinfo, callback);
354 return UpdateCell(&rinfo, callback);
357 return UpdateCodeEntry(addr, callback);
363 return UpdateDebugTarget(&rinfo, callback);
369 return UpdateEmbeddedPointer(&rinfo, callback);
372 return callback(reinterpret_cast<Object**>(addr));