Index: src/store-buffer.h |
diff --git a/src/store-buffer.h b/src/store-buffer.h |
index 520cbc01626b698607928dbd83638ba220096fb2..01e7cbeb8d2a439784617f20a16a61793df14459 100644 |
--- a/src/store-buffer.h |
+++ b/src/store-buffer.h |
@@ -43,8 +43,10 @@ class StoreBuffer; |
typedef void (*ObjectSlotCallback)(HeapObject** from, HeapObject* to); |
-typedef void (StoreBuffer::*RegionCallback)( |
- Address start, Address end, ObjectSlotCallback slot_callback); |
+typedef void (StoreBuffer::*RegionCallback)(Address start, |
+ Address end, |
+ ObjectSlotCallback slot_callback, |
+ bool clear_maps); |
// Used to implement the write barrier by collecting addresses of pointers |
// between spaces. |
@@ -83,6 +85,10 @@ class StoreBuffer { |
// surviving old-to-new pointers into the store buffer to rebuild it. |
void IteratePointersToNewSpace(ObjectSlotCallback callback); |
+ // Same as IteratePointersToNewSpace but additonally clears maps in objects |
+ // referenced from the store buffer that do not contain a forwarding pointer. |
+ void IteratePointersToNewSpaceAndClearMaps(ObjectSlotCallback callback); |
+ |
static const int kStoreBufferOverflowBit = 1 << (14 + kPointerSizeLog2); |
static const int kStoreBufferSize = kStoreBufferOverflowBit; |
static const int kStoreBufferLength = kStoreBufferSize / sizeof(Address); |
@@ -164,9 +170,15 @@ class StoreBuffer { |
void Uniq(); |
void ExemptPopularPages(int prime_sample_step, int threshold); |
+ // Set the map field of the object to NULL if contains a map. |
+ inline void ClearDeadObject(HeapObject *object); |
+ |
+ void IteratePointersToNewSpace(ObjectSlotCallback callback, bool clear_maps); |
+ |
void FindPointersToNewSpaceInRegion(Address start, |
Address end, |
- ObjectSlotCallback slot_callback); |
+ ObjectSlotCallback slot_callback, |
+ bool clear_maps); |
// For each region of pointers on a page in use from an old space call |
// visit_pointer_region callback. |
@@ -182,20 +194,24 @@ class StoreBuffer { |
void FindPointersToNewSpaceInMaps( |
Address start, |
Address end, |
- ObjectSlotCallback slot_callback); |
+ ObjectSlotCallback slot_callback, |
+ bool clear_maps); |
void FindPointersToNewSpaceInMapsRegion( |
Address start, |
Address end, |
- ObjectSlotCallback slot_callback); |
+ ObjectSlotCallback slot_callback, |
+ bool clear_maps); |
void FindPointersToNewSpaceOnPage( |
PagedSpace* space, |
Page* page, |
RegionCallback region_callback, |
- ObjectSlotCallback slot_callback); |
+ ObjectSlotCallback slot_callback, |
+ bool clear_maps); |
- void IteratePointersInStoreBuffer(ObjectSlotCallback slot_callback); |
+ void IteratePointersInStoreBuffer(ObjectSlotCallback slot_callback, |
+ bool clear_maps); |
#ifdef VERIFY_HEAP |
void VerifyPointers(PagedSpace* space, RegionCallback region_callback); |