Reviewers: ulan, Michael Lippautz,

Description:
Add support for large object IsSlotInBlackObject to filter out all dead slots
correctly.

BUG=chromium:454297
LOG=n

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

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+10, -3 lines):
  M src/heap/mark-compact.cc


Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index 603c294749b151b6dfe311e8171b7f24d326e38f..d6a2f15887ab2ac2844f12bffdb982728e4f60bd 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -3060,11 +3060,18 @@ bool MarkCompactCollector::TryPromoteObject(HeapObject* object,

 bool MarkCompactCollector::IsSlotInBlackObject(Page* p, Address slot,
                                                HeapObject** out_object) {
-  // This function does not support large objects right now.
   Space* owner = p->owner();
   if (owner == heap_->lo_space() || owner == NULL) {
-    *out_object = NULL;
-    return true;
+    Object* large_object = heap_->lo_space()->FindObject(slot);
+ // This object has to exist, otherwise we would not have recorded a slot
+    // for it.
+    CHECK(large_object->IsHeapObject());
+    HeapObject* large_heap_object = HeapObject::cast(large_object);
+    if (IsMarked(large_heap_object)) {
+      *out_object = large_heap_object;
+      return true;
+    }
+    return false;
   }

   uint32_t mark_bit_index = p->AddressToMarkbitIndex(slot);


--
--
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/d/optout.

Reply via email to