c71970eea2
This commit causes no change in trans semantics, it just moves some functions around and deduplicates them.
See the README.md in ../librustc.