OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 3009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3020 | 3020 |
3021 // Returns the property details for the property at entry. | 3021 // Returns the property details for the property at entry. |
3022 PropertyDetails DetailsAt(int entry) { | 3022 PropertyDetails DetailsAt(int entry) { |
3023 ASSERT(entry >= 0); // Not found is -1, which is not caught by get(). | 3023 ASSERT(entry >= 0); // Not found is -1, which is not caught by get(). |
3024 return PropertyDetails( | 3024 return PropertyDetails( |
3025 Smi::cast(this->get(HashTable<Shape, Key>::EntryToIndex(entry) + 2))); | 3025 Smi::cast(this->get(HashTable<Shape, Key>::EntryToIndex(entry) + 2))); |
3026 } | 3026 } |
3027 | 3027 |
3028 // Set the details for entry. | 3028 // Set the details for entry. |
3029 void DetailsAtPut(int entry, PropertyDetails value) { | 3029 void DetailsAtPut(int entry, PropertyDetails value) { |
| 3030 ASSERT(value.dictionary_index() != 0 || |
| 3031 value.IsDontEnum() || |
| 3032 value.IsDeleted()); |
3030 this->set(HashTable<Shape, Key>::EntryToIndex(entry) + 2, value.AsSmi()); | 3033 this->set(HashTable<Shape, Key>::EntryToIndex(entry) + 2, value.AsSmi()); |
3031 } | 3034 } |
3032 | 3035 |
3033 // Sorting support | 3036 // Sorting support |
3034 void CopyValuesTo(FixedArray* elements); | 3037 void CopyValuesTo(FixedArray* elements); |
3035 | 3038 |
3036 // Delete a property from the dictionary. | 3039 // Delete a property from the dictionary. |
3037 Object* DeleteProperty(int entry, JSObject::DeleteMode mode); | 3040 Object* DeleteProperty(int entry, JSObject::DeleteMode mode); |
3038 | 3041 |
3039 // Attempt to shrink the dictionary after deletion of key. | 3042 // Attempt to shrink the dictionary after deletion of key. |
(...skipping 5912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8952 } else { | 8955 } else { |
8953 value &= ~(1 << bit_position); | 8956 value &= ~(1 << bit_position); |
8954 } | 8957 } |
8955 return value; | 8958 return value; |
8956 } | 8959 } |
8957 }; | 8960 }; |
8958 | 8961 |
8959 } } // namespace v8::internal | 8962 } } // namespace v8::internal |
8960 | 8963 |
8961 #endif // V8_OBJECTS_H_ | 8964 #endif // V8_OBJECTS_H_ |
OLD | NEW |