Subteam report: compiler 2016-05-20
Highlights
I mentioned that last week we had our first ever "compiler team development sprint". I wanted to give a few more details on what we did during the week.
First off, we had a number of design discussions, covering such topics as incremental compilation, the shortest path to IDE integration, and how to restructure the compiler to move lifetime checking so that it operates on the MIR (which is required for non-lexical lifetimes).
Secondly, we did a lot of hacking! Some of the notable highlights were:
- arielb1 implemented a more-or-less working version of non-zeroing drop!
- pnkfelix implemented a number of fixes and a unit-testing framework for the dataflow framework that underlies the non-zeroing drop work.
- nagisa implemented a lattice-based dataflow framework for constant propagation and other optimizations on MIR.
- eddyb hacked up the compiler to save metadata even when not generating code, which could serve as the basis for a cross-crate version of cargo check (think: very fast type-checking while you are working). He also worked on some refactorings in support of incremental compilation.
- nrc made a number of improvements to rustw, interfacing it to the compiler's metadata so it can support things like "go to definition" etc. This will hopefully evolve into something that other IDEs can tap into as well.
- mw and aatch made great progress on refactoring the back-end of the compiler to be more suitable for incremental compilation; we're getting close to a working prototype!
- doener made a number of small improvements to MIR that collectively had a huge impact on the time it takes to translate various crates using MIR.
- nmatsakis (that's me!) fixed a horrible bug in the lifetime errors that was often causing them to give terrible suggestions, and made some improvements to track incremental changes across crates.
- Alon Zakai and Brian Anderson did some preliminary hacking that allowed us to translate Rust MIR into WebAssembly, successfully converting a simple "hello, world" style example.
Quite a successful week!
-- nmatsakis
Dashboard
RFC phase
- PR #1414: Add Rvalue-static-promotion RFC
- PR #1566: Procedural macros
- PR #1573: Supporting code generators with source maps and multiple source directories
- PR #1589: Best practices for bug fixes in the compiler
Implementation phase
- Issue #5016: implement "dynamic drop" semantics using flags on the stack rather than zeroing
- Issue #12634: Replace various intrinsic wrappers with intrinsic reexports
- Issue #15023: Better temporary lifetimes (tracking issue for RFC 66)
- Issue #15287: Implement Pattern Guards with Bind-By-Move
- Issue #20561: Tracking issue for Consistent no-prelude attribute (RFC 501)
- Issue #27060: repr(packed) allows invalid unaligned loads
High priority issues
- Issue #29149: Lifetime bounds in Copy impls are ignored
- Issue #29859: Cyclic traits allow arbitrary traits to be synthesized
- Issue #30829: Code no longer builds because of RFC 1214
- Issue #31299: Bogus error in beta and nightly: recursive type has infinite size
- Issue #31567:
Dropand leaking&mutreferences - Issue #31964: ICE on type mismatch: Index out of bounds
- Issue #33364: ICE: OutputTypeParameterMismatch in failing to resolve associated type as tuple.
Needs decision
- Issue #29769: Mir: introduce overflow operations