Reviewers: Michael Starzinger, mvstanton,

Description:
Make sure that allocation site scratchpad entries get recorded.

BUG=

Please review this at https://codereview.chromium.org/153173008/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+7, -1 lines):
  M src/heap.cc


Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 5ede02cb1044f4d843d492d44bfd0ddc49680c4f..885350ae98e5c10a5b7a7a3345cc182e98db6ddd 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -3621,8 +3621,14 @@ void Heap::InitializeAllocationSitesScratchpad() {

 void Heap::AddAllocationSiteToScratchpad(AllocationSite* site) {
if (allocation_sites_scratchpad_length_ < kAllocationSiteScratchpadSize) { + // Since the processing of the allocation sites scratchpad happens after
+    // evacuation, we have to explicitly record the slot to take evacuation
+    // candidates into account.
     allocation_sites_scratchpad()->set(
-        allocation_sites_scratchpad_length_, site);
+        allocation_sites_scratchpad_length_, site, SKIP_WRITE_BARRIER);
+    Object** slot = allocation_sites_scratchpad()->RawFieldOfElementAt(
+        allocation_sites_scratchpad_length_);
+    mark_compact_collector()->RecordSlot(slot, slot, *slot);
     allocation_sites_scratchpad_length_++;
   }
 }


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to