Chromium Code Reviews| Index: src/objects-visiting-inl.h |
| diff --git a/src/objects-visiting-inl.h b/src/objects-visiting-inl.h |
| index 46ca0b10ca6219d9b49e8fe08d20241cad400087..0d15cae485149690650b617c1d4fc64006777655 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,27 @@ void StaticMarkingVisitor<StaticVisitor>::VisitMap( |
| template<typename StaticVisitor> |
| +void StaticMarkingVisitor<StaticVisitor>::VisitPropertyCell( |
| + Map* map, HeapObject* object) { |
| + Heap* heap = map->GetHeap(); |
| + |
| + // 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 |
| + // ClearNonLivePropertyCellCodeDependencies. |
|
Michael Starzinger
2013/06/26 15:23:31
nit: Comment is outdated, the function is called C
Michael Starzinger
2013/06/26 15:32:04
Also the cleanup pass is only done with FLAG_colle
danno
2013/06/26 15:42:40
Done.
danno
2013/06/26 15:42:40
Done.
|
| + Object** slot = |
| + HeapObject::RawField(object, PropertyCell::kDependentCodeOffset); |
| + HeapObject* obj = HeapObject::cast(*slot); |
| + heap->mark_compact_collector()->RecordSlot(slot, slot, obj); |
| + StaticVisitor::MarkObjectWithoutPush(heap, obj); |
| + |
| + 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(); |