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 2752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2763 // Attempt to shrink the dictionary after deletion of key. | 2763 // Attempt to shrink the dictionary after deletion of key. |
2764 MUST_USE_RESULT MaybeObject* Shrink(Key key); | 2764 MUST_USE_RESULT MaybeObject* Shrink(Key key); |
2765 | 2765 |
2766 // Returns the number of elements in the dictionary filtering out properties | 2766 // Returns the number of elements in the dictionary filtering out properties |
2767 // with the specified attributes. | 2767 // with the specified attributes. |
2768 int NumberOfElementsFilterAttributes(PropertyAttributes filter); | 2768 int NumberOfElementsFilterAttributes(PropertyAttributes filter); |
2769 | 2769 |
2770 // Returns the number of enumerable elements in the dictionary. | 2770 // Returns the number of enumerable elements in the dictionary. |
2771 int NumberOfEnumElements(); | 2771 int NumberOfEnumElements(); |
2772 | 2772 |
| 2773 enum SortMode { UNSORTED, SORTED }; |
2773 // Copies keys to preallocated fixed array. | 2774 // Copies keys to preallocated fixed array. |
2774 void CopyKeysTo(FixedArray* storage, PropertyAttributes filter); | 2775 void CopyKeysTo(FixedArray* storage, |
| 2776 PropertyAttributes filter, |
| 2777 SortMode sort_mode); |
2775 // Fill in details for properties into storage. | 2778 // Fill in details for properties into storage. |
2776 void CopyKeysTo(FixedArray* storage); | 2779 void CopyKeysTo(FixedArray* storage, SortMode sort_mode); |
2777 | 2780 |
2778 // Accessors for next enumeration index. | 2781 // Accessors for next enumeration index. |
2779 void SetNextEnumerationIndex(int index) { | 2782 void SetNextEnumerationIndex(int index) { |
2780 this->fast_set(this, kNextEnumerationIndexIndex, Smi::FromInt(index)); | 2783 this->fast_set(this, kNextEnumerationIndexIndex, Smi::FromInt(index)); |
2781 } | 2784 } |
2782 | 2785 |
2783 int NextEnumerationIndex() { | 2786 int NextEnumerationIndex() { |
2784 return Smi::cast(FixedArray::get(kNextEnumerationIndexIndex))->value(); | 2787 return Smi::cast(FixedArray::get(kNextEnumerationIndexIndex))->value(); |
2785 } | 2788 } |
2786 | 2789 |
(...skipping 4346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7133 } else { | 7136 } else { |
7134 value &= ~(1 << bit_position); | 7137 value &= ~(1 << bit_position); |
7135 } | 7138 } |
7136 return value; | 7139 return value; |
7137 } | 7140 } |
7138 }; | 7141 }; |
7139 | 7142 |
7140 } } // namespace v8::internal | 7143 } } // namespace v8::internal |
7141 | 7144 |
7142 #endif // V8_OBJECTS_H_ | 7145 #endif // V8_OBJECTS_H_ |
OLD | NEW |