mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:27:34 +00:00
LibJS: Add the SetIterator built-in and Set.prototype.{values, entries}
While this implementation should be complete it is based on HashTable's iterator, which currently follows bucket-order instead of the required insertion order. This can be simply fixed by replacing the underlying HashTable member in Set with an enhanced one that maintains a linked list in insertion order.
This commit is contained in:
parent
0b0f1eda05
commit
2a3090d292
10 changed files with 209 additions and 0 deletions
|
@ -69,6 +69,7 @@
|
|||
#define JS_ENUMERATE_ITERATOR_PROTOTYPES \
|
||||
__JS_ENUMERATE(Iterator, iterator) \
|
||||
__JS_ENUMERATE(ArrayIterator, array_iterator) \
|
||||
__JS_ENUMERATE(SetIterator, set_iterator) \
|
||||
__JS_ENUMERATE(StringIterator, string_iterator)
|
||||
|
||||
#define JS_ENUMERATE_BUILTIN_TYPES \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue