| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 4586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4597 } | 4597 } |
| 4598 } | 4598 } |
| 4599 } | 4599 } |
| 4600 | 4600 |
| 4601 | 4601 |
| 4602 void Map::ClearNonLiveTransitions(Object* real_prototype) { | 4602 void Map::ClearNonLiveTransitions(Object* real_prototype) { |
| 4603 // Live DescriptorArray objects will be marked, so we must use | 4603 // Live DescriptorArray objects will be marked, so we must use |
| 4604 // low-level accessors to get and modify their data. | 4604 // low-level accessors to get and modify their data. |
| 4605 DescriptorArray* d = reinterpret_cast<DescriptorArray*>( | 4605 DescriptorArray* d = reinterpret_cast<DescriptorArray*>( |
| 4606 *RawField(this, Map::kInstanceDescriptorsOffset)); | 4606 *RawField(this, Map::kInstanceDescriptorsOffset)); |
| 4607 if (d == Heap::empty_descriptor_array()) return; | 4607 if (d == Heap::raw_unchecked_empty_descriptor_array()) return; |
| 4608 Smi* NullDescriptorDetails = | 4608 Smi* NullDescriptorDetails = |
| 4609 PropertyDetails(NONE, NULL_DESCRIPTOR).AsSmi(); | 4609 PropertyDetails(NONE, NULL_DESCRIPTOR).AsSmi(); |
| 4610 FixedArray* contents = reinterpret_cast<FixedArray*>( | 4610 FixedArray* contents = reinterpret_cast<FixedArray*>( |
| 4611 d->get(DescriptorArray::kContentArrayIndex)); | 4611 d->get(DescriptorArray::kContentArrayIndex)); |
| 4612 ASSERT(contents->length() >= 2); | 4612 ASSERT(contents->length() >= 2); |
| 4613 for (int i = 0; i < contents->length(); i += 2) { | 4613 for (int i = 0; i < contents->length(); i += 2) { |
| 4614 // If the pair (value, details) is a map transition, | 4614 // If the pair (value, details) is a map transition, |
| 4615 // check if the target is live. If not, null the descriptor. | 4615 // check if the target is live. If not, null the descriptor. |
| 4616 // Also drop the back pointer for that map transition, so that this | 4616 // Also drop the back pointer for that map transition, so that this |
| 4617 // map is not reached again by following a back pointer from a | 4617 // map is not reached again by following a back pointer from a |
| (...skipping 3064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7682 if (break_point_objects()->IsUndefined()) return 0; | 7682 if (break_point_objects()->IsUndefined()) return 0; |
| 7683 // Single beak point. | 7683 // Single beak point. |
| 7684 if (!break_point_objects()->IsFixedArray()) return 1; | 7684 if (!break_point_objects()->IsFixedArray()) return 1; |
| 7685 // Multiple break points. | 7685 // Multiple break points. |
| 7686 return FixedArray::cast(break_point_objects())->length(); | 7686 return FixedArray::cast(break_point_objects())->length(); |
| 7687 } | 7687 } |
| 7688 #endif | 7688 #endif |
| 7689 | 7689 |
| 7690 | 7690 |
| 7691 } } // namespace v8::internal | 7691 } } // namespace v8::internal |
| OLD | NEW |