OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 7335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7346 if (Marking::MarkBitFrom(map).Get()) return false; | 7346 if (Marking::MarkBitFrom(map).Get()) return false; |
7347 map->SetBackPointer(heap->undefined_value(), SKIP_WRITE_BARRIER); | 7347 map->SetBackPointer(heap->undefined_value(), SKIP_WRITE_BARRIER); |
7348 return true; | 7348 return true; |
7349 } | 7349 } |
7350 | 7350 |
7351 | 7351 |
7352 void Map::ClearNonLiveTransitions(Heap* heap) { | 7352 void Map::ClearNonLiveTransitions(Heap* heap) { |
7353 DescriptorArray* d = DescriptorArray::cast( | 7353 DescriptorArray* d = DescriptorArray::cast( |
7354 *RawField(this, Map::kInstanceDescriptorsOrBitField3Offset)); | 7354 *RawField(this, Map::kInstanceDescriptorsOrBitField3Offset)); |
7355 if (d->IsEmpty()) return; | 7355 if (d->IsEmpty()) return; |
| 7356 Map* elements_transition = d->elements_transition_map(); |
| 7357 if (elements_transition != NULL && |
| 7358 ClearBackPointer(heap, elements_transition)) { |
| 7359 d->ClearElementsTransition(); |
| 7360 } |
7356 Smi* NullDescriptorDetails = | 7361 Smi* NullDescriptorDetails = |
7357 PropertyDetails(NONE, NULL_DESCRIPTOR).AsSmi(); | 7362 PropertyDetails(NONE, NULL_DESCRIPTOR).AsSmi(); |
7358 for (int i = 0; i < d->number_of_descriptors(); ++i) { | 7363 for (int i = 0; i < d->number_of_descriptors(); ++i) { |
7359 // If the pair (value, details) is a map transition, check if the target is | 7364 // If the pair (value, details) is a map transition, check if the target is |
7360 // live. If not, null the descriptor. Also drop the back pointer for that | 7365 // live. If not, null the descriptor. Also drop the back pointer for that |
7361 // map transition, so that this map is not reached again by following a back | 7366 // map transition, so that this map is not reached again by following a back |
7362 // pointer from that non-live map. | 7367 // pointer from that non-live map. |
7363 bool keep_entry = false; | 7368 bool keep_entry = false; |
7364 PropertyDetails details(d->GetDetails(i)); | 7369 PropertyDetails details(d->GetDetails(i)); |
7365 switch (details.type()) { | 7370 switch (details.type()) { |
(...skipping 5906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13272 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 13277 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
13273 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 13278 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
13274 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 13279 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
13275 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 13280 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
13276 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 13281 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
13277 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 13282 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
13278 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 13283 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
13279 } | 13284 } |
13280 | 13285 |
13281 } } // namespace v8::internal | 13286 } } // namespace v8::internal |
OLD | NEW |