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

Side by Side Diff: src/objects.h

Issue 1375003002: Teach JSReceiver::GetKeys() how to include symbols (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 months 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') | src/objects.cc » ('J')
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 1832 matching lines...) Expand 10 before | Expand all | Expand 10 after
1843 // Retrieves a permanent object identity hash code. The undefined value might 1843 // Retrieves a permanent object identity hash code. The undefined value might
1844 // be returned in case no hash was created yet. 1844 // be returned in case no hash was created yet.
1845 inline Object* GetIdentityHash(); 1845 inline Object* GetIdentityHash();
1846 1846
1847 // Retrieves a permanent object identity hash code. May create and store a 1847 // Retrieves a permanent object identity hash code. May create and store a
1848 // hash code if needed and none exists. 1848 // hash code if needed and none exists.
1849 inline static Handle<Smi> GetOrCreateIdentityHash( 1849 inline static Handle<Smi> GetOrCreateIdentityHash(
1850 Handle<JSReceiver> object); 1850 Handle<JSReceiver> object);
1851 1851
1852 enum KeyCollectionType { OWN_ONLY, INCLUDE_PROTOS }; 1852 enum KeyCollectionType { OWN_ONLY, INCLUDE_PROTOS };
1853 enum IncludeSymbolNamedProperties { SKIP_SYMBOLS, INCLUDE_SYMBOLS };
Camillo Bruni 2015/09/29 16:27:20 Maybe use FixedArray::NON_SYMBOL_KEYS instead (or
Jakob Kummerow 2015/09/30 13:59:30 Done.
1853 1854
1854 // Computes the enumerable keys for a JSObject. Used for implementing 1855 // Computes the enumerable keys for a JSObject. Used for implementing
1855 // "for (n in object) { }". 1856 // "for (n in object) { }".
1856 MUST_USE_RESULT static MaybeHandle<FixedArray> GetKeys( 1857 MUST_USE_RESULT static MaybeHandle<FixedArray> GetKeys(
1857 Handle<JSReceiver> object, 1858 Handle<JSReceiver> object, KeyCollectionType type,
1858 KeyCollectionType type); 1859 IncludeSymbolNamedProperties include_symbols = SKIP_SYMBOLS);
1859 1860
1860 private: 1861 private:
1861 DISALLOW_IMPLICIT_CONSTRUCTORS(JSReceiver); 1862 DISALLOW_IMPLICIT_CONSTRUCTORS(JSReceiver);
1862 }; 1863 };
1863 1864
1864 1865
1865 // The JSObject describes real heap allocated JavaScript objects with 1866 // The JSObject describes real heap allocated JavaScript objects with
1866 // properties. 1867 // properties.
1867 // Note that the map of JSObject changes during execution to enable inline 1868 // Note that the map of JSObject changes during execution to enable inline
1868 // caching. 1869 // caching.
(...skipping 8751 matching lines...) Expand 10 before | Expand all | Expand 10 after
10620 10621
10621 Isolate* isolate_; 10622 Isolate* isolate_;
10622 Handle<FixedArray> keys_; 10623 Handle<FixedArray> keys_;
10623 Handle<OrderedHashSet> set_; 10624 Handle<OrderedHashSet> set_;
10624 int length_; 10625 int length_;
10625 DISALLOW_COPY_AND_ASSIGN(KeyAccumulator); 10626 DISALLOW_COPY_AND_ASSIGN(KeyAccumulator);
10626 }; 10627 };
10627 } } // namespace v8::internal 10628 } } // namespace v8::internal
10628 10629
10629 #endif // V8_OBJECTS_H_ 10630 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698