]> git.lizzy.rs Git - rust.git/commit
Auto merge of #33476 - nikomatsakis:incr-comp-xcrate, r=mw
authorbors <bors@rust-lang.org>
Wed, 18 May 2016 15:47:53 +0000 (08:47 -0700)
committerbors <bors@rust-lang.org>
Wed, 18 May 2016 15:47:53 +0000 (08:47 -0700)
commit9a140454ea47b7fd107b6e963b7ea2aef74e9518
tree9f792544e0cef474b45be01fe69ec9c945be45a1
parent9743c661b0e768997cf4af1c8da8d5838e1c2c2f
parentf860f8b7c9bf32137f5bd929e88925debbcc0b2c
Auto merge of #33476 - nikomatsakis:incr-comp-xcrate, r=mw

track incr. comp. dependencies across crates

This PR refactors the compiler's incremental compilation hashing so that it can track dependencies across crates. The main bits are:

- computing a hash representing the metadata for an item we are emitting
  - we do this by making `MetaData(X)` be the current task while computing metadata for an item
  - this naturally registers reads from any tables and things that we read for that purpose
  - we can then hash all the inputs to those tables
- tracking when we access metadata
  - we do this by registering a read of `MetaData(X)` for each foreign item `X` whose metadata we read
- hashing metadata from foreign items
  - we do this by loading up metadata from a file in the incr. comp. directory
  - if there is no file, we use the SVH for the entire crate

There is one very simple test only at this point. The next PR will be focused on expanding out the tests.

Note that this is based on top of https://github.com/rust-lang/rust/pull/33228

r? @michaelwoerister
src/librustc/ty/context.rs