mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
For those unfamiliar, this map is a vector of pairs that we stable sort by the key when we "freeze" it so we can run map operations upon the keys. This allows one to accumulate into the multi-map and then once one has finished accumulating, perform these map operations. While doing some work in the move checker, I thought I would need the ability to incrementally update a multi-map by appending more entires. Due to the design, supporting this is as simple as unfreezing the map. This results in one being no longer able to run map operations without hitting an assert. When one freezes again, the stable sort will put the new entries in the appropriate place in the already sorted initial part of the array. Turns out I didn't need this, but seemed useful, so I am upstreaming it.
12 KiB
12 KiB