summary refs log tree commit diff
path: root/src/librustc_incremental
AgeCommit message (Collapse)AuthorLines
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-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.
2017-06-06incr.comp.: Make WorkProductId opaque so we don't accidentally rely on being ↵Michael Woerister-8/+5
able to reconstruct obj-file names from one.
2017-06-06ICH: Make StableHashingContext work with any TyCtxt, not just the global one.Michael Woerister-2/+2
2017-06-01incr.comp.: Use a more efficient encoding for the on-disk dependency graph.Michael Woerister-58/+110
2017-05-31incr.comp.: Use DefPathHash-based DepNodes in the serialized DepGraph and ↵Michael Woerister-268/+74
remove obsolete DefIdDirectory.
2017-05-31Make a newtype for DefPathHash so they are not confused with content hashesMichael Woerister-1/+2
2017-05-23incr.comp.: Track expanded spans instead of FileMaps.Michael Woerister-42/+2
2017-05-18Use 128 instead of 64 bits for DefPath hashesMichael Woerister-1/+1
2017-05-17Auto merge of #41911 - michaelwoerister:querify_trait_def, r=nikomatsakisbors-1/+54
Remove interior mutability from TraitDef by turning fields into queries This PR gets rid of anything `std::cell` in `TraitDef` by - moving the global list of trait impls from `TraitDef` into a query, - moving the list of trait impls relevent for some self-type from `TraitDef` into a query - moving the specialization graph of trait impls into a query, and - moving `TraitDef::object_safety` into a query. I really like how querifying things not only helps with incremental compilation and on-demand, but also just plain makes the code cleaner `:)` There are also some smaller fixes in the PR. Commits can be reviewed separately. r? @eddyb or @nikomatsakis
2017-05-15ICH: Hash lists of local trait impls as part of the HIR.Michael Woerister-1/+54
2017-05-14librustc_incremental: remove unused macro in test caseest31-11/+0
2017-05-13Auto merge of #41847 - alexcrichton:less-unstable-annotations, r=eddybbors-3/+4
rustc: Add a new `-Z force-unstable-if-unmarked` flag This commit adds a new `-Z` flag to the compiler for use when bootstrapping the compiler itself. We want to be able to use crates.io crates, but we also want the usage of such crates to be as ergonomic as possible! To that end compiler crates are a little tricky in that the crates.io crates are not annotated as unstable, nor do they expect to pull in unstable dependencies. To cover all these situations it's intended that the compiler will forever now bootstrap with `-Z force-unstable-if-unmarked`. This flags serves a dual purpose of forcing crates.io crates to themselves be unstable while also allowing them to use other "unstable" crates.io crates. This should mean that adding a dependency to compiler no longer requires upstream modification with unstable/staged_api attributes for inclusion!
2017-05-11rustc: Remove #![unstable] annotationAlex Crichton-3/+4
These are now no longer necessary with `-Z force-unstable-if-unmarked`
2017-05-10ICH: Handle case of removed FileMaps.Michael Woerister-1/+5
2017-05-09Auto merge of #41709 - michaelwoerister:close-metadata-ich-holes, r=nikomatsakisbors-58/+159
incr.comp.: Hash more pieces of crate metadata to detect changes there. This PR adds incr. comp. hashes for non-`Entry` pieces of data in crate metadata. The first part of it I like: `EntryBuilder` is refactored into the more generally applicable `IsolatedEncoder` which provides means of encoding something into metadata while also feeding the encoded data into an incr. comp. hash. We already did this for `Entry`, now we are doing it for various other pieces of data too, like the set of exported symbols and so on. The hashes generated there are persisted together with the per-`Entry` hashes and are also used for dep-graph dirtying the same way. The second part of the PR I'm not entirely happy with: In order to make sure that we don't forget registering a read to the new `DepNodes` introduced here, I added the `Tracked<T>` struct. This struct wraps a value and requires a `DepNode` when accessing the wrapped value. This makes it harder to overlook adding read edges in the right places and works just fine. However, crate metadata is already used in places where there is no `tcx` yet or even in places where no `cnum` has been assigned -- this makes it harder to apply this feature consistently or implement it ergonomically. The result is not too bad but there's a bit more code churn and a bit more opportunity to get something wrong than I would have liked. On the other hand, wrapping things in `Tracked<T>` already has revealed some bugs, so there's definitely some value in it. This is still a work in progress: - [x] I need to write some test cases. - [x] Accessing the CodeMap should really be dependency tracked too, especially with the new path-remapping feature. cc @nikomatsakis