Reviewers: ulan, Erik Corry Chromium.org,

Description:
New insertion write barrier.

BUG=

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

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

Affected files (+2, -25 lines):
  M src/heap/incremental-marking-inl.h
  M src/heap/spaces.h


Index: src/heap/incremental-marking-inl.h
diff --git a/src/heap/incremental-marking-inl.h b/src/heap/incremental-marking-inl.h index 42b3dcb127da27fc1ebd937912c43580735dd596..b9cfe1dc5872ddb3863d9be84340535c69fe186e 100644
--- a/src/heap/incremental-marking-inl.h
+++ b/src/heap/incremental-marking-inl.h
@@ -16,24 +16,8 @@ bool IncrementalMarking::BaseRecordWrite(HeapObject* obj, Object** slot,
   HeapObject* value_heap_obj = HeapObject::cast(value);
   MarkBit value_bit = Marking::MarkBitFrom(value_heap_obj);
   if (Marking::IsWhite(value_bit)) {
-    MarkBit obj_bit = Marking::MarkBitFrom(obj);
-    if (Marking::IsBlack(obj_bit)) {
-      MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address());
-      if (chunk->IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR)) {
-        if (chunk->IsLeftOfProgressBar(slot)) {
-          WhiteToGreyAndPush(value_heap_obj, value_bit);
-          RestartIfNotMarking();
-        } else {
-          return false;
-        }
-      } else {
-        BlackToGreyAndUnshift(obj, obj_bit);
-        RestartIfNotMarking();
-        return false;
-      }
-    } else {
-      return false;
-    }
+    WhiteToGreyAndPush(value_heap_obj, value_bit);
+    RestartIfNotMarking();
   }
   if (!is_compacting_) return false;
   MarkBit obj_bit = Marking::MarkBitFrom(obj);
Index: src/heap/spaces.h
diff --git a/src/heap/spaces.h b/src/heap/spaces.h
index e6ec542c9e1f843b66e391f3e85338f187d5c157..2df28c04c07ff4cb662c105a6b7c25b8cb726fcd 100644
--- a/src/heap/spaces.h
+++ b/src/heap/spaces.h
@@ -508,13 +508,6 @@ class MemoryChunk {
     }
   }

-  bool IsLeftOfProgressBar(Object** slot) {
-    Address slot_address = reinterpret_cast<Address>(slot);
-    DCHECK(slot_address > this->address());
-    return (slot_address - (this->address() + kObjectStartOffset)) <
-           progress_bar();
-  }
-
   static void IncrementLiveBytesFromGC(Address address, int by) {
     MemoryChunk::FromAddress(address)->IncrementLiveBytes(by);
   }


--
--
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