summary refs log tree commit diff
path: root/src/librustc_incremental
AgeCommit message (Collapse)AuthorLines
2016-11-08Auto merge of #36843 - petrochenkov:dotstab, r=nikomatsakisbors-1/+1
Stabilize `..` in tuple (struct) patterns I'd like to nominate `..` in tuple and tuple struct patterns for stabilization. This feature is a relatively small extension to existing stable functionality and doesn't have known blockers. The feature first appeared in Rust 1.10 6 months ago. An example of use: https://github.com/rust-lang/rust/pull/36203 Closes https://github.com/rust-lang/rust/issues/33627 r? @nikomatsakis
2016-11-05Auto merge of #37427 - nnethercote:opt-IchHasher, r=michaelwoeristerbors-12/+68
Reduce the number of bytes hashed by IchHasher. IchHasher uses blake2b hashing, which is expensive, so the fewer bytes hashed the better. There are two big ways to reduce the number of bytes hashed. - Filenames in spans account for ~66% of all bytes (for builds with debuginfo). The vast majority of spans have the same filename for the start of the span and the end of the span, so hashing the filename just once in those cases is a big win. - u32 and u64 and usize values account for ~25%--33% of all bytes (for builds with debuginfo). The vast majority of these are small, i.e. fit in a u8, so shrinking them down before hashing is also a big win. This PR implements these two optimizations. I'm certain the first one is safe. I'm about 90% sure that the second one is safe. Here are measurements of the number of bytes hashed when doing debuginfo-enabled builds of stdlib and rustc-benchmarks/syntex-0.42.2-incr-clean. ``` stdlib syntex-incr ------ ----------- original 156,781,386 255,095,596 half-SawSpan 106,744,403 176,345,419 short-ints 45,890,534 118,014,227 no-SawSpan[*] 6,831,874 45,875,714 [*] don't hash the SawSpan at all. Not part of this PR, just implemented for comparison's sake. ``` For debug builds of syntex-0.42.2-incr-clean, the two changes give a 1--2% speed-up.
2016-11-03Stabilize `..` in tuple (struct) patternsVadim Petrochenkov-1/+1
2016-11-03leb128-encode integers before hashing them in IchHasher.Nicholas Nethercote-1/+37
This significantly reduces the number of bytes hashed by IchHasher.
2016-11-02Rollup merge of #37513 - michaelwoerister:hash-panic-spans, r=nikomatsakisJonathan Turner-35/+103
ICH: Hash expression spans if their source location is captured for panics. Since the location of some expressions is captured in error message constants, it has an influence on machine code and consequently we need to take them into account by the incr. comp. hash. This PR makes this happen for `+, -, *, /, %` and for array indexing -- let me know if I forgot anything. In the future we might want to change the codegen strategy for those error messages, so that they are stored in a separate object file with a stable symbol name, so that only this object file has to be regenerated when source locations change. This strategy would also eliminate unnecessary duplications due to monomorphization, as @arielb1 has pointed out on IRC. I opened https://github.com/rust-lang/rust/issues/37512, so we don't forget about this. r? @nikomatsakis
2016-11-02Don't hash span filenames twice in IchHasher.Nicholas Nethercote-11/+31
This significantly reduces the number of bytes hashed by IchHasher.
2016-11-01ICH: Hash expression spans if their source location is captured for panicsMichael Woerister-35/+103
2016-10-31Remove unused type aliasesSeo Sanghyeon-2/+0
2016-10-30Replace all uses of SHA-256 with BLAKE2b.Michael Woerister-28/+8
2016-10-29Move `CrateConfig` from `Crate` to `ParseSess`.Jeffrey Seyfried-1/+1
2016-10-24Refactor away fields `MacroDef::{use_locally, export}`.Jeffrey Seyfried-7/+5
2016-10-17ICH: Use 128-bit Blake2b hash instead of 64-bit SipHash for incr. comp. ↵Michael Woerister-37/+172
fingerprints.
2016-10-12Rollup merge of #36995 - nrc:stable, r=@nikomatsakisAlex Crichton-1/+1
stabilise ?, attributes on stmts, deprecate Reflect r? @nikomatsakis
2016-10-12Stabilise `?`Nick Cameron-1/+1
cc [`?` tracking issue](https://github.com/rust-lang/rust/issues/31436)
2016-10-07incr.comp.: Hide concrete hash algorithm used for ICHMichael Woerister-8/+64
2016-10-06ICH: Remove obsolete binding in saw_tyMathieu Borderé-4/+1
2016-10-05ICH: update saw_ty for TyBareFn; Update tests for functioninterfacesMathieu Borderé-2/+5
2016-10-05Adjustments due to naming changes in Ty_ and PatKind structsMathieu Borderé-6/+6
2016-10-05ICH - Include omitted elements in inc. comp. hash #36914Mathieu Borderé-16/+146
2016-10-04Separate Def::StructCtor/Def::VariantCtor from Def::Struct/Def::VariantVadim Petrochenkov-0/+2
2016-10-03Auto merge of #36821 - pweaver:master, r=michaelwoeristerbors-3/+14
#36821 I am just starting to learn rust. Feedback would be appreciated.
2016-10-03fixes multi-line string whitespace in librustc_incremental/persist/fs.rsPweaver (Paul Weaver)-4/+6
2016-10-03Auto merge of #36815 - alexcrichton:stabilize-1.13, r=aturonbors-11/+15
std: Stabilize and deprecate APIs for 1.13 This commit is intended to be backported to the 1.13 branch, and works with the following APIs: Stabilized * `i32::checked_abs` * `i32::wrapping_abs` * `i32::overflowing_abs` * `RefCell::try_borrow` * `RefCell::try_borrow_mut` Deprecated * `BinaryHeap::push_pop` * `BinaryHeap::replace` * `SipHash13` * `SipHash24` * `SipHasher` - use `DefaultHasher` instead in the `std::collections::hash_map` module Closes #28147 Closes #34767 Closes #35057 Closes #35070
2016-10-03std: Stabilize and deprecate APIs for 1.13Alex Crichton-11/+15
This commit is intended to be backported to the 1.13 branch, and works with the following APIs: Stabilized * `i32::checked_abs` * `i32::wrapping_abs` * `i32::overflowing_abs` * `RefCell::try_borrow` * `RefCell::try_borrow_mut` * `DefaultHasher` * `DefaultHasher::new` * `DefaultHasher::default` Deprecated * `BinaryHeap::push_pop` * `BinaryHeap::replace` * `SipHash13` * `SipHash24` * `SipHasher` - use `DefaultHasher` instead in the `std::collections::hash_map` module Closes #28147 Closes #34767 Closes #35057 Closes #35070
2016-10-01Rollup merge of #36599 - ↵Manish Goregaokar-2/+2
jonas-schievink:whats-a-pirates-favorite-data-structure, r=pnkfelix Contains a syntax-[breaking-change] as a separate commit (cc #31645).nnAlso renames slice patterns from `PatKind::Vec` to `PatKind::Slice`.
2016-09-29#36680 add warning when compliation cache fails to hard linkPweaver (Paul Weaver)-3/+12
2016-09-28Rollup merge of #36460 - mikhail-m1:35123-map3, r=nikomatsakisJonathan Turner-8/+20
map crate numbers between compilations ?r nikomatsakis issue #35123
2016-09-28Call arrays "arrays" instead of "vecs" internallyJonas Schievink-2/+2
2016-09-26incr.comp.: Fix build issue in rustc_incremental if CFG_VERSION is not set.Michael Woerister-3/+5
2016-09-26incr.comp.: Add test case for cache artifact file headers.Michael Woerister-3/+18
2016-09-26incr.comp.: Add file header to on-disk artifacts for validation.Michael Woerister-40/+156
2016-09-23ICH: Add ability to test the ICH of exported metadata items.Michael Woerister-81/+329
2016-09-23Merge branch 'master' into 35123-map3Mikhail Modin-223/+591
2016-09-20rustc_metadata: group information into less tags.Eduard Burtescu-1/+0
2016-09-20Remove librbml and the RBML-tagged auto-encoder/decoder.Eduard Burtescu-10/+6
2016-09-20rustc_metadata: go only through rustc_serialize in astencode.Eduard Burtescu-18/+14
2016-09-13Auto merge of #36041 - ahmedcharles:try, r=nrcbors-11/+11
Replace try! with ?.
2016-09-14map create numbers between compilationsMikhail Modin-8/+20
2016-09-12Auto merge of #35960 - nikomatsakis:incr-comp-krate-edges, r=michaelwoeristerbors-87/+71
fix a few errant `Krate` edges Exploring the effect of small changes on `syntex` reuse, I discovered the following sources of unnecessary edges from `Krate` r? @michaelwoerister
2016-09-11Use question_mark feature in librustc_incremental.Ahmed Charles-11/+11
2016-09-06Auto merge of #36025 - michaelwoerister:incr-comp-hash-spans, r=nikomatsakisbors-91/+482
incr. comp.: Take spans into account for ICH This PR makes the ICH (incr. comp. hash) take spans into account when debuginfo is enabled. A side-effect of this is that the SVH (which is based on the ICHs of all items in the crate) becomes sensitive to the tiniest change in a code base if debuginfo is enabled. Since we are not trying to model ABI compatibility via the SVH anymore (this is done via the crate disambiguator now), this should be not be a problem. Fixes #33888. Fixes #32753.
2016-09-06ICH: Make CachingCodemapView robustly handle invalid spans.Michael Woerister-15/+36
2016-09-06allow testing DepNode::Krate edges directlyNiko Matsakis-87/+71
2016-09-04Replace `_, _` with `..`Vadim Petrochenkov-6/+7
2016-09-03Some better support for unions through the compilerVadim Petrochenkov-0/+1
2016-09-01ICH: Adapt to changes in the MetaItem AST representation.Michael Woerister-18/+17
2016-09-01ICH: Share codemap cache between subsequent runs of the ICH visitor.Michael Woerister-86/+111
2016-09-01ICH: Fix codemap lookup caching.Michael Woerister-42/+52
2016-09-01ICH: Fix bug in hash_discriminant() and visit_vis().Michael Woerister-2/+4
2016-09-01ICH: Take CaptureClause of closure expressions into account.Michael Woerister-2/+2