Index: src/mark-compact.cc |
diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
index 16a3f4c7eab0514e99c959c482b33db744a15b07..2ffceba53a9eeff9c2ae1285616cddd1eaed6275 100644 |
--- a/src/mark-compact.cc |
+++ b/src/mark-compact.cc |
@@ -1864,6 +1864,7 @@ void Marker<T>::MarkMapContents(Map* map) { |
template <class T> |
void Marker<T>::MarkDescriptorArray(DescriptorArray* descriptors) { |
+ // printf("marking: %p\n", static_cast<void*>(descriptors)); |
danno
2012/06/01 13:49:55
Remove debugging code.
Toon Verwaest
2012/06/04 09:17:48
Done.
|
// Empty descriptor array is marked as a root before any maps are marked. |
ASSERT(descriptors != descriptors->GetHeap()->empty_descriptor_array()); |
@@ -1880,6 +1881,17 @@ void Marker<T>::MarkDescriptorArray(DescriptorArray* descriptors) { |
enum_cache); |
} |
+ // TODO(verwaest) Make sure we free unused transitions. |
+ if (descriptors->elements_transition() != 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. |
@@ -1918,12 +1930,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: |