Index: src/store-buffer.cc |
diff --git a/src/store-buffer.cc b/src/store-buffer.cc |
index e89eb1bfed4a6a3803858ec13cffface8cea3689..b10ec96dfc7fb661bf9a2ca84261131db145cc28 100644 |
--- a/src/store-buffer.cc |
+++ b/src/store-buffer.cc |
@@ -523,12 +523,20 @@ void StoreBuffer::FindPointersToNewSpaceOnPage( |
Address end_of_page = page->area_end(); |
Address visitable_end = visitable_start; |
+ Address current_constant_pool_end = 0; |
Object* free_space_map = heap_->free_space_map(); |
Object* two_pointer_filler_map = heap_->two_pointer_filler_map(); |
+ Object* constant_pool_array_map = heap_->constant_pool_array_map(); |
while (visitable_end < end_of_page) { |
Object* o = *reinterpret_cast<Object**>(visitable_end); |
+ if (o == constant_pool_array_map) { |
Hannes Payer (out of office)
2014/03/03 13:56:13
I don't think a constant pool can contain old-to-n
rmcilroy
2014/03/03 15:07:48
You are right, skipping it entirely probably simpl
|
+ // Constant pool arrays can contain pointers to the free_space_map or |
+ // two_pointer_filler_map which should not be treated as fillers objects. |
+ current_constant_pool_end = |
+ visitable_end + HeapObject::FromAddress(visitable_end)->Size(); |
+ } |
// Skip fillers but not things that look like fillers in the special |
// garbage section which can contain anything. |
if (o == free_space_map || |
@@ -548,6 +556,11 @@ void StoreBuffer::FindPointersToNewSpaceOnPage( |
} |
if (visitable_end == space->top() && visitable_end != space->limit()) { |
visitable_start = visitable_end = space->limit(); |
+ } else if (visitable_end <= current_constant_pool_end) { |
+ // If we are still within a constant pool object then we don't treat |
+ // free_space_map or two_pointer_filler_map as filler objects, since |
+ // they are just pointers to the map objects used by compiled code. |
+ visitable_end += kPointerSize; |
} else { |
// At this point we are either at the start of a filler or we are at |
// the point where the space->top() used to be before the |