mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 01:00:05 +00:00
LibJS: Revert ArrayIterator and RegExpStringIterator to manual iterators
This is a normative change in the ECMA-262 spec. See:
de62e8d
This did not actually seem to affect our implementation as we were not
using generators here to begin with. So this patch is basically just
adding spec comments.
This commit is contained in:
parent
107d0cafcf
commit
6b4b7a54de
Notes:
github-actions[bot]
2025-04-30 11:30:29 +00:00
Author: https://github.com/trflynn89
Commit: 6b4b7a54de
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4523
6 changed files with 108 additions and 51 deletions
|
@ -20,12 +20,14 @@ public:
|
|||
virtual ~ArrayIterator() override = default;
|
||||
|
||||
Value array() const { return m_array; }
|
||||
void set_array(Value array) { m_array = array; }
|
||||
|
||||
Object::PropertyKind iteration_kind() const { return m_iteration_kind; }
|
||||
|
||||
size_t index() const { return m_index; }
|
||||
void set_index(size_t index) { m_index = index; }
|
||||
|
||||
private:
|
||||
friend class ArrayIteratorPrototype;
|
||||
|
||||
ArrayIterator(Value array, Object::PropertyKind iteration_kind, Object& prototype);
|
||||
|
||||
virtual bool is_array_iterator() const override { return true; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue