| Index: src/heap/mark-compact.cc
|
| diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
|
| index 8d4921f8d15e39d33d803866ee9d6d827176d2c6..d1e233a36a780433ded4f259d3d68a30236b22d9 100644
|
| --- a/src/heap/mark-compact.cc
|
| +++ b/src/heap/mark-compact.cc
|
| @@ -831,6 +831,7 @@
|
| ClearMarkbits();
|
| AbortWeakCollections();
|
| AbortWeakCells();
|
| + AbortTransitionArrays();
|
| AbortCompaction();
|
| was_marked_incrementally_ = false;
|
| }
|
| @@ -2329,14 +2330,15 @@
|
| ClearNonLiveReferences();
|
|
|
| ClearWeakCollections();
|
| -
|
| - heap_->set_encountered_weak_cells(Smi::FromInt(0));
|
| }
|
|
|
|
|
| void MarkCompactCollector::ClearNonLiveReferences() {
|
| GCTracer::Scope gc_scope(heap()->tracer(),
|
| GCTracer::Scope::MC_NONLIVEREFERENCES);
|
| +
|
| + ProcessAndClearTransitionArrays();
|
| +
|
| // Iterate over the map space, setting map transitions that go from
|
| // a marked map to an unmarked map to null transitions. This action
|
| // is carried out only on maps of JSObjects and related subtypes.
|
| @@ -2652,6 +2654,31 @@
|
| weak_cell->clear_next(heap());
|
| }
|
| heap()->set_encountered_weak_cells(Smi::FromInt(0));
|
| +}
|
| +
|
| +
|
| +void MarkCompactCollector::ProcessAndClearTransitionArrays() {
|
| + HeapObject* undefined = heap()->undefined_value();
|
| + Object* obj = heap()->encountered_transition_arrays();
|
| + while (obj != Smi::FromInt(0)) {
|
| + TransitionArray* array = TransitionArray::cast(obj);
|
| + // TODO(ulan): move logic from ClearMapTransitions here.
|
| + obj = array->next_link();
|
| + array->set_next_link(undefined, SKIP_WRITE_BARRIER);
|
| + }
|
| + heap()->set_encountered_transition_arrays(Smi::FromInt(0));
|
| +}
|
| +
|
| +
|
| +void MarkCompactCollector::AbortTransitionArrays() {
|
| + HeapObject* undefined = heap()->undefined_value();
|
| + Object* obj = heap()->encountered_transition_arrays();
|
| + while (obj != Smi::FromInt(0)) {
|
| + TransitionArray* array = TransitionArray::cast(obj);
|
| + obj = array->next_link();
|
| + array->set_next_link(undefined, SKIP_WRITE_BARRIER);
|
| + }
|
| + heap()->set_encountered_transition_arrays(Smi::FromInt(0));
|
| }
|
|
|
|
|
|
|