Chromium Code Reviews| Index: src/mark-compact.cc |
| diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
| index c455564b41a736d268db2e81a9259fec07b261bd..87eac19a9d3e038a1773f4a7bdf3de2d95a1ec9d 100644 |
| --- a/src/mark-compact.cc |
| +++ b/src/mark-compact.cc |
| @@ -1872,17 +1872,16 @@ void Marker<T>::MarkDescriptorArray(DescriptorArray* descriptors) { |
| if (!base_marker()->MarkObjectAndPush(descriptors)) return; |
| FixedArray* contents = FixedArray::cast( |
| descriptors->get(DescriptorArray::kContentArrayIndex)); |
| - ASSERT(contents->length() >= 2); |
| ASSERT(Marking::IsWhite(Marking::MarkBitFrom(contents))); |
| base_marker()->MarkObjectWithoutPush(contents); |
| // Contents contains (value, details) pairs. If the descriptor contains a |
|
Michael Starzinger
2012/05/24 14:28:54
Since you are decoupling this block of code form t
Toon Verwaest
2012/05/25 12:27:26
Done.
|
| // transition (value is a Map), we don't mark the value as live. It might |
| // be set to the NULL_DESCRIPTOR in ClearNonLiveTransitions later. |
| - for (int i = 0; i < contents->length(); i += 2) { |
| - PropertyDetails details(Smi::cast(contents->get(i + 1))); |
| + for (int i = 0; i < descriptors->number_of_descriptors(); ++i) { |
| + PropertyDetails details(descriptors->GetDetails(i)); |
| + Object** slot = descriptors->GetValueSlot(i); |
| - Object** slot = contents->data_start() + i; |
| if (!(*slot)->IsHeapObject()) continue; |
| HeapObject* value = HeapObject::cast(*slot); |