OLD | NEW |
---|---|
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 8573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8584 | 8584 |
8585 Object* NumberDictionary::Set(uint32_t key, | 8585 Object* NumberDictionary::Set(uint32_t key, |
8586 Object* value, | 8586 Object* value, |
8587 PropertyDetails details) { | 8587 PropertyDetails details) { |
8588 int entry = FindEntry(key); | 8588 int entry = FindEntry(key); |
8589 if (entry == kNotFound) return AddNumberEntry(key, value, details); | 8589 if (entry == kNotFound) return AddNumberEntry(key, value, details); |
8590 // Preserve enumeration index. | 8590 // Preserve enumeration index. |
8591 details = PropertyDetails(details.attributes(), | 8591 details = PropertyDetails(details.attributes(), |
8592 details.type(), | 8592 details.type(), |
8593 DetailsAt(entry).index()); | 8593 DetailsAt(entry).index()); |
8594 SetEntry(entry, NumberDictionaryShape::AsObject(key), value, details); | 8594 Object* okey = NumberDictionaryShape::AsObject(key); |
Mads Ager (chromium)
2010/10/18 10:04:16
I don't like the name. key_object?
| |
8595 if (okey->IsFailure()) return okey; | |
8596 SetEntry(entry, okey, value, details); | |
8595 return this; | 8597 return this; |
8596 } | 8598 } |
8597 | 8599 |
8598 | 8600 |
8599 | 8601 |
8600 template<typename Shape, typename Key> | 8602 template<typename Shape, typename Key> |
8601 int Dictionary<Shape, Key>::NumberOfElementsFilterAttributes( | 8603 int Dictionary<Shape, Key>::NumberOfElementsFilterAttributes( |
8602 PropertyAttributes filter) { | 8604 PropertyAttributes filter) { |
8603 int capacity = HashTable<Shape, Key>::Capacity(); | 8605 int capacity = HashTable<Shape, Key>::Capacity(); |
8604 int result = 0; | 8606 int result = 0; |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
9060 if (break_point_objects()->IsUndefined()) return 0; | 9062 if (break_point_objects()->IsUndefined()) return 0; |
9061 // Single beak point. | 9063 // Single beak point. |
9062 if (!break_point_objects()->IsFixedArray()) return 1; | 9064 if (!break_point_objects()->IsFixedArray()) return 1; |
9063 // Multiple break points. | 9065 // Multiple break points. |
9064 return FixedArray::cast(break_point_objects())->length(); | 9066 return FixedArray::cast(break_point_objects())->length(); |
9065 } | 9067 } |
9066 #endif | 9068 #endif |
9067 | 9069 |
9068 | 9070 |
9069 } } // namespace v8::internal | 9071 } } // namespace v8::internal |
OLD | NEW |