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 4104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4115 // the map field of the array. | 4115 // the map field of the array. |
4116 Map* next = Map::cast(contents->get(i)); | 4116 Map* next = Map::cast(contents->get(i)); |
4117 next->set_map(current); | 4117 next->set_map(current); |
4118 *map_or_index_field = Smi::FromInt(i + 2); | 4118 *map_or_index_field = Smi::FromInt(i + 2); |
4119 current = next; | 4119 current = next; |
4120 map_done = false; | 4120 map_done = false; |
4121 break; | 4121 break; |
4122 } | 4122 } |
4123 } | 4123 } |
4124 if (!map_done) continue; | 4124 if (!map_done) continue; |
| 4125 } else { |
| 4126 map_or_index_field = NULL; |
4125 } | 4127 } |
4126 // That was the regular transitions, now for the prototype transitions. | 4128 // That was the regular transitions, now for the prototype transitions. |
4127 FixedArray* prototype_transitions = | 4129 FixedArray* prototype_transitions = |
4128 current->unchecked_prototype_transitions(); | 4130 current->unchecked_prototype_transitions(); |
4129 Object** proto_map_or_index_field = | 4131 Object** proto_map_or_index_field = |
4130 RawField(prototype_transitions, HeapObject::kMapOffset); | 4132 RawField(prototype_transitions, HeapObject::kMapOffset); |
4131 Object* map_or_index = *proto_map_or_index_field; | 4133 Object* map_or_index = *proto_map_or_index_field; |
4132 const int start = kProtoTransitionHeaderSize + kProtoTransitionMapOffset; | 4134 const int start = kProtoTransitionHeaderSize + kProtoTransitionMapOffset; |
4133 int i = map_or_index->IsSmi() ? Smi::cast(map_or_index)->value() : start; | 4135 int i = map_or_index->IsSmi() ? Smi::cast(map_or_index)->value() : start; |
4134 if (i < prototype_transitions->length()) { | 4136 if (i < prototype_transitions->length()) { |
(...skipping 7556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11691 if (break_point_objects()->IsUndefined()) return 0; | 11693 if (break_point_objects()->IsUndefined()) return 0; |
11692 // Single beak point. | 11694 // Single beak point. |
11693 if (!break_point_objects()->IsFixedArray()) return 1; | 11695 if (!break_point_objects()->IsFixedArray()) return 1; |
11694 // Multiple break points. | 11696 // Multiple break points. |
11695 return FixedArray::cast(break_point_objects())->length(); | 11697 return FixedArray::cast(break_point_objects())->length(); |
11696 } | 11698 } |
11697 #endif | 11699 #endif |
11698 | 11700 |
11699 | 11701 |
11700 } } // namespace v8::internal | 11702 } } // namespace v8::internal |
OLD | NEW |