| Index: src/store-buffer.h
|
| ===================================================================
|
| --- src/store-buffer.h (revision 8396)
|
| +++ src/store-buffer.h (working copy)
|
| @@ -41,8 +41,11 @@
|
|
|
| typedef void (*ObjectSlotCallback)(HeapObject** from, HeapObject* to);
|
|
|
| -typedef void (StoreBuffer::*RegionCallback)(
|
| - Address start, Address end, ObjectSlotCallback slot_callback);
|
| +typedef void RegionCallback(
|
| + StoreBuffer* store_buffer,
|
| + Address start,
|
| + Address end,
|
| + ObjectSlotCallback slot_callback);
|
|
|
| // Used to implement the write barrier by collecting addresses of pointers
|
| // between spaces.
|
| @@ -81,7 +84,7 @@
|
| // surviving old-to-new pointers into the store buffer to rebuild it.
|
| void IteratePointersToNewSpace(ObjectSlotCallback callback);
|
|
|
| - static const int kStoreBufferOverflowBit = 1 << 16;
|
| + static const int kStoreBufferOverflowBit = 1 << 12;
|
| static const int kStoreBufferSize = kStoreBufferOverflowBit;
|
| static const int kStoreBufferLength = kStoreBufferSize / sizeof(Address);
|
| static const int kOldStoreBufferLength = kStoreBufferLength * 64;
|
| @@ -154,10 +157,31 @@
|
| bool HashTablesAreZapped();
|
| void ExemptPopularPages(int prime_sample_step, int threshold);
|
|
|
| - void FindPointersToNewSpaceInRegion(Address start,
|
| - Address end,
|
| - ObjectSlotCallback slot_callback);
|
| + enum RecordNewSpacePointers {
|
| + kDontRecord,
|
| + kRecord
|
| + };
|
|
|
| + template<RecordNewSpacePointers record>
|
| + inline void FindPointersToNewSpaceInRegion(Address start,
|
| + Address end,
|
| + ObjectSlotCallback slot_callback);
|
| +
|
| + // It seems gcc doesn't want to take the address of a templated method,
|
| + // so we create a new method so that we can give the address. Also,
|
| + // pointers to methods tend to have gnarly implementations.
|
| + static void FindPointersToNewSpaceInRegionRecord(
|
| + StoreBuffer* store_buffer,
|
| + Address start,
|
| + Address end,
|
| + ObjectSlotCallback slot_callback);
|
| +
|
| + static void FindPointersToNewSpaceInRegionDontRecord(
|
| + StoreBuffer* store_buffer,
|
| + Address start,
|
| + Address end,
|
| + ObjectSlotCallback slot_callback);
|
| +
|
| // For each region of pointers on a page in use from an old space call
|
| // visit_pointer_region callback.
|
| // If either visit_pointer_region or callback can cause an allocation
|
| @@ -174,7 +198,8 @@
|
| Address end,
|
| ObjectSlotCallback slot_callback);
|
|
|
| - void FindPointersToNewSpaceInMapsRegion(
|
| + static void FindPointersToNewSpaceInMapsRegion(
|
| + StoreBuffer* store_buffer,
|
| Address start,
|
| Address end,
|
| ObjectSlotCallback slot_callback);
|
|
|