rust/src/librustc_metadata
Jonas Schievink 2eeca3ccd2 Make metadata encoding deterministic
`ty::Predicate` was being used as a key for a hash map, but its hash
implementation indirectly hashed addresses, which vary between each
compiler run. This is fixed by sorting predicates by their ID before
encoding them.

In my tests, rustc is now able to produce deterministic results when
compiling libcore and libstd.

I've beefed up `run-make/reproducible-build` to compare the produced
artifacts bit-by-bit. This doesn't catch everything, but should be a
good start.

cc #34902
2016-08-27 15:20:45 +02:00
..
astencode.rs rustc: pass ty::Region behind an interned 'tcx reference. 2016-08-27 01:15:06 +03:00
Cargo.toml refactor rustc_metadata to use CamelCase names and IndexVec 2016-06-28 23:41:09 +03:00
common.rs rustc: reduce Substs and Generics to a simple immutable API. 2016-08-17 05:50:57 +03:00
creader.rs Update E0445 and E0454 to new error format 2016-08-24 17:43:51 +05:30
csearch.rs rustc: use Vec<Kind> in Substs, where Kind is a &TyS | &Region tagged pointer. 2016-08-27 01:15:07 +03:00
cstore.rs Move caching of HIR-inlining into CStore in order to avoid duplicating inlined HIR. 2016-08-01 04:09:12 -04:00
decoder.rs Auto merge of #36030 - Manishearth:rollup, r=Manishearth 2016-08-27 03:07:48 -07:00
def_key.rs rustc: add TyAnon (impl Trait) to the typesystem. 2016-08-12 06:43:34 +03:00
diagnostics.rs Update block codes' flags 2016-08-19 16:44:29 +02:00
encoder.rs Make metadata encoding deterministic 2016-08-27 15:20:45 +02:00
index.rs when encoding, push MetaData(foo) task on stack 2016-05-18 10:11:35 -04:00
index_builder.rs remove usize: DepGraphRead and add Untracked 2016-08-17 15:21:59 -04:00
lib.rs move CrateIndex into its own module 2016-08-17 07:39:11 -04:00
loader.rs Use FnvHashMap in more places 2016-08-27 15:20:45 +02:00
macro_import.rs Use FnvHashMap in more places 2016-08-27 15:20:45 +02:00
macros.rs split the metadata code into rustc_metadata 2015-11-26 18:22:40 +02:00
tls_context.rs rustc: reduce Substs and Generics to a simple immutable API. 2016-08-17 05:50:57 +03:00
tydecode.rs rustc: use Vec<Kind> in Substs, where Kind is a &TyS | &Region tagged pointer. 2016-08-27 01:15:07 +03:00
tyencode.rs rustc: use Vec<Kind> in Substs, where Kind is a &TyS | &Region tagged pointer. 2016-08-27 01:15:07 +03:00