| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index 5a1671a320419c767b2a875d2e7311b7a658d4b1..fbef78280cc382aa1b54f4bf7d526fb740827018 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -7430,23 +7430,20 @@ void Map::ClearNonLiveTransitions(Heap* heap) {
|
| if (d->IsEmpty()) return;
|
| Smi* NullDescriptorDetails =
|
| PropertyDetails(NONE, NULL_DESCRIPTOR).AsSmi();
|
| - FixedArray* contents = FixedArray::cast(
|
| - d->get(DescriptorArray::kContentArrayIndex));
|
| - ASSERT(contents->length() >= 2);
|
| - for (int i = 0; i < contents->length(); i += 2) {
|
| + for (int i = 0; i < d->number_of_descriptors(); ++i) {
|
| // If the pair (value, details) is a map transition, check if the target is
|
| // live. If not, null the descriptor. Also drop the back pointer for that
|
| // map transition, so that this map is not reached again by following a back
|
| // pointer from that non-live map.
|
| bool keep_entry = false;
|
| - PropertyDetails details(Smi::cast(contents->get(i + 1)));
|
| + PropertyDetails details(d->GetDetails(i));
|
| switch (details.type()) {
|
| case MAP_TRANSITION:
|
| case CONSTANT_TRANSITION:
|
| - ClearBackPointer(heap, contents->get(i), &keep_entry);
|
| + ClearBackPointer(heap, d->GetValue(i), &keep_entry);
|
| break;
|
| case ELEMENTS_TRANSITION: {
|
| - Object* object = contents->get(i);
|
| + Object* object = d->GetValue(i);
|
| if (object->IsMap()) {
|
| ClearBackPointer(heap, object, &keep_entry);
|
| } else {
|
| @@ -7460,7 +7457,7 @@ void Map::ClearNonLiveTransitions(Heap* heap) {
|
| break;
|
| }
|
| case CALLBACKS: {
|
| - Object* object = contents->get(i);
|
| + Object* object = d->GetValue(i);
|
| if (object->IsAccessorPair()) {
|
| AccessorPair* accessors = AccessorPair::cast(object);
|
| if (ClearBackPointer(heap, accessors->getter(), &keep_entry)) {
|
| @@ -7487,8 +7484,8 @@ void Map::ClearNonLiveTransitions(Heap* heap) {
|
| // What we *really* want to do here is removing this entry completely, but
|
| // for technical reasons we can't do this, so we zero it out instead.
|
| if (!keep_entry) {
|
| - contents->set_unchecked(i + 1, NullDescriptorDetails);
|
| - contents->set_null_unchecked(heap, i);
|
| + d->SetDetailsUnchecked(i, NullDescriptorDetails);
|
| + d->SetNullValueUnchecked(i, heap);
|
| }
|
| }
|
| }
|
|
|