Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Unified Diff: src/heap/objects-visiting-inl.h

Issue 1480873003: Introduce instance type for transition arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix zapping Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/objects-visiting.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « src/heap/objects-visiting.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698