]> git.lizzy.rs Git - rust.git/commit
Auto merge of #36752 - jonas-schievink:vartmparg, r=eddyb
authorbors <bors@rust-lang.org>
Thu, 29 Sep 2016 14:53:33 +0000 (07:53 -0700)
committerGitHub <noreply@github.com>
Thu, 29 Sep 2016 14:53:33 +0000 (07:53 -0700)
commitff67da63ea4ca9b19e1e8ee97de002a64a2a0473
tree13299f7238d77d904402578a9600bb9f4b4f2be8
parent704bcc0ddafc0b3c3f4879286204442d43169e30
parentd2c8893137fa98ce3b0de68b1d6ee95aecb743ee
Auto merge of #36752 - jonas-schievink:vartmparg, r=eddyb

Move MIR towards a single kind of local

This PR modifies MIR to handle function arguments (`Arg`), user-defined variable bindings (`Var`), compiler-generated temporaries (`Tmp`), as well as the return value pointer equally. All of them are replaced with a single `Local` type, a few functions for iterating over different kinds of locals, and a way to get the kind of local we're dealing with (mainly used in the constant qualification/propagation passes).

~~I haven't managed to fix one remaining issue: A `StorageDead` not getting emitted for a variable (see the `TODO` in the test). If that's fixed, this is basically good to go.~~ Found the issue (an off-by-one error), fix incoming.

r? @eddyb for changes to constant qualification and propagation I'm not quite sure about