| Index: src/objects-visiting-inl.h
|
| diff --git a/src/objects-visiting-inl.h b/src/objects-visiting-inl.h
|
| index 46ca0b10ca6219d9b49e8fe08d20241cad400087..49da025572ee0e2442b5b6b4235385f04b60c701 100644
|
| --- a/src/objects-visiting-inl.h
|
| +++ b/src/objects-visiting-inl.h
|
| @@ -221,10 +221,7 @@ void StaticMarkingVisitor<StaticVisitor>::Initialize() {
|
| Cell::BodyDescriptor,
|
| void>::Visit);
|
|
|
| - table_.Register(kVisitPropertyCell,
|
| - &FixedBodyVisitor<StaticVisitor,
|
| - PropertyCell::BodyDescriptor,
|
| - void>::Visit);
|
| + table_.Register(kVisitPropertyCell, &VisitPropertyCell);
|
|
|
| table_.template RegisterSpecializations<DataObjectVisitor,
|
| kVisitDataObject,
|
| @@ -359,6 +356,30 @@ void StaticMarkingVisitor<StaticVisitor>::VisitMap(
|
|
|
|
|
| template<typename StaticVisitor>
|
| +void StaticMarkingVisitor<StaticVisitor>::VisitPropertyCell(
|
| + Map* map, HeapObject* object) {
|
| + Heap* heap = map->GetHeap();
|
| +
|
| + Object** slot =
|
| + HeapObject::RawField(object, PropertyCell::kDependentCodeOffset);
|
| + if (FLAG_collect_maps) {
|
| + // Mark property cell dependent codes array but do not push it onto marking
|
| + // stack, this will make references from it weak. We will clean dead
|
| + // codes when we iterate over property cells in ClearNonLiveReferences.
|
| + HeapObject* obj = HeapObject::cast(*slot);
|
| + heap->mark_compact_collector()->RecordSlot(slot, slot, obj);
|
| + StaticVisitor::MarkObjectWithoutPush(heap, obj);
|
| + } else {
|
| + StaticVisitor::VisitPointer(heap, slot);
|
| + }
|
| +
|
| + StaticVisitor::VisitPointers(heap,
|
| + HeapObject::RawField(object, PropertyCell::kPointerFieldsBeginOffset),
|
| + HeapObject::RawField(object, PropertyCell::kPointerFieldsEndOffset));
|
| +}
|
| +
|
| +
|
| +template<typename StaticVisitor>
|
| void StaticMarkingVisitor<StaticVisitor>::VisitCode(
|
| Map* map, HeapObject* object) {
|
| Heap* heap = map->GetHeap();
|
|
|