DescriptionES6 Map/Set iterators/forEach improvements
This changes how Map/Set interacts with its iterators. When the
underlying table is rehashed or cleared, we create a new table (like
before) but we add a reference from the old table to the new table. We
also add an array describing how to transition the iterator from the
old table to the new table.
When Next is called on the iterator it checks if there is a newer table
that it should transition to. If there is, it updates the index based
on the previously recorded changes and finally changes itself to point
at the new table.
With these changes Map/Set no longer keeps the iterators alive. Also,
as before, the iterators keep the underlying table(s) alive but not the
actual Map/Set.
BUG=v8:1793
LOG=Y
R=mstarzinger@chromium.org, rossberg@chromium.org
Committed: https://code.google.com/p/v8/source/detail?r=21389
Patch Set 1 #Patch Set 2 : Comment improvements #
Total comments: 5
Patch Set 3 : partial code review feedback update #
Total comments: 1
Patch Set 4 : Store the removed indexes in the old table #Patch Set 5 : Ready for review again #
Total comments: 8
Patch Set 6 : Rename and more #Patch Set 7 : Expanded tests and fixed edge case #
Total comments: 2
Patch Set 8 : Add more tests #
Total comments: 2
Patch Set 9 : Add comment for Transition #
Total comments: 2
Patch Set 10 : Updated test #Patch Set 11 : git rebase to fix merge conflict #
Messages
Total messages: 30 (0 generated)
|