]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #29588 - nikomatsakis:mir-switch, r=aatch
authorbors <bors@rust-lang.org>
Fri, 6 Nov 2015 06:13:59 +0000 (06:13 +0000)
committerbors <bors@rust-lang.org>
Fri, 6 Nov 2015 06:13:59 +0000 (06:13 +0000)
Introduce a `SwitchInt` and restructure pattern matching to collect integers and characters into one master switch. This is aimed at #29227, but is not a complete fix. Whereas before we generated an if-else-if chain and, at least on my machine, just failed to compile, we now spend ~9sec compiling `rustc_abuse`. AFAICT this is basically just due to a need for more micro-optimization of the matching process: perf shows a fair amount of time just spent iterating over the candidate list. Still, it seemed worth opening a PR with this step alone, since it's a big step forward.


Trivial merge