mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 10:18:13 +00:00
LibJS: Replace boolean without_side_effects parameters with an enum
This commit is contained in:
parent
864beb0bd5
commit
dcb55db99b
16 changed files with 56 additions and 51 deletions
|
@ -104,7 +104,7 @@ public:
|
|||
bool operator!=(const IndexedPropertyIterator&) const;
|
||||
|
||||
u32 index() const { return m_index; };
|
||||
ValueAndAttributes value_and_attributes(Object* this_object, bool evaluate_accessors = true);
|
||||
ValueAndAttributes value_and_attributes(Object* this_object, AllowSideEffects = AllowSideEffects::Yes);
|
||||
|
||||
private:
|
||||
void skip_empty_indices();
|
||||
|
@ -124,15 +124,15 @@ public:
|
|||
}
|
||||
|
||||
bool has_index(u32 index) const { return m_storage->has_index(index); }
|
||||
Optional<ValueAndAttributes> get(Object* this_object, u32 index, bool evaluate_accessors = true) const;
|
||||
void put(Object* this_object, u32 index, Value value, PropertyAttributes attributes = default_attributes, bool evaluate_accessors = true);
|
||||
Optional<ValueAndAttributes> get(Object* this_object, u32 index, AllowSideEffects = AllowSideEffects::Yes) const;
|
||||
void put(Object* this_object, u32 index, Value value, PropertyAttributes attributes = default_attributes, AllowSideEffects allow_side_effects = AllowSideEffects::Yes);
|
||||
bool remove(u32 index);
|
||||
|
||||
void insert(u32 index, Value value, PropertyAttributes attributes = default_attributes);
|
||||
ValueAndAttributes take_first(Object* this_object);
|
||||
ValueAndAttributes take_last(Object* this_object);
|
||||
|
||||
void append(Value value, PropertyAttributes attributes = default_attributes) { put(nullptr, array_like_size(), value, attributes, false); }
|
||||
void append(Value value, PropertyAttributes attributes = default_attributes) { put(nullptr, array_like_size(), value, attributes, AllowSideEffects::No); }
|
||||
|
||||
IndexedPropertyIterator begin(bool skip_empty = true) const { return IndexedPropertyIterator(*this, 0, skip_empty); };
|
||||
IndexedPropertyIterator end() const { return IndexedPropertyIterator(*this, array_like_size(), false); };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue