Index: src/mark-compact.cc |
diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
index 8e149fee09f4f4fc31ab5a2c25d13a42079e9a19..878c97413bb79e6160ee3fa50e367db398c18f91 100644 |
--- a/src/mark-compact.cc |
+++ b/src/mark-compact.cc |
@@ -1883,6 +1883,17 @@ void Marker<T>::MarkDescriptorArray(DescriptorArray* descriptors) { |
enum_cache); |
} |
+ // TODO(verwaest) Make sure we free unused transitions. |
+ if (descriptors->elements_transition_map() != NULL) { |
+ Object** transitions_slot = descriptors->GetTransitionsSlot(); |
+ Object* transitions = *transitions_slot; |
+ base_marker()->MarkObjectAndPush( |
+ reinterpret_cast<HeapObject*>(transitions)); |
+ mark_compact_collector()->RecordSlot(descriptor_start, |
+ transitions_slot, |
+ transitions); |
+ } |
+ |
// If the descriptor contains a transition (value is a Map), we don't mark the |
// value as live. It might be set to the NULL_DESCRIPTOR in |
// ClearNonLiveTransitions later. |
@@ -1921,12 +1932,6 @@ void Marker<T>::MarkDescriptorArray(DescriptorArray* descriptors) { |
MarkAccessorPairSlot(accessors, AccessorPair::kSetterOffset); |
} |
break; |
- case ELEMENTS_TRANSITION: |
- // For maps with multiple elements transitions, the transition maps are |
- // stored in a FixedArray. Keep the fixed array alive but not the maps |
- // that it refers to. |
- if (value->IsFixedArray()) base_marker()->MarkObjectWithoutPush(value); |
- break; |
case MAP_TRANSITION: |
case CONSTANT_TRANSITION: |
case NULL_DESCRIPTOR: |