mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-03 01:25:15 +00:00
- `RegionInferenceContext::init_free_and_bound_regions()` is inlined into `::new()` and pulled to before initial SCC values are assigned - A couple of iteration-then-index patterns are changed into `iter_enumerated()`-style patterns - Some leftover code comments are removed and revised to actually describe the initialisation - Free regions are now marked as live everywhere in liveness constraints, then copied to scc_values upon initialisation, avoiding performing that logic twice It should do strictly less work, but almost all of it would only happen on free regions, and there shouldn't be large numbers of those. Depending on the cleverness of the optimiser most of the option/some checks should have been compiled away anyway. The key advantage as I see it is clearer flow: first liveness constraints are set up, then initial values are initialised, then region inference is ready to run.