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 2239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2250 inline void SetInternalField(int index, Object* value); | 2250 inline void SetInternalField(int index, Object* value); |
2251 inline void SetInternalField(int index, Smi* value); | 2251 inline void SetInternalField(int index, Smi* value); |
2252 | 2252 |
2253 // Returns the number of properties on this object filtering out properties | 2253 // Returns the number of properties on this object filtering out properties |
2254 // with the specified attributes (ignoring interceptors). | 2254 // with the specified attributes (ignoring interceptors). |
2255 int NumberOfOwnProperties(PropertyAttributes filter = NONE); | 2255 int NumberOfOwnProperties(PropertyAttributes filter = NONE); |
2256 // Fill in details for properties into storage starting at the specified | 2256 // Fill in details for properties into storage starting at the specified |
2257 // index. Returns the number of properties added. | 2257 // index. Returns the number of properties added. |
2258 int GetOwnPropertyNames(FixedArray* storage, int index, | 2258 int GetOwnPropertyNames(FixedArray* storage, int index, |
2259 PropertyAttributes filter = NONE); | 2259 PropertyAttributes filter = NONE); |
2260 int CollectOwnPropertyNames(KeyAccumulator* keys, | 2260 void CollectOwnPropertyNames(KeyAccumulator* keys, |
2261 PropertyAttributes filter = NONE); | 2261 PropertyAttributes filter = NONE); |
2262 | 2262 |
2263 // Returns the number of properties on this object filtering out properties | 2263 // Returns the number of properties on this object filtering out properties |
2264 // with the specified attributes (ignoring interceptors). | 2264 // with the specified attributes (ignoring interceptors). |
2265 int NumberOfOwnElements(PropertyAttributes filter); | 2265 int NumberOfOwnElements(PropertyAttributes filter); |
2266 // Returns the number of enumerable elements (ignoring interceptors). | 2266 // Returns the number of enumerable elements (ignoring interceptors). |
2267 int NumberOfEnumElements(); | 2267 int NumberOfEnumElements(); |
2268 // Returns the number of elements on this object filtering out elements | 2268 // Returns the number of elements on this object filtering out elements |
2269 // with the specified attributes (ignoring interceptors). | 2269 // with the specified attributes (ignoring interceptors). |
2270 int GetOwnElementKeys(FixedArray* storage, PropertyAttributes filter); | 2270 int GetOwnElementKeys(FixedArray* storage, PropertyAttributes filter); |
2271 static void CollectOwnElementKeys(Handle<JSObject> object, | 2271 static void CollectOwnElementKeys(Handle<JSObject> object, |
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3394 // non-configurable, non-enumerable, or have getters/setters. | 3394 // non-configurable, non-enumerable, or have getters/setters. |
3395 bool HasComplexElements(); | 3395 bool HasComplexElements(); |
3396 | 3396 |
3397 enum SortMode { UNSORTED, SORTED }; | 3397 enum SortMode { UNSORTED, SORTED }; |
3398 | 3398 |
3399 // Fill in details for properties into storage. | 3399 // Fill in details for properties into storage. |
3400 // Returns the number of properties added. | 3400 // Returns the number of properties added. |
3401 int CopyKeysTo(FixedArray* storage, int index, PropertyAttributes filter, | 3401 int CopyKeysTo(FixedArray* storage, int index, PropertyAttributes filter, |
3402 SortMode sort_mode); | 3402 SortMode sort_mode); |
3403 // Collect the unsorted keys into the given KeyAccumulator. | 3403 // Collect the unsorted keys into the given KeyAccumulator. |
3404 int CollectKeysTo(KeyAccumulator* keys, PropertyAttributes filter); | 3404 void CollectKeysTo(KeyAccumulator* keys, PropertyAttributes filter); |
3405 | 3405 |
3406 // Copies enumerable keys to preallocated fixed array. | 3406 // Copies enumerable keys to preallocated fixed array. |
3407 void CopyEnumKeysTo(FixedArray* storage); | 3407 void CopyEnumKeysTo(FixedArray* storage); |
3408 | 3408 |
3409 // Accessors for next enumeration index. | 3409 // Accessors for next enumeration index. |
3410 void SetNextEnumerationIndex(int index) { | 3410 void SetNextEnumerationIndex(int index) { |
3411 DCHECK(index != 0); | 3411 DCHECK(index != 0); |
3412 this->set(kNextEnumerationIndexIndex, Smi::FromInt(index)); | 3412 this->set(kNextEnumerationIndexIndex, Smi::FromInt(index)); |
3413 } | 3413 } |
3414 | 3414 |
(...skipping 7291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10706 } | 10706 } |
10707 return value; | 10707 return value; |
10708 } | 10708 } |
10709 }; | 10709 }; |
10710 | 10710 |
10711 | 10711 |
10712 } // NOLINT, false-positive due to second-order macros. | 10712 } // NOLINT, false-positive due to second-order macros. |
10713 } // NOLINT, false-positive due to second-order macros. | 10713 } // NOLINT, false-positive due to second-order macros. |
10714 | 10714 |
10715 #endif // V8_OBJECTS_H_ | 10715 #endif // V8_OBJECTS_H_ |
OLD | NEW |