OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 5677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5688 } else { | 5688 } else { |
5689 HeapSortPairs(this, smis); | 5689 HeapSortPairs(this, smis); |
5690 return; | 5690 return; |
5691 } | 5691 } |
5692 } | 5692 } |
5693 | 5693 |
5694 | 5694 |
5695 // Fill in the names of local properties into the supplied storage. The main | 5695 // Fill in the names of local properties into the supplied storage. The main |
5696 // purpose of this function is to provide reflection information for the object | 5696 // purpose of this function is to provide reflection information for the object |
5697 // mirrors. | 5697 // mirrors. |
5698 void JSObject::GetLocalPropertyNames(FixedArray* storage) { | 5698 void JSObject::GetLocalPropertyNames(FixedArray* storage, int index) { |
5699 ASSERT(storage->length() == | 5699 ASSERT(storage->length() >= |
5700 NumberOfLocalProperties(static_cast<PropertyAttributes>(NONE))); | 5700 NumberOfLocalProperties(static_cast<PropertyAttributes>(NONE)) - |
5701 int index = 0; | 5701 index); |
5702 if (HasFastProperties()) { | 5702 if (HasFastProperties()) { |
5703 for (DescriptorReader r(map()->instance_descriptors()); | 5703 for (DescriptorReader r(map()->instance_descriptors()); |
5704 !r.eos(); | 5704 !r.eos(); |
5705 r.advance()) { | 5705 r.advance()) { |
5706 if (!r.IsTransition()) { | 5706 if (!r.IsTransition()) { |
5707 storage->set(index++, r.GetKey()); | 5707 storage->set(index++, r.GetKey()); |
5708 } | 5708 } |
5709 } | 5709 } |
5710 ASSERT(storage->length() == index); | 5710 ASSERT(storage->length() >= index); |
5711 } else { | 5711 } else { |
5712 property_dictionary()->CopyKeysTo(storage); | 5712 property_dictionary()->CopyKeysTo(storage); |
5713 } | 5713 } |
5714 } | 5714 } |
5715 | 5715 |
5716 | 5716 |
5717 int JSObject::NumberOfLocalElements(PropertyAttributes filter) { | 5717 int JSObject::NumberOfLocalElements(PropertyAttributes filter) { |
5718 return GetLocalElementKeys(NULL, filter); | 5718 return GetLocalElementKeys(NULL, filter); |
5719 } | 5719 } |
5720 | 5720 |
(...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7015 // No break point. | 7015 // No break point. |
7016 if (break_point_objects()->IsUndefined()) return 0; | 7016 if (break_point_objects()->IsUndefined()) return 0; |
7017 // Single beak point. | 7017 // Single beak point. |
7018 if (!break_point_objects()->IsFixedArray()) return 1; | 7018 if (!break_point_objects()->IsFixedArray()) return 1; |
7019 // Multiple break points. | 7019 // Multiple break points. |
7020 return FixedArray::cast(break_point_objects())->length(); | 7020 return FixedArray::cast(break_point_objects())->length(); |
7021 } | 7021 } |
7022 | 7022 |
7023 | 7023 |
7024 } } // namespace v8::internal | 7024 } } // namespace v8::internal |
OLD | NEW |