| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3738 // the map field of the array. | 3738 // the map field of the array. |
| 3739 Map* next = Map::cast(contents->get(i)); | 3739 Map* next = Map::cast(contents->get(i)); |
| 3740 next->set_map(current); | 3740 next->set_map(current); |
| 3741 *map_or_index_field = Smi::FromInt(i + 2); | 3741 *map_or_index_field = Smi::FromInt(i + 2); |
| 3742 current = next; | 3742 current = next; |
| 3743 map_done = false; | 3743 map_done = false; |
| 3744 break; | 3744 break; |
| 3745 } | 3745 } |
| 3746 } | 3746 } |
| 3747 if (!map_done) continue; | 3747 if (!map_done) continue; |
| 3748 } else { |
| 3749 map_or_index_field = NULL; |
| 3748 } | 3750 } |
| 3749 // That was the regular transitions, now for the prototype transitions. | 3751 // That was the regular transitions, now for the prototype transitions. |
| 3750 FixedArray* prototype_transitions = | 3752 FixedArray* prototype_transitions = |
| 3751 current->unchecked_prototype_transitions(); | 3753 current->unchecked_prototype_transitions(); |
| 3752 Object** proto_map_or_index_field = | 3754 Object** proto_map_or_index_field = |
| 3753 RawField(prototype_transitions, HeapObject::kMapOffset); | 3755 RawField(prototype_transitions, HeapObject::kMapOffset); |
| 3754 Object* map_or_index = *proto_map_or_index_field; | 3756 Object* map_or_index = *proto_map_or_index_field; |
| 3755 const int start = 2; | 3757 const int start = 2; |
| 3756 int i = map_or_index->IsSmi() ? Smi::cast(map_or_index)->value() : start; | 3758 int i = map_or_index->IsSmi() ? Smi::cast(map_or_index)->value() : start; |
| 3757 if (i < prototype_transitions->length()) { | 3759 if (i < prototype_transitions->length()) { |
| (...skipping 6645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10403 if (break_point_objects()->IsUndefined()) return 0; | 10405 if (break_point_objects()->IsUndefined()) return 0; |
| 10404 // Single beak point. | 10406 // Single beak point. |
| 10405 if (!break_point_objects()->IsFixedArray()) return 1; | 10407 if (!break_point_objects()->IsFixedArray()) return 1; |
| 10406 // Multiple break points. | 10408 // Multiple break points. |
| 10407 return FixedArray::cast(break_point_objects())->length(); | 10409 return FixedArray::cast(break_point_objects())->length(); |
| 10408 } | 10410 } |
| 10409 #endif | 10411 #endif |
| 10410 | 10412 |
| 10411 | 10413 |
| 10412 } } // namespace v8::internal | 10414 } } // namespace v8::internal |
| OLD | NEW |