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

Unified Diff: src/keys.h

Issue 2038043002: [keys] keep track of first and last non-empty prototype (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: do not initialize handle with nullptr Created 4 years, 6 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 | « no previous file | 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 6b8f4b8162911de6053ae2c00f25152200987f06..647c5e211121720875ed1a54e973f054a803174b 100644
--- a/src/keys.h
+++ b/src/keys.h
@@ -40,6 +40,7 @@ class KeyAccumulator final BASE_EMBEDDED {
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 = GetKeysConversion::kKeepNumbers);
Maybe<bool> CollectKeys(Handle<JSReceiver> receiver,
@@ -64,6 +65,9 @@ class KeyAccumulator final BASE_EMBEDDED {
void set_filter_proxy_keys(bool filter) { filter_proxy_keys_ = filter; }
void set_is_for_in(bool value) { is_for_in_ = value; }
void set_skip_indices(bool value) { skip_indices_ = value; }
+ void set_last_non_empty_prototype(Handle<JSReceiver> object) {
+ last_non_empty_prototype_ = object;
+ }
private:
Maybe<bool> CollectOwnKeys(Handle<JSReceiver> receiver,
@@ -82,6 +86,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_;
+ Handle<JSReceiver> last_non_empty_prototype_;
KeyCollectionMode mode_;
PropertyFilter filter_;
bool filter_proxy_keys_ = true;
@@ -117,6 +122,7 @@ class FastKeyAccumulator {
Isolate* isolate_;
Handle<JSReceiver> receiver_;
+ Handle<JSReceiver> last_non_empty_prototype_;
KeyCollectionMode mode_;
PropertyFilter filter_;
bool filter_proxy_keys_ = true;
« no previous file with comments | « no previous file | src/keys.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698