summaryrefslogtreecommitdiff
path: root/deps/v8/src/objects/keys.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/objects/keys.h')
-rw-r--r--deps/v8/src/objects/keys.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/deps/v8/src/objects/keys.h b/deps/v8/src/objects/keys.h
index 5d8632e2a7..4c2307a20b 100644
--- a/deps/v8/src/objects/keys.h
+++ b/deps/v8/src/objects/keys.h
@@ -93,6 +93,7 @@ class KeyAccumulator final {
void set_last_non_empty_prototype(Handle<JSReceiver> object) {
last_non_empty_prototype_ = object;
}
+ void set_may_have_elements(bool value) { may_have_elements_ = value; }
// Shadowing keys are used to filter keys. This happens when non-enumerable
// keys appear again on the prototype chain.
void AddShadowingKey(Object key);
@@ -125,6 +126,7 @@ class KeyAccumulator final {
// For all the keys on the first receiver adding a shadowing key we can skip
// the shadow check.
bool skip_shadow_check_ = true;
+ bool may_have_elements_ = true;
DISALLOW_COPY_AND_ASSIGN(KeyAccumulator);
};
@@ -149,6 +151,7 @@ class FastKeyAccumulator {
bool is_receiver_simple_enum() { return is_receiver_simple_enum_; }
bool has_empty_prototype() { return has_empty_prototype_; }
+ bool may_have_elements() { return may_have_elements_; }
MaybeHandle<FixedArray> GetKeys(
GetKeysConversion convert = GetKeysConversion::kKeepNumbers);
@@ -160,6 +163,8 @@ class FastKeyAccumulator {
MaybeHandle<FixedArray> GetOwnKeysWithUninitializedEnumCache();
+ bool MayHaveElements(JSReceiver receiver);
+
Isolate* isolate_;
Handle<JSReceiver> receiver_;
Handle<JSReceiver> last_non_empty_prototype_;
@@ -169,6 +174,7 @@ class FastKeyAccumulator {
bool skip_indices_ = false;
bool is_receiver_simple_enum_ = false;
bool has_empty_prototype_ = false;
+ bool may_have_elements_ = true;
DISALLOW_COPY_AND_ASSIGN(FastKeyAccumulator);
};