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:
Timothy Flynn 2025-04-29 08:00:05 -04:00 committed by Tim Flynn
commit 6b4b7a54de
Notes: github-actions[bot] 2025-04-30 11:30:29 +00:00
6 changed files with 108 additions and 51 deletions

View file

@ -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; }