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

Unified Diff: src/objects.h

Issue 2010593002: Revert of [keys] Simplify KeyAccumulator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/keys.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 68eea62a621e6eba7700a634b351c267d3a28031..fe880f8ee93ba628e1d764d54dfe48f44d6e882b 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -1975,8 +1975,17 @@
Handle<JSReceiver> object);
// ES6 [[OwnPropertyKeys]] (modulo return type)
- MUST_USE_RESULT static inline MaybeHandle<FixedArray> OwnPropertyKeys(
- Handle<JSReceiver> object);
+ MUST_USE_RESULT static MaybeHandle<FixedArray> OwnPropertyKeys(
+ Handle<JSReceiver> object) {
+ return GetKeys(object, OWN_ONLY, ALL_PROPERTIES, CONVERT_TO_STRING);
+ }
+
+ // Computes the enumerable keys for a JSObject. Used for implementing
+ // "for (n in object) { }".
+ MUST_USE_RESULT static MaybeHandle<FixedArray> GetKeys(
+ Handle<JSReceiver> object, KeyCollectionType type, PropertyFilter filter,
+ GetKeysConversion keys_conversion = KEEP_NUMBERS,
+ bool filter_proxy_keys_ = true);
MUST_USE_RESULT static MaybeHandle<FixedArray> GetOwnValues(
Handle<JSReceiver> object, PropertyFilter filter);
@@ -3971,8 +3980,6 @@
static Handle<OrderedHashSet> Add(Handle<OrderedHashSet> table,
Handle<Object> value);
- static Handle<FixedArray> ConvertToKeysArray(Handle<OrderedHashSet> table,
- GetKeysConversion convert);
};
« 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