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

Side by Side Diff: src/objects.h

Issue 2014523002: Reland of [keys] Simplify KeyAccumulator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixing wrong handle dereferencing Created 4 years, 7 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 | « src/keys.cc ('k') | 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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/assert-scope.h" 10 #include "src/assert-scope.h"
(...skipping 1957 matching lines...) Expand 10 before | Expand all | Expand 10 after
1968 // be returned in case no hash was created yet. 1968 // be returned in case no hash was created yet.
1969 static inline Handle<Object> GetIdentityHash(Isolate* isolate, 1969 static inline Handle<Object> GetIdentityHash(Isolate* isolate,
1970 Handle<JSReceiver> object); 1970 Handle<JSReceiver> object);
1971 1971
1972 // Retrieves a permanent object identity hash code. May create and store a 1972 // Retrieves a permanent object identity hash code. May create and store a
1973 // hash code if needed and none exists. 1973 // hash code if needed and none exists.
1974 inline static Handle<Smi> GetOrCreateIdentityHash( 1974 inline static Handle<Smi> GetOrCreateIdentityHash(
1975 Handle<JSReceiver> object); 1975 Handle<JSReceiver> object);
1976 1976
1977 // ES6 [[OwnPropertyKeys]] (modulo return type) 1977 // ES6 [[OwnPropertyKeys]] (modulo return type)
1978 MUST_USE_RESULT static MaybeHandle<FixedArray> OwnPropertyKeys( 1978 MUST_USE_RESULT static inline MaybeHandle<FixedArray> OwnPropertyKeys(
1979 Handle<JSReceiver> object) { 1979 Handle<JSReceiver> object);
1980 return GetKeys(object, OWN_ONLY, ALL_PROPERTIES, CONVERT_TO_STRING);
1981 }
1982
1983 // Computes the enumerable keys for a JSObject. Used for implementing
1984 // "for (n in object) { }".
1985 MUST_USE_RESULT static MaybeHandle<FixedArray> GetKeys(
1986 Handle<JSReceiver> object, KeyCollectionType type, PropertyFilter filter,
1987 GetKeysConversion keys_conversion = KEEP_NUMBERS,
1988 bool filter_proxy_keys_ = true);
1989 1980
1990 MUST_USE_RESULT static MaybeHandle<FixedArray> GetOwnValues( 1981 MUST_USE_RESULT static MaybeHandle<FixedArray> GetOwnValues(
1991 Handle<JSReceiver> object, PropertyFilter filter); 1982 Handle<JSReceiver> object, PropertyFilter filter);
1992 1983
1993 MUST_USE_RESULT static MaybeHandle<FixedArray> GetOwnEntries( 1984 MUST_USE_RESULT static MaybeHandle<FixedArray> GetOwnEntries(
1994 Handle<JSReceiver> object, PropertyFilter filter); 1985 Handle<JSReceiver> object, PropertyFilter filter);
1995 1986
1996 // Layout description. 1987 // Layout description.
1997 static const int kPropertiesOffset = HeapObject::kHeaderSize; 1988 static const int kPropertiesOffset = HeapObject::kHeaderSize;
1998 static const int kHeaderSize = HeapObject::kHeaderSize + kPointerSize; 1989 static const int kHeaderSize = HeapObject::kHeaderSize + kPointerSize;
(...skipping 1974 matching lines...) Expand 10 before | Expand all | Expand 10 after
3973 class JSSetIterator; 3964 class JSSetIterator;
3974 3965
3975 3966
3976 class OrderedHashSet: public OrderedHashTable< 3967 class OrderedHashSet: public OrderedHashTable<
3977 OrderedHashSet, JSSetIterator, 1> { 3968 OrderedHashSet, JSSetIterator, 1> {
3978 public: 3969 public:
3979 DECLARE_CAST(OrderedHashSet) 3970 DECLARE_CAST(OrderedHashSet)
3980 3971
3981 static Handle<OrderedHashSet> Add(Handle<OrderedHashSet> table, 3972 static Handle<OrderedHashSet> Add(Handle<OrderedHashSet> table,
3982 Handle<Object> value); 3973 Handle<Object> value);
3974 static Handle<FixedArray> ConvertToKeysArray(Handle<OrderedHashSet> table,
3975 GetKeysConversion convert);
3983 }; 3976 };
3984 3977
3985 3978
3986 class JSMapIterator; 3979 class JSMapIterator;
3987 3980
3988 3981
3989 class OrderedHashMap 3982 class OrderedHashMap
3990 : public OrderedHashTable<OrderedHashMap, JSMapIterator, 2> { 3983 : public OrderedHashTable<OrderedHashMap, JSMapIterator, 2> {
3991 public: 3984 public:
3992 DECLARE_CAST(OrderedHashMap) 3985 DECLARE_CAST(OrderedHashMap)
(...skipping 6774 matching lines...) Expand 10 before | Expand all | Expand 10 after
10767 } 10760 }
10768 return value; 10761 return value;
10769 } 10762 }
10770 }; 10763 };
10771 10764
10772 10765
10773 } // NOLINT, false-positive due to second-order macros. 10766 } // NOLINT, false-positive due to second-order macros.
10774 } // NOLINT, false-positive due to second-order macros. 10767 } // NOLINT, false-positive due to second-order macros.
10775 10768
10776 #endif // V8_OBJECTS_H_ 10769 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/keys.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698