| Index: src/heap/mark-compact.cc
|
| diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
|
| index 27d257980f281c9067d264f8e239bda5d198a481..33a8ae8b7e6b5518c46f461b428faa921af0d6e0 100644
|
| --- a/src/heap/mark-compact.cc
|
| +++ b/src/heap/mark-compact.cc
|
| @@ -37,7 +37,7 @@ const char* Marking::kImpossibleBitPattern = "01";
|
|
|
| MarkCompactCollector::MarkCompactCollector(Heap* heap)
|
| : // NOLINT
|
| -#ifdef DEBUG
|
| +#if DCHECK_IS_ON
|
| state_(IDLE),
|
| #endif
|
| reduce_memory_footprint_(false),
|
| @@ -543,7 +543,7 @@ void Marking::TransferMark(Address old_start, Address new_start) {
|
| MarkBit new_mark_bit = MarkBitFrom(new_start);
|
| MarkBit old_mark_bit = MarkBitFrom(old_start);
|
|
|
| -#ifdef DEBUG
|
| +#if DCHECK_IS_ON
|
| ObjectColor old_color = Color(old_mark_bit);
|
| #endif
|
|
|
| @@ -561,7 +561,7 @@ void Marking::TransferMark(Address old_start, Address new_start) {
|
| heap_->incremental_marking()->RestartIfNotMarking();
|
| }
|
|
|
| -#ifdef DEBUG
|
| +#if DCHECK_IS_ON
|
| ObjectColor new_color = Color(new_mark_bit);
|
| DCHECK(new_color == old_color);
|
| #endif
|
| @@ -815,7 +815,7 @@ void MarkCompactCollector::AbortCompaction() {
|
| void MarkCompactCollector::Prepare() {
|
| was_marked_incrementally_ = heap()->incremental_marking()->IsMarking();
|
|
|
| -#ifdef DEBUG
|
| +#if DCHECK_IS_ON
|
| DCHECK(state_ == IDLE);
|
| state_ = PREPARE_GC;
|
| #endif
|
| @@ -858,7 +858,7 @@ void MarkCompactCollector::Prepare() {
|
|
|
|
|
| void MarkCompactCollector::Finish() {
|
| -#ifdef DEBUG
|
| +#if DCHECK_IS_ON
|
| DCHECK(state_ == SWEEP_SPACES || state_ == RELOCATE_OBJECTS);
|
| state_ = IDLE;
|
| #endif
|
| @@ -1298,7 +1298,7 @@ class MarkCompactMarkingVisitor
|
| // Visit an unmarked object.
|
| INLINE(static void VisitUnmarkedObject(MarkCompactCollector* collector,
|
| HeapObject* obj)) {
|
| -#ifdef DEBUG
|
| +#if DCHECK_IS_ON
|
| DCHECK(collector->heap()->Contains(obj));
|
| DCHECK(!collector->heap()->mark_compact_collector()->IsMarked(obj));
|
| #endif
|
| @@ -2180,7 +2180,7 @@ void MarkCompactCollector::MarkLiveObjects() {
|
| InitializeMarkingDeque();
|
| }
|
|
|
| -#ifdef DEBUG
|
| +#if DCHECK_IS_ON
|
| DCHECK(state_ == PREPARE_GC);
|
| state_ = MARK_LIVE_OBJECTS;
|
| #endif
|
| @@ -4155,7 +4155,7 @@ void MarkCompactCollector::SweepSpaces() {
|
| start_time = base::OS::TimeCurrentMillis();
|
| }
|
|
|
| -#ifdef DEBUG
|
| +#if DCHECK_IS_ON
|
| state_ = SWEEP_SPACES;
|
| #endif
|
| MoveEvacuationCandidatesToEndOfPagesList();
|
|
|