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

Unified Diff: src/keys.h

Issue 2002203002: [api] Add more parameters to Object::GetPropertyNames (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@2016-05-06_keys_fast_path_1995263002
Patch Set: addressing nits 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/json-stringifier.cc ('k') | src/keys.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/keys.h
diff --git a/src/keys.h b/src/keys.h
index 4f99bb5bd43e5e03ac9536fe01dea2de83cba18d..6b8f4b8162911de6053ae2c00f25152200987f06 100644
--- a/src/keys.h
+++ b/src/keys.h
@@ -31,16 +31,17 @@ enum AddKeyConversion { DO_NOT_CONVERT, CONVERT_TO_ARRAY_INDEX };
// are more compact and allow for reasonably fast includes check.
class KeyAccumulator final BASE_EMBEDDED {
public:
- KeyAccumulator(Isolate* isolate, KeyCollectionType type,
+ KeyAccumulator(Isolate* isolate, KeyCollectionMode mode,
PropertyFilter filter)
- : isolate_(isolate), type_(type), filter_(filter) {}
+ : isolate_(isolate), mode_(mode), filter_(filter) {}
~KeyAccumulator();
static MaybeHandle<FixedArray> GetKeys(
- Handle<JSReceiver> object, KeyCollectionType type, PropertyFilter filter,
- GetKeysConversion keys_conversion = KEEP_NUMBERS,
+ Handle<JSReceiver> object, KeyCollectionMode mode, PropertyFilter filter,
+ GetKeysConversion keys_conversion = GetKeysConversion::kKeepNumbers,
bool filter_proxy_keys = true, bool is_for_in = false);
- Handle<FixedArray> GetKeys(GetKeysConversion convert = KEEP_NUMBERS);
+ Handle<FixedArray> GetKeys(
+ GetKeysConversion convert = GetKeysConversion::kKeepNumbers);
Maybe<bool> CollectKeys(Handle<JSReceiver> receiver,
Handle<JSReceiver> object);
Maybe<bool> CollectOwnElementIndices(Handle<JSReceiver> receiver,
@@ -81,7 +82,7 @@ class KeyAccumulator final BASE_EMBEDDED {
// keys_ is either an Handle<OrderedHashSet> or in the case of own JSProxy
// keys a Handle<FixedArray>.
Handle<FixedArray> keys_;
- KeyCollectionType type_;
+ KeyCollectionMode mode_;
PropertyFilter filter_;
bool filter_proxy_keys_ = true;
bool is_for_in_ = false;
@@ -96,8 +97,8 @@ class KeyAccumulator final BASE_EMBEDDED {
class FastKeyAccumulator {
public:
FastKeyAccumulator(Isolate* isolate, Handle<JSReceiver> receiver,
- KeyCollectionType type, PropertyFilter filter)
- : isolate_(isolate), receiver_(receiver), type_(type), filter_(filter) {
+ KeyCollectionMode mode, PropertyFilter filter)
+ : isolate_(isolate), receiver_(receiver), mode_(mode), filter_(filter) {
Prepare();
}
@@ -106,7 +107,8 @@ class FastKeyAccumulator {
void set_filter_proxy_keys(bool filter) { filter_proxy_keys_ = filter; }
void set_is_for_in(bool value) { is_for_in_ = value; }
- MaybeHandle<FixedArray> GetKeys(GetKeysConversion convert = KEEP_NUMBERS);
+ MaybeHandle<FixedArray> GetKeys(
+ GetKeysConversion convert = GetKeysConversion::kKeepNumbers);
private:
void Prepare();
@@ -115,7 +117,7 @@ class FastKeyAccumulator {
Isolate* isolate_;
Handle<JSReceiver> receiver_;
- KeyCollectionType type_;
+ KeyCollectionMode mode_;
PropertyFilter filter_;
bool filter_proxy_keys_ = true;
bool is_for_in_ = false;
« no previous file with comments | « src/json-stringifier.cc ('k') | src/keys.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698