Commit Graph

28 Commits

Author SHA1 Message Date
Matthew Jasper cbcef3effc Rework `rustc_serialize`
- Move the type parameter from `encode` and `decode` methods to
  the trait.
- Remove `UseSpecialized(En|De)codable` traits.
- Remove blanket impls for references.
- Add `RefDecodable` trait to allow deserializing to arena-allocated
  references safely.
- Remove ability to (de)serialize HIR.
- Create proc-macros `(Ty)?(En|De)codable` to help implement these new
  traits.
2020-08-14 17:34:30 +01:00
Mazdak Farrokhzad 0cb9e36090 rustc -> rustc_middle part 2 2020-03-30 07:16:56 +02:00
Mark Rousskov 2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Michael Woerister c60b0e43c8 incr.comp.: Remove on-export crate metadata hashing. 2017-11-29 16:28:25 +01:00
Michael Woerister cb1ff24425 incr.comp.: Remove default serialization implementations for things in rustc::hir::def_id so that we get an ICE instead of silently doing the wrong thing. 2017-11-16 17:13:39 +01:00
Michael Woerister 171c020857 incr.comp.: Remove saving and loading of legacy dep-graph. 2017-10-02 15:47:11 +02:00
Santiago Pastorino cde47cef0f Remove DepNodeIndex::new is already impl for Idx 2017-09-27 15:11:22 -03:00
Michael Woerister 7f482808f9 incr.comp.: Clean up and optimize dep-graph loading. 2017-06-09 15:03:34 +02:00
Michael Woerister 3607174909 incr.comp.: Uniformly represent DepNodes as (Kind, StableHash) pairs. 2017-06-09 15:03:34 +02:00
Michael Woerister 8b36d3308e Allocate DefIndices for global crate metadata.
This allows for treating global crate metadata the same as regular metadata with regard to incr. comp.
2017-06-07 12:11:40 +02:00
Michael Woerister 12e5b699a4 incr.comp.: Make WorkProductId opaque so we don't accidentally rely on being able to reconstruct obj-file names from one. 2017-06-06 15:09:21 +02:00
Michael Woerister a3417bf302 incr.comp.: Use a more efficient encoding for the on-disk dependency graph. 2017-06-01 17:04:46 +02:00
Michael Woerister 0cbb8b58e8 incr.comp.: Use DefPathHash-based DepNodes in the serialized DepGraph and remove obsolete DefIdDirectory. 2017-05-31 16:42:52 +02:00
Michael Woerister 6a5e2a5a9e incr.comp.: Hash more pieces of crate metadata to detect changes there. 2017-05-08 12:31:26 +02:00
Michael Woerister ca2dce9b48 ICH: Replace old, transitive metadata hashing with direct hashing approach.
Instead of collecting all potential inputs to some metadata entry and
hashing those, we directly hash the values we are storing in metadata.
This is more accurate and doesn't suffer from quadratic blow-up when
many entries have the same dependencies.
2017-04-12 11:47:26 +02:00
Michael Woerister 8c00e63f3f Move Fingerprint to rustc::ich::Fingerprint. 2017-03-22 09:14:24 +01:00
Niko Matsakis b576abd2cc detect "bootstrap outputs" when serializing the dep-graph
Fixes #39828.
2017-02-22 12:02:41 -05:00
Niko Matsakis ef9ae8581f make dirty process O(dirty)
The old algorithm was O(graph)
2017-02-03 06:08:27 -05:00
Nicholas Nethercote 00e48affde Replace FnvHasher use with FxHasher.
This speeds up compilation by 3--6% across most of rustc-benchmarks.
2016-11-08 15:14:59 +11:00
Michael Woerister d07523c716 ICH: Use 128-bit Blake2b hash instead of 64-bit SipHash for incr. comp. fingerprints. 2016-10-17 12:40:25 -04:00
Michael Woerister 6a2666d5b0 ICH: Add ability to test the ICH of exported metadata items. 2016-09-23 17:23:23 -04:00
Niko Matsakis 02a47032dd use preds to serialize just what we need
This massively speeds up serialization. It also
seems to produce deterministic metadata hashes
(before I was seeing inconsistent results).

Fixes #35232.
2016-08-09 08:26:06 -04:00
Niko Matsakis cca4804251 Code to save/load the work-products map from disk
Work products are deleted if any of their inputs are dirty.
2016-07-28 12:05:04 -04:00
Niko Matsakis 3a2edd7e61 load/save hashes of metadata
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-18 10:11:36 -04:00
Niko Matsakis f89041bbe3 identify inputs of `MetaData(X)` nodes
Generate a second hash file that contains the metadata for an X node.
2016-05-18 10:11:35 -04:00
Seo Sanghyeon 7ad1900e1c Remove unused trait imports flagged by lint 2016-05-03 18:48:34 +09:00
Oliver Schneider 2fd2210b88 prevent other `encode` methods from breaking `derive(RustcEncodable)` 2016-04-12 15:41:46 +02:00
Niko Matsakis 3fb40c1d95 add code to persist graph and for unit-testing 2016-04-06 12:42:46 -04:00