OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 3527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3538 return DerivedHashTable::Shrink(dictionary, key); | 3538 return DerivedHashTable::Shrink(dictionary, key); |
3539 } | 3539 } |
3540 | 3540 |
3541 // Returns the number of elements in the dictionary filtering out properties | 3541 // Returns the number of elements in the dictionary filtering out properties |
3542 // with the specified attributes. | 3542 // with the specified attributes. |
3543 int NumberOfElementsFilterAttributes(PropertyAttributes filter); | 3543 int NumberOfElementsFilterAttributes(PropertyAttributes filter); |
3544 | 3544 |
3545 // Returns the number of enumerable elements in the dictionary. | 3545 // Returns the number of enumerable elements in the dictionary. |
3546 int NumberOfEnumElements(); | 3546 int NumberOfEnumElements(); |
3547 | 3547 |
| 3548 // Returns true if the dictionary contains any elements that are non-writable, |
| 3549 // non-configurable, or have getters/setters. |
| 3550 bool HasComplexElements(); |
| 3551 |
3548 enum SortMode { UNSORTED, SORTED }; | 3552 enum SortMode { UNSORTED, SORTED }; |
3549 // Copies keys to preallocated fixed array. | 3553 // Copies keys to preallocated fixed array. |
3550 void CopyKeysTo(FixedArray* storage, | 3554 void CopyKeysTo(FixedArray* storage, |
3551 PropertyAttributes filter, | 3555 PropertyAttributes filter, |
3552 SortMode sort_mode); | 3556 SortMode sort_mode); |
3553 // Fill in details for properties into storage. | 3557 // Fill in details for properties into storage. |
3554 void CopyKeysTo(FixedArray* storage, | 3558 void CopyKeysTo(FixedArray* storage, |
3555 int index, | 3559 int index, |
3556 PropertyAttributes filter, | 3560 PropertyAttributes filter, |
3557 SortMode sort_mode); | 3561 SortMode sort_mode); |
(...skipping 7352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10910 } else { | 10914 } else { |
10911 value &= ~(1 << bit_position); | 10915 value &= ~(1 << bit_position); |
10912 } | 10916 } |
10913 return value; | 10917 return value; |
10914 } | 10918 } |
10915 }; | 10919 }; |
10916 | 10920 |
10917 } } // namespace v8::internal | 10921 } } // namespace v8::internal |
10918 | 10922 |
10919 #endif // V8_OBJECTS_H_ | 10923 #endif // V8_OBJECTS_H_ |
OLD | NEW |