mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-05 00:56:39 +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
Notes:
sideshowbarker
2024-07-18 12:34:11 +09:00
Author: https://github.com/IdanHo
Commit: 2a3090d292
Pull-request: https://github.com/SerenityOS/serenity/pull/7928
Reviewed-by: https://github.com/linusg
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