Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(382)

Unified Diff: src/heap/heap.cc

Issue 2644523002: [heap] Provide ObjectMarking with marking transitions (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/heap/incremental-marking.cc » ('j') | src/heap/incremental-marking.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index b1536cdf6237437753e2492464bafabb7fa7976f..11bdd33c198cefbd59115fe836e473ba3004a43c 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -3171,6 +3171,7 @@ void Heap::AdjustLiveBytes(HeapObject* object, int by) {
FixedArrayBase* Heap::LeftTrimFixedArray(FixedArrayBase* object,
int elements_to_trim) {
CHECK_NOT_NULL(object);
+ DCHECK(CanMoveObjectStart(object));
DCHECK(!object->IsFixedTypedArrayBase());
DCHECK(!object->IsByteArray());
const int element_size = object->IsFixedArray() ? kPointerSize : kDoubleSize;
@@ -3221,7 +3222,6 @@ FixedArrayBase* Heap::LeftTrimFixedArray(FixedArrayBase* object,
// Initialize header of the trimmed array. Since left trimming is only
// performed on pages which are not concurrently swept creating a filler
// object does not require synchronization.
- DCHECK(CanMoveObjectStart(object));
Object** former_start = HeapObject::RawField(object, 0);
int new_start_index = elements_to_trim * (element_size / kPointerSize);
former_start[new_start_index] = map;
@@ -4287,7 +4287,7 @@ void Heap::RegisterReservationsForBlackAllocation(Reservation* reservations) {
Address addr = chunk.start;
while (addr < chunk.end) {
HeapObject* obj = HeapObject::FromAddress(addr);
- Marking::MarkBlack(ObjectMarking::MarkBitFrom(obj));
+ ObjectMarking::WhiteToBlack(obj);
addr += obj->Size();
}
}
« no previous file with comments | « no previous file | src/heap/incremental-marking.cc » ('j') | src/heap/incremental-marking.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698