Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: src/objects.h

Issue 1515473003: [cleanup] Drop JSObject::GetOwnPropertyNames(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2240 matching lines...) Expand 10 before | Expand all | Expand 10 after
2251 static inline int GetHeaderSize(InstanceType instance_type); 2251 static inline int GetHeaderSize(InstanceType instance_type);
2252 inline int GetHeaderSize(); 2252 inline int GetHeaderSize();
2253 2253
2254 static inline int GetInternalFieldCount(Map* map); 2254 static inline int GetInternalFieldCount(Map* map);
2255 inline int GetInternalFieldCount(); 2255 inline int GetInternalFieldCount();
2256 inline int GetInternalFieldOffset(int index); 2256 inline int GetInternalFieldOffset(int index);
2257 inline Object* GetInternalField(int index); 2257 inline Object* GetInternalField(int index);
2258 inline void SetInternalField(int index, Object* value); 2258 inline void SetInternalField(int index, Object* value);
2259 inline void SetInternalField(int index, Smi* value); 2259 inline void SetInternalField(int index, Smi* value);
2260 2260
2261 // Returns the number of properties on this object filtering out properties
2262 // with the specified attributes (ignoring interceptors).
2263 int NumberOfOwnProperties(PropertyFilter filter = ALL_PROPERTIES);
2264 // Fill in details for properties into storage starting at the specified
2265 // index. Returns the number of properties added.
2266 int GetOwnPropertyNames(FixedArray* storage, int index,
2267 PropertyFilter filter = ALL_PROPERTIES);
2268 void CollectOwnPropertyNames(KeyAccumulator* keys, 2261 void CollectOwnPropertyNames(KeyAccumulator* keys,
2269 PropertyFilter filter = ALL_PROPERTIES); 2262 PropertyFilter filter = ALL_PROPERTIES);
2270 2263
2271 // Returns the number of properties on this object filtering out properties 2264 // Returns the number of properties on this object filtering out properties
2272 // with the specified attributes (ignoring interceptors). 2265 // with the specified attributes (ignoring interceptors).
2273 // TODO(jkummerow): Deprecated, only used by Object.observe. 2266 // TODO(jkummerow): Deprecated, only used by Object.observe.
2274 int NumberOfOwnElements(PropertyFilter filter); 2267 int NumberOfOwnElements(PropertyFilter filter);
2275 // Returns the number of elements on this object filtering out elements 2268 // Returns the number of elements on this object filtering out elements
2276 // with the specified attributes (ignoring interceptors). 2269 // with the specified attributes (ignoring interceptors).
2277 // TODO(jkummerow): Deprecated, only used by Object.observe. 2270 // TODO(jkummerow): Deprecated, only used by Object.observe.
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
3346 Key key) { 3339 Key key) {
3347 return DerivedHashTable::Shrink(dictionary, key); 3340 return DerivedHashTable::Shrink(dictionary, key);
3348 } 3341 }
3349 3342
3350 // Sorting support 3343 // Sorting support
3351 // TODO(dcarney): templatize or move to SeededNumberDictionary 3344 // TODO(dcarney): templatize or move to SeededNumberDictionary
3352 void CopyValuesTo(FixedArray* elements); 3345 void CopyValuesTo(FixedArray* elements);
3353 3346
3354 // Returns the number of elements in the dictionary filtering out properties 3347 // Returns the number of elements in the dictionary filtering out properties
3355 // with the specified attributes. 3348 // with the specified attributes.
3349 // TODO(jkummerow): Deprecated, only used by Object.observe.
3356 int NumberOfElementsFilterAttributes(PropertyFilter filter); 3350 int NumberOfElementsFilterAttributes(PropertyFilter filter);
3357 3351
3358 // Returns the number of enumerable elements in the dictionary. 3352 // Returns the number of enumerable elements in the dictionary.
3353 // TODO(jkummerow): Deprecated, only used by Object.observe.
3359 int NumberOfEnumElements() { 3354 int NumberOfEnumElements() {
3360 return NumberOfElementsFilterAttributes(ENUMERABLE_STRINGS); 3355 return NumberOfElementsFilterAttributes(ENUMERABLE_STRINGS);
3361 } 3356 }
3362 3357
3363 // Returns true if the dictionary contains any elements that are non-writable, 3358 // Returns true if the dictionary contains any elements that are non-writable,
3364 // non-configurable, non-enumerable, or have getters/setters. 3359 // non-configurable, non-enumerable, or have getters/setters.
3365 bool HasComplexElements(); 3360 bool HasComplexElements();
3366 3361
3367 enum SortMode { UNSORTED, SORTED }; 3362 enum SortMode { UNSORTED, SORTED };
3368 3363
3369 // Fill in details for properties into storage. 3364 // Fill in details for properties into storage.
3370 // Returns the number of properties added. 3365 // Returns the number of properties added.
3366 // TODO(jkummerow): Deprecated, only used by Object.observe.
3371 int CopyKeysTo(FixedArray* storage, int index, PropertyFilter filter, 3367 int CopyKeysTo(FixedArray* storage, int index, PropertyFilter filter,
3372 SortMode sort_mode); 3368 SortMode sort_mode);
3373 // Collect the keys into the given KeyAccumulator, in ascending chronological 3369 // Collect the keys into the given KeyAccumulator, in ascending chronological
3374 // order of property creation. 3370 // order of property creation.
3375 static void CollectKeysTo(Handle<Dictionary<Derived, Shape, Key> > dictionary, 3371 static void CollectKeysTo(Handle<Dictionary<Derived, Shape, Key> > dictionary,
3376 KeyAccumulator* keys, PropertyFilter filter); 3372 KeyAccumulator* keys, PropertyFilter filter);
3377 3373
3378 // Copies enumerable keys to preallocated fixed array. 3374 // Copies enumerable keys to preallocated fixed array.
3379 void CopyEnumKeysTo(FixedArray* storage); 3375 void CopyEnumKeysTo(FixedArray* storage);
3380 3376
(...skipping 7304 matching lines...) Expand 10 before | Expand all | Expand 10 after
10685 } 10681 }
10686 return value; 10682 return value;
10687 } 10683 }
10688 }; 10684 };
10689 10685
10690 10686
10691 } // NOLINT, false-positive due to second-order macros. 10687 } // NOLINT, false-positive due to second-order macros.
10692 } // NOLINT, false-positive due to second-order macros. 10688 } // NOLINT, false-positive due to second-order macros.
10693 10689
10694 #endif // V8_OBJECTS_H_ 10690 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698