Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Unified Diff: src/heap/remembered-set.h

Issue 1994933002: [heap] Get rid of the wrapper in remembered-set.h (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/scavenger.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/remembered-set.h
diff --git a/src/heap/remembered-set.h b/src/heap/remembered-set.h
index 45408bf1e9dadf9952af8a70b5e70cd5988c3cab..801bdbfe8dd5f4b25e60817333549424863e28e0 100644
--- a/src/heap/remembered-set.h
+++ b/src/heap/remembered-set.h
@@ -98,27 +98,6 @@ class RememberedSet {
}
}
- // Iterates and filters the remembered set with the given callback.
- // The callback should take (HeapObject** slot, HeapObject* target) and
- // update the slot.
- // A special wrapper takes care of filtering the slots based on their values.
- // For OLD_TO_NEW case: slots that do not point to the ToSpace after
- // callback invocation will be removed from the set.
- template <typename Callback>
- static void IterateWithWrapper(Heap* heap, Callback callback) {
- Iterate(heap, [heap, callback](Address addr) {
- return Wrapper(heap, addr, callback);
- });
- }
-
- template <typename Callback>
- static void IterateWithWrapper(Heap* heap, MemoryChunk* chunk,
- Callback callback) {
- Iterate(chunk, [heap, callback](Address addr) {
- return Wrapper(heap, addr, callback);
- });
- }
-
// Given a page and a typed slot in that page, this function adds the slot
// to the remembered set.
static void InsertTyped(Page* page, SlotType slot_type, Address slot_addr) {
@@ -212,30 +191,6 @@ class RememberedSet {
}
}
- template <typename Callback>
- static SlotCallbackResult Wrapper(Heap* heap, Address slot_address,
- Callback slot_callback) {
- STATIC_ASSERT(direction == OLD_TO_NEW);
- Object** slot = reinterpret_cast<Object**>(slot_address);
- Object* object = *slot;
- if (heap->InFromSpace(object)) {
- HeapObject* heap_object = reinterpret_cast<HeapObject*>(object);
- DCHECK(heap_object->IsHeapObject());
- slot_callback(reinterpret_cast<HeapObject**>(slot), heap_object);
- object = *slot;
- // If the object was in from space before and is after executing the
- // callback in to space, the object is still live.
- // Unfortunately, we do not know about the slot. It could be in a
- // just freed free space object.
- if (heap->InToSpace(object)) {
- return KEEP_SLOT;
- }
- } else {
- DCHECK(!heap->InNewSpace(object));
- }
- return REMOVE_SLOT;
- }
-
static bool IsValidSlot(Heap* heap, MemoryChunk* chunk, Object** slot);
};
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/scavenger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698