mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:37:46 +00:00
LibJS: Make Map iterators independent of the underlying hashmap
This implements ordered maps as a pair of an RBTree for key order, and an underlying unordered hash map for storage. Fixes (part of) #11004.
This commit is contained in:
parent
e7dea10381
commit
4a73ec07c5
8 changed files with 153 additions and 19 deletions
|
@ -18,7 +18,7 @@ MapIterator::MapIterator(Map& map, Object::PropertyKind iteration_kind, Object&
|
|||
: Object(prototype)
|
||||
, m_map(map)
|
||||
, m_iteration_kind(iteration_kind)
|
||||
, m_iterator(map.entries().begin())
|
||||
, m_iterator(static_cast<Map const&>(map).begin())
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue