about summary refs log tree commit diff
path: root/src/librustc_incremental
AgeCommit message (Collapse)AuthorLines
2017-11-14incr.comp.: Store the query result index which records where query results ↵Michael Woerister-1/+1
can be found in the cached.
2017-11-13incr.comp.: Include header when loading cache files in order to get the same ↵Michael Woerister-18/+26
byte offsets as when saving.
2017-11-08std: Remove `rand` crate and moduleAlex Crichton-3/+5
This commit removes the `rand` crate from the standard library facade as well as the `__rand` module in the standard library. Neither of these were used in any meaningful way in the standard library itself. The only need for randomness in libstd is to initialize the thread-local keys of a `HashMap`, and that unconditionally used `OsRng` defined in the standard library anyway. The cruft of the `rand` crate and the extra `rand` support in the standard library makes libstd slightly more difficult to port to new platforms, namely WebAssembly which doesn't have any randomness at all (without interfacing with JS). The purpose of this commit is to clarify and streamline randomness in libstd, focusing on how it's only required in one location, hashmap seeds. Note that the `rand` crate out of tree has almost always been a drop-in replacement for the `rand` crate in-tree, so any usage (accidental or purposeful) of the crate in-tree should switch to the `rand` crate on crates.io. This then also has the further benefit of avoiding duplication (mostly) between the two crates!
2017-11-03Fix tests and rebase conflictleonardo.yvens-1/+1
2017-11-01Auto merge of #45472 - michaelwoerister:incr-comp-caching-base, r=nikomatsakisbors-2/+37
incr.comp.: Implement compiler diagnostic persistence. This PR implements storing and loading diagnostics that the compiler generates and thus allows for emitting warnings during incremental compilation without actually re-evaluating the thing the warning originally came from. It also lays some groundwork for storing and loading type information and MIR in the incr. comp. cache. ~~It is still work in progress:~~ - ~~There's still some documentation to be added.~~ - ~~The way anonymous queries are handled might lead to duplicated emissions of warnings. Not sure if there is a better way or how frequent such duplication would be in practice.~~ Diagnostic message duplication is addressed separately in #45519. r? @nikomatsakis
2017-10-25incr.comp.: Implement query diagnostic persistence.Michael Woerister-2/+37
2017-10-24Introduce CrateDisambiguator newtype and fix testsIgor Matuszewski-8/+9
2017-10-23Use 128 bit instead of Symbol for crate disambiguatorIgor Matuszewski-10/+5
2017-10-21rustc: Move bytecode compression into codegenAlex Crichton-5/+9
This commit moves compression of the bytecode from the `link` module to the `write` module, namely allowing it to be (a) cached by incremental compilation and (b) produced in parallel. The parallelization may show up as some nice wins during normal compilation and the caching in incremental mode should be beneficial for incremental compiles! (no more need to recompress the entire crate's bitcode on all builds)
2017-10-14Auto merge of #45104 - vitiral:incr_auto_assert2, r=michaelwoeristerbors-28/+393
Incremental compilation auto assert (with except) cc @michaelwoerister bors merged part 1, so this is a WIP of part 2 of #45009 -- auto asserting DepNodes depending on the type of node rustc_clean/dirty is attached to Framework: - [x] finish auto-detection for specified DepNodes - [x] finish auto-detection for remaining DepNodes Test Refactors: - [x] consts.rs - [x] enum_constructors.rs - [x] extern_mods.rs - [x] inherent_impls.rs - [x] statics.rs - [x] struct_constructors.rs - ~~**BLOCKED** trait_defs.rs, see FIXME~~ - ~~**BLOCKED** trait_impls.rs~~ - [x] type_defs.rs - [x] enum_defs.rs
2017-10-13fix review commentsGarrett Berg-18/+17
2017-10-13Auto merge of #45063 - michaelwoerister:bring-back-incremental-info, ↵bors-13/+87
r=nikomatsakis incr.comp.: Bring back output of -Zincremental-info. This got kind lost during the transition to red/green. I also switched back from `eprintln!()` to `println!()` since the former never actually produced any output. I suspect this has to do with `libterm` somehow monopolizing `stderr`. r? @nikomatsakis
2017-10-12incr comp: rustc_clean/dirty auto assertGarrett Berg-28/+394
This adds auto-assertion to `rustc_clean/dirty` and also implements more comprehensive testing for - src/test/incremental/hashes/enum_constructors.rs - src/test/incremental/hashes/enum_defs.rs - src/test/incremental/hashes/extern_mods.rs - src/test/incremental/hashes/inherent_impls.rs - src/test/incremental/hashes/statics.rs - src/test/incremental/hashes/struct_constructors.rs - src/test/incremental/hashes/type_defs.rs trait_defs.rs and trait_impl.rs are blocked on a hard to triage compiler ICE (at least hard for a newbie like me) having to do with some DepNodes not getting computed for traits. A FIXME has been added in the source to reflect this continued work.
2017-10-08Auto merge of #44983 - vitiral:dirty_clean_groups, r=michaelwoeristerbors-12/+45
groundwork for rustc_clean/dirty improvements This is a WIP PR that needs mentoring from @michaelwoerister. There are several TODOs but no outstanding questions (except for the main one -- **is this the right approach?**) This is the plumbing for supporing groups in `rustc_clean(labels="...")`, as well as supporting an `except="..."` which will remove the excepted labels in the "clean" check and then assert that they are dirty (this is still TODO). See the code TODO's and example comments for a rough design. I'd like to know if this is the design you would like to do, and then I can go about actually filling out the groups and implementing the remaining logic.
2017-10-06incr.comp.: Bring back output of -Zincremental-info.Michael Woerister-13/+87
2017-10-04groundwork for #45009: rustc_dirty/clean enhancementsGarrett Berg-12/+45
2017-10-03incr.comp.: Fix some merge fallout.Michael Woerister-0/+7
2017-10-02incr.comp.: Remove saving and loading of legacy dep-graph.Michael Woerister-1616/+58
2017-10-02incr.comp.: Build DepGraphQuery from new dep-graph impl.Michael Woerister-1/+1
2017-10-02incr.comp.: Use red/green tracking for CGU re-use.Michael Woerister-26/+21
2017-10-02incr.comp.: Determine red/green state of every new node.Michael Woerister-2/+2
2017-09-27Remove DepNodeIndex::new is already impl for IdxSantiago Pastorino-9/+1
2017-09-23incr.comp.: Remove out-dated unit test and unnecessary assertion.Michael Woerister-49/+0
2017-09-23incr.comp.: Make #[rustc_dirty/clean] test for fingerprint equality instead ↵Michael Woerister-84/+26
of DepNode existence.
2017-09-23incr.comp.: Remove support for loading metadata fingerprints.Michael Woerister-302/+30
2017-09-23incr.comp.: Serialize and deserialize new DepGraphMichael Woerister-0/+55
2017-09-20incr.comp.: Remove IncrementalHashesMap and calculate_svh module.Michael Woerister-357/+26
2017-09-20incr.comp.: Store result fingerprints in DepGraph.Michael Woerister-15/+6
2017-09-20incr.comp.: Allow for marking DepKinds as inputs.Michael Woerister-21/+4
2017-09-18incr.comp.: Remove tcx from StableHashingContext.Michael Woerister-3/+3
2017-09-18incr.comp.: Make the StableHashingContext mostly independent of the tcx.Michael Woerister-14/+13
2017-09-18Fix issues uncovered by rebasing:Michael Woerister-21/+35
- Don't hash traits in scope as part of HIR hashing any more. - Some queries returned DefIndexes from other crates. - Provide a generic way of stably hashing maps (not used everywhere yet).
2017-09-14rustc: Remove `Session::dep_graph`Alex Crichton-53/+50
This commit removes the `dep_graph` field from the `Session` type according to issue #44390. Most of the fallout here was relatively straightforward and the `prepare_session_directory` function was rejiggered a bit to reuse the results in the later-called `load_dep_graph` function. Closes #44390
2017-09-05rustc: Move crate_hash to a queryAlex Crichton-2/+2
2017-08-25*: remove crate_{name,type} attributesTamir Duberstein-3/+0
Fixes #41701.
2017-08-19rustc: Remove some dead codeVadim Petrochenkov-6/+0
2017-08-17Rollup merge of #43891 - Fourchaux:master, r=steveklabnikCorey Farwell-1/+1
Fix typos & us spellings Fixing some typos and non en-US spellings. (Update of PR https://github.com/rust-lang/rust/pull/42812 )
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-14/+14
Like #43008 (f668999), but _much more aggressive_.
2017-08-15Fix typos & us spellingsFourchaux-1/+1
2017-07-31async-llvm(18): Instantiate OngoingCrateTranslation before starting translation.Michael Woerister-2/+2
2017-07-22rustc: Add some build scripts for librustc cratesAlex Crichton-0/+14
This commit adds some "boilerplate" build scripts to librustc/libsyntax crates to declare dependencies on various environment variables that are configured throughout the build. Cargo recently gained the ability to depend on environment variables in build scripts which can help trigger recompilation of a crate. This should fix weird bugs where after you make a commit or a few days later you'll get weird "not built with the same compiler" errors hopefully.
2017-07-10incr.comp.: Manage dependency graph on main thread.Michael Woerister-8/+2
2017-07-10incr.comp.: Improve debug output for work products.Michael Woerister-5/+10
2017-07-02Remove the remaining feature gatesStjepan Glavina-1/+0
2017-06-22Print -Zincremental-info to stderr instead of stdout.Michael Woerister-18/+18
2017-06-19Bump version and stage0 compilerAlex Crichton-4/+0
2017-06-12kill various tasks we no longer need and remove outdated README textNiko Matsakis-2/+1
In the case of `TransCrateItem`, I had to tweak the tests a bit, but it's a concept that doesn't work well under new system.
2017-06-09incr.comp.: Clean up and optimize dep-graph loading.Michael Woerister-89/+116
2017-06-09incr.comp.: Uniformly represent DepNodes as (Kind, StableHash) pairs.Michael Woerister-264/+262
2017-06-07Allocate DefIndices for global crate metadata.Michael Woerister-37/+10
This allows for treating global crate metadata the same as regular metadata with regard to incr. comp.