Open nnethercote opened 9 hours ago
Details in the individual commits.
Let me know if I am sending you too many reviews, I can reassign if necessary.
It's worth noting my motivation for this change. I wanted to try making Borrowck
a normal analysis whose results are computed with iterate_to_fixpoint
instead of being cobbled together from the results of Borrows
/MaybeUninitializedPlaces
/EverInitializedPlaces
. When I tried to do this the complexity of SwitchInt
handling completely blocked me from doing it. After doing the simplification in this PR, it was not just possible, but fairly easy. In the end, making Borrowck
a normal analysis turned out to not work well -- it slowed compile times noticeably -- but it was a good proof of concept that the new structure is simpler and more flexible.
Dataflow handling of
SwitchInt
is currently complicated. This PR simplifies it.r? @cjgillot