summary refs log tree commit diff
path: root/src/librustc_incremental
AgeCommit message (Collapse)AuthorLines
2016-08-11Save dep-tracking hash of commandline arguments in dep-graph file.Michael Woerister-2/+25
.. and use it to purge the incremental compilation cache if necessary.
2016-08-09pacify the merciless tidyNiko Matsakis-3/+6
2016-08-09incorporate resolve results into hashingNiko Matsakis-3/+96
We now incorporate the `def_map` and `trait_map` results into the SVH.
2016-08-09promote svh calculation into its own directoryNiko Matsakis-450/+459
2016-08-09stop hashing nested items, and add a testNiko Matsakis-20/+16
2016-08-09make it possible to test if HIR is dirtyNiko Matsakis-16/+67
This requires passing in the dirty-node set explicitly since HIR nodes wind up added to the graph either way.
2016-08-09fix licenseNiko Matsakis-0/+10
2016-08-09pacify the mercilous tidyNiko Matsakis-3/+0
2016-08-09address comments from mwNiko Matsakis-5/+29
2016-08-09use preds to serialize just what we needNiko Matsakis-209/+166
This massively speeds up serialization. It also seems to produce deterministic metadata hashes (before I was seeing inconsistent results). Fixes #35232.
2016-08-09add a `deterministic_hash` method to `DefPath`Niko Matsakis-1/+1
Produces a deterministic hash, at least for a single platform / compiler-version.
2016-08-09make DepNode PartialOrdNiko Matsakis-0/+1
2016-08-09isolate predecessor computationNiko Matsakis-0/+71
The new `Predecessors` type computes a set of interesting targets and their HIR predecessors, and discards everything in between.
2016-08-08rename KrateInfo to CrateInfoNiko Matsakis-4/+4
2016-08-05rustfmt save.rsNiko Matsakis-106/+95
2016-08-03skip assert-dep-graph unless unit testingNiko Matsakis-0/+7
this can actually be expensive!
2016-08-02improve log when something no longer existsNiko Matsakis-9/+29
2016-08-02replace graph rewriting with detecting inlined idsNiko Matsakis-52/+6
We now detect inlined id's earlier (in the HIR map) and rewrite a read of them to be a read of the metadata for the associated item.
2016-08-02make metadata hashes determinsticNiko Matsakis-33/+53
When we hash the inputs to a MetaData node, we have to hash them in a consistent order. We achieve this by sorting the stringfied `DefPath` entries. Also, micro-optimie by cache more results across the saving process.
2016-08-02watch out for krate numbers being reassignedNiko Matsakis-5/+73
The biggest problem, actually, is krate numbers being removed entirely, which can lead to array-index-out-of-bounds errors. cc #35123 -- not a complete fix, since really we ought to "map" the old crate numbers to the new ones, not just detect changes.
2016-08-02remap Hir(InlinedDefId) to MetaData(OriginalDefId)Niko Matsakis-22/+71
The way we do HIR inlining introduces reads of the "Hir" into the graph, but this Hir in fact belongs to other crates, so when we try to load later, we ICE because the Hir nodes in question don't belond to the crate (and we haven't done inlining yet). This pass rewrites those HIR nodes to the metadata from which the inlined HIR was loaded.
2016-08-01hash foreign items tooNiko Matsakis-2/+7
2016-07-30Rollup merge of #35090 - michaelwoerister:get-rid-of-id-visitor, r=eddybManish Goregaokar-4/+4
intravisit: Fold functionality of IdVisitor into the regular Visitor.
2016-07-29Auto merge of #34842 - cgswords:attr_enc, r=nrcbors-18/+14
Better attribute and metaitem encapsulation throughout the compiler This PR refactors most (hopefully all?) of the `MetaItem` interactions outside of `libsyntax` (and a few inside) to interact with MetaItems through the provided traits instead of directly creating / destruct / matching against them. This is a necessary first step to eventually converting `MetaItem`s to internally use `TokenStream` representations (which will make `MetaItem` interactions much nicer for macro writers once the new macro system is in place). r? @nrc
2016-07-29intravisit: Fold functionality of IdVisitor into the regular Visitor.Michael Woerister-4/+4
2016-07-28make it possible to track where hash divergesNiko Matsakis-0/+23
2016-07-28hash def-path's betterNiko Matsakis-3/+13
actually we shouldn't even hash nested items at all, but that is addressed in a followup PR
2016-07-28Keep multiple files per work-productNiko Matsakis-42/+57
In the older version, a `.o` and ` .bc` file were separate work-products. This newer version keeps, for each codegen-unit, a set of files of different kinds. We assume that if any kinds are available then all the kinds we need are available, since the precise set of switches will depend on attributes and command-line switches. Should probably test this: the effect of changing attributes in particular might not be successfully tracked?
2016-07-28Address mw nitsNiko Matsakis-9/+8
2016-07-28Modify trans to skip generating `.o` filesNiko Matsakis-0/+66
This checks the `previous_work_products` data from the dep-graph and tries to simply copy a `.o` file if possible. We also add new work-products into the dep-graph, and create edges to/from the dep-node for a work-product.
2016-07-28Code to save/load the work-products map from diskNiko Matsakis-50/+183
Work products are deleted if any of their inputs are dirty.
2016-07-28Store `crate_disambiguator` as an `InternedString`Niko Matsakis-4/+4
We used to use `Name`, but the session outlives the tokenizer, which means that attempts to read this field after trans has complete otherwise panic. All reads want an `InternedString` anyhow.
2016-07-25Adressed PR comments.cgswords-6/+2
2016-07-25General MetaItem encapsulation rewrites.cgswords-18/+18
2016-06-23Move errors from libsyntax to its own crateJonathan Turner-2/+4
2016-05-31expand `DepNode::TraitSelect` to include type idsNiko Matsakis-54/+54
To handle the general case, we include a vector of def-ids, so that we can account for things like `(Foo, Bar)` which references both `Foo` and `Bar`. This means it is not Copy, so re-jigger some APIs to use borrowing more intelligently.
2016-05-28Rollup merge of #33854 - petrochenkov:prefvis, r=eddybManish Goregaokar-4/+0
Apply visit_path to import prefixes by default Overriding `visit_path` is not enough to visit all paths, some import prefixes are not visited and `visit_path_list_item` need to be overridden as well. This PR removes this catch, it should be less error prone this way. Also, the prefix is visited once now, not repeatedly for each path list item. r? @eddyb
2016-05-24Apply visit_path to import prefixes by defaultVadim Petrochenkov-4/+0
2016-05-24syntax/hir: give loop labels a spanGeorg Brandl-1/+1
This makes the "shadowing labels" warning *not* print the entire loop as a span, but only the lifetime. Also makes #31719 go away, but does not fix its root cause (the span of the expanded loop is still wonky, but not used anymore).
2016-05-18nit: cache crate-hash for next timeNiko Matsakis-0/+5
2016-05-18load/save hashes of metadataNiko Matsakis-92/+249
This commit reorganizes how the persist code treats hashing. The idea is that each crate saves a file containing hashes representing the metadata for each item X. When we see a read from `MetaData(X)`, we can load this hash up (if we don't find a file for that crate, we just use the SVH for the entire crate). To compute the hash for `MetaData(Y)`, where Y is some local item, we examine all the predecessors of the `MetaData(Y)` node and hash their hashes together.
2016-05-18allow retracing paths across cratesNiko Matsakis-1/+1
For external crates, we must build up a map that goes from the DefKey to the DefIndex. We do this by iterating over each index that is found in the metadata and loading the associated DefKey.
2016-05-18cleanup dep-graph debugging codeNiko Matsakis-19/+9
Create some re-usable filtering subroutines.
2016-05-18change svh to store a u64Niko Matsakis-3/+10
We used to store a u64 converted to a String for some reason. Now we don't.
2016-05-18make the filename computation take a cratenumNiko Matsakis-8/+10
2016-05-18identify inputs of `MetaData(X)` nodesNiko Matsakis-69/+191
Generate a second hash file that contains the metadata for an X node.
2016-05-18rename the dep-graph file to include crate identNiko Matsakis-1/+7
This way, multiple compilations can share the same work directory.
2016-05-16Remove hir::IdentVadim Petrochenkov-3/+3
2016-05-14Remove ExplicitSelf from HIRVadim Petrochenkov-5/+0
2016-05-11rustc: Split 'tcx into 'gcx and 'tcx for InferCtxt and its users.Eduard Burtescu-21/+25