Index: src/heap/objects-visiting-inl.h |
diff --git a/src/heap/objects-visiting-inl.h b/src/heap/objects-visiting-inl.h |
index b6c72185c65d54a558396debb1de11c5d3b18320..2d03c125eb15942110ff192586d4c20e26d4c36a 100644 |
--- a/src/heap/objects-visiting-inl.h |
+++ b/src/heap/objects-visiting-inl.h |
@@ -179,6 +179,8 @@ void StaticMarkingVisitor<StaticVisitor>::Initialize() { |
table_.Register(kVisitWeakCell, &VisitWeakCell); |
+ table_.Register(kVisitTransitionArray, &VisitTransitionArray); |
+ |
table_.template RegisterSpecializations<DataObjectVisitor, kVisitDataObject, |
kVisitDataObjectGeneric>(); |
@@ -342,6 +344,25 @@ void StaticMarkingVisitor<StaticVisitor>::VisitWeakCell(Map* map, |
template <typename StaticVisitor> |
+void StaticMarkingVisitor<StaticVisitor>::VisitTransitionArray( |
+ Map* map, HeapObject* object) { |
+ typedef FlexibleBodyVisitor<StaticVisitor, TransitionArray::BodyDescriptor, |
+ int> TransitionArrayBodyVisitor; |
+ TransitionArray* array = TransitionArray::cast(object); |
+ // Enqueue the array in linked list of encountered transition arrays if it is |
+ // not already in the list. |
+ if (array->next_link()->IsUndefined()) { |
+ Heap* heap = map->GetHeap(); |
+ array->set_next_link(heap->encountered_transition_arrays(), |
+ UPDATE_WEAK_WRITE_BARRIER); |
+ heap->set_encountered_transition_arrays(array); |
+ } |
+ // TODO(ulan): Move MarkTransitionArray logic here. |
+ TransitionArrayBodyVisitor::Visit(map, object); |
+} |
+ |
+ |
+template <typename StaticVisitor> |
void StaticMarkingVisitor<StaticVisitor>::VisitAllocationSite( |
Map* map, HeapObject* object) { |
Heap* heap = map->GetHeap(); |