diff --git a/src/objects.cc b/src/objects.cc index 398213412c..46e691a735 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -7218,6 +7218,7 @@ void Map::ClearNonLiveTransitions(Heap* heap) { if (!HasTransitionArray()) return; TransitionArray* t = transitions(); + MarkCompactCollector* collector = heap->mark_compact_collector(); int transition_index = 0; @@ -7226,14 +7227,11 @@ void Map::ClearNonLiveTransitions(Heap* heap) { if (!ClearBackPointer(heap, t->GetTarget(i))) { if (i != transition_index) { String* key = t->GetKey(i); - Map* target = t->GetTarget(i); t->SetKey(transition_index, key); - t->SetTarget(transition_index, target); - MarkCompactCollector* collector = heap->mark_compact_collector(); Object** key_slot = t->GetKeySlot(transition_index); collector->RecordSlot(key_slot, key_slot, key); - Object** target_slot = t->GetTargetSlot(transition_index); - collector->RecordSlot(target_slot, target_slot, target); + // Target slots do not need to be recorded since maps are not compacted. + t->SetTarget(transition_index, t->GetTarget(i)); } transition_index++; } diff --git a/src/transitions-inl.h b/src/transitions-inl.h index 24ff8c2af0..6716c717ab 100644 --- a/src/transitions-inl.h +++ b/src/transitions-inl.h @@ -144,14 +144,6 @@ Map* TransitionArray::GetTarget(int transition_number) { } -Object** TransitionArray::GetTargetSlot(int transition_number) { - ASSERT(transition_number < number_of_transitions()); - return HeapObject::RawField( - reinterpret_cast(this), - OffsetOfElementAt(ToTargetIndex(transition_number))); -} - - void TransitionArray::SetTarget(int transition_number, Map* value) { ASSERT(transition_number < number_of_transitions()); set(ToTargetIndex(transition_number), value); diff --git a/src/transitions.h b/src/transitions.h index bc661acf52..57f32535a5 100644 --- a/src/transitions.h +++ b/src/transitions.h @@ -53,7 +53,6 @@ class TransitionArray: public FixedArray { inline Map* GetTarget(int transition_number); inline void SetTarget(int transition_number, Map* target); - inline Object** GetTargetSlot(int transition_number); inline PropertyDetails GetTargetDetails(int transition_number);