summary refs log tree commit diff
path: root/src/librustc_data_structures
AgeCommit message (Collapse)AuthorLines
2017-11-16IndexVec: add `'_` to make clear where borrowing is happeningNiko Matsakis-2/+3
2017-11-16make `RegionVid` implement `Idx` and use `IndexVec`Niko Matsakis-0/+5
2017-11-06Auto merge of #45668 - nikomatsakis:nll-free-region, r=arielb1bors-17/+23
extend NLL with preliminary support for free regions on functions This PR extends https://github.com/rust-lang/rust/pull/45538 with support for free regions. This is pretty preliminary and will no doubt want to change in various ways, particularly as we add support for closures, but it's enough to get the basic idea in place: - We now create specific regions to represent each named lifetime declared on the function. - Region values can contain references to these regions (represented for now as a `BTreeSet<RegionIndex>`). - If we wind up trying to infer that `'a: 'b` must hold, but no such relationship was declared, we report an error. It also does a number of drive-by refactorings. r? @arielb1 cc @spastorino
2017-11-04Make DEBUG_FORMAT = custom workSantiago Pastorino-17/+17
Fixes #45763, ht by @durka
2017-11-02add/fix various comments to `BitMatrix`Niko Matsakis-17/+23
Notably, the (hitherto unused) `less_than` method was not at all what it purported to be. It in fact computes the opposite.
2017-11-01newindex_type macro: make index private by default and allow pub through configPaul Daniel Faria-48/+53
2017-11-01newtype_index: Support simpler serializable override, custom derive, and fix ↵Paul Daniel Faria-115/+202
mir_opt tests
2017-11-01Clean up macro argument matches so they satisfy tidy checksPaul Daniel Faria-14/+51
2017-11-01Add derive and doc comment capabilities to newtype_index macroPaul Daniel Faria-30/+106
2017-10-31change region display to `'_#Nr`, update the `newtype_index!` macroNiko Matsakis-16/+19
The macro now takes a format string. It no longer defaults to using the type name. Didn't seem worth going through contortions to maintain. I also changed most of the debug formats to be `foo[N]` instead of `fooN`.
2017-10-31introduce liveness constraints into NLL codeNiko Matsakis-2/+10
And do a bunch of gratuitious refactoring that I did not bother to separate into nice commits.
2017-10-26Update some comments about StableHasher.Michael Woerister-20/+6
2017-10-25Fix 32 vs 64 bit platform instability in StableHasher.Michael Woerister-4/+10
2017-10-20Auto merge of #45319 - michaelwoerister:use-128bit-siphash, r=nikomatsakisbors-57/+574
incr.comp.: Use 128bit SipHash for fingerprinting This PR switches incr. comp. result fingerprinting from 128 bit BLAKE2 to 128 bit SipHash. When we started using BLAKE2 for fingerprinting, the 128 bit version of SipHash was still experimental. Now that it isn't anymore we should be able to get a nice performance boost without significantly increasing collision probability. ~~I'm going to start a try-build for this, so we can gauge the performance impact before merging (hence the `WIP` in the title).~~ EDIT: Performance improvements look as expected. Tests seem to be passing. Fixes #41215.
2017-10-17Generate FirstStatementIndex using newtype_index macroSantiago Pastorino-2/+2
2017-10-16Make debuginfo::UniqueTypeId use 128 bit hash.Michael Woerister-31/+0
2017-10-16Use SipHasher128 in StableHasher.Michael Woerister-53/+67
2017-10-16rustc_data_structures: Add implementation of 128 bit SipHash.Michael Woerister-0/+534
2017-10-13Rollup merge of #45110 - Nashenas88:master, r=arielb1kennytm-17/+58
Improve newtype_index macro to handle description and constants consistently
2017-10-11Split lines longer than 100 columnsPaul Faria-5/+10
2017-10-11Move const qualifier from brackets to constant values and remove comma from ↵Paul Faria-46/+35
after identifier
2017-10-10Rollup merge of #44775 - MaloJaffre:debug-struct, r=sfacklerkennytm-13/+2
Refactor to use `debug_struct` in several Debug impls Also use `pad` and derive `Debug` for `Edge`. Fixes #44771.
2017-10-09Refactor to use `debug_struct` in several Debug implsMalo Jaffré-13/+2
Fixes #44771.
2017-10-08Improve newtype_index macro to handle description and constants consistentlyPaul Faria-20/+67
2017-10-04Generate ScopeId using newtype_index macroSantiago Pastorino-1/+2
2017-10-04Generate DepNodeIndexNew using newtype_index macroSantiago Pastorino-0/+7
2017-10-04Make newtype_index get debug_name using reflectionSantiago Pastorino-0/+4
2017-10-04Make newtype_index macro use full path to resolve constantsSantiago Pastorino-3/+3
2017-10-04Move newtype_index to rustc_data_structuresSantiago Pastorino-0/+25
2017-09-24Point at parameter type on E0301Esteban Küber-4/+4
On "the parameter type `T` may not live long enough" error, point to the parameter type suggesting lifetime bindings: ``` error[E0310]: the parameter type `T` may not live long enough --> $DIR/lifetime-doesnt-live-long-enough.rs:28:5 | 27 | struct Foo<T> { | - help: consider adding an explicit lifetime bound `T: 'static`... 28 | foo: &'static T | ^^^^^^^^^^^^^^^ | note: ...so that the reference type `&'static T` does not outlive the data it points at --> $DIR/lifetime-doesnt-live-long-enough.rs:28:5 | 28 | foo: &'static T | ^^^^^^^^^^^^^^^ ```
2017-09-20incr.comp.: Add some comments.Michael Woerister-1/+3
2017-09-20incr.comp.: Make sure traits_in_scope results are hashed in a stable way.Michael Woerister-0/+32
2017-09-18incr.comp.: Fix rebase fallout.Michael Woerister-0/+8
2017-09-18incr.comp.: Use StableHash impls instead of functions for hashing most maps.Michael Woerister-8/+42
2017-09-18Fix issues uncovered by rebasing:Michael Woerister-22/+65
- 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-18incr.comp.: Move result fingerprinting to DepGraph::with_task().Michael Woerister-3/+25
This makes sure that we don't introduce strange cases where we have nodes outside the query system that could break red/green tracking and it will allow to keep red/green neatly encapsulated within the DepGraph implementation.
2017-09-18incr.comp.: Compute hashes of all query results.Michael Woerister-1/+27
2017-09-14rustc: Preallocate when building the dep graphAlex Crichton-0/+14
This commit alters the `query` function in the dep graph module to preallocate memory using `with_capacity` instead of relying on automatic growth. Discovered in #44576 it was found that for the syntex_syntax clean incremental benchmark the peak memory usage was found when the dep graph was being saved, particularly the `DepGraphQuery` data structure itself. PRs like #44142 which add more queries end up just making this much larger! I didn't see an immediately obvious way to reduce the size of the `DepGraphQuery` object, but it turns out that `with_capacity` helps quite a bit! Locally 831 MB was used [before] this commit, and 770 MB is in use at the peak of the compiler [after] this commit. That's a nice 7.5% improvement! This won't quite make up for the losses in #44142 but I figured it's a good start. [before]: https://gist.github.com/alexcrichton/2d2b9c7a65503761925c5a0bcfeb0d1e [before]: https://gist.github.com/alexcrichton/6da51f2a6184bfb81694cc44f06deb5b
2017-09-13Analyse storage liveness and preserve it during generator transformationJohn Kåre Alsaker-1/+10
2017-09-02stabilize mem::discriminant (closes #24263)Alex Burka-1/+0
2017-08-29Auto merge of #44059 - oli-obk:ok_suggestion, r=nikomatsakisbors-10/+10
Suggest `Ok(())` when encountering `Result::<(), E>::Ok()`
2017-08-28Suggest `Ok(())` when encountering `Ok()`Oliver Schneider-10/+10
2017-08-28Merge branch 'master' of https://github.com/rust-lang/rust into genJohn Kåre Alsaker-3/+0
2017-08-25*: remove crate_{name,type} attributesTamir Duberstein-3/+0
Fixes #41701.
2017-08-21Merge remote-tracking branch 'origin/master' into genAlex Crichton-643/+6
2017-08-19rustc: Remove some dead codeVadim Petrochenkov-643/+6
2017-08-17Merge remote-tracking branch 'origin/master' into genAlex Crichton-3/+3
2017-08-17Rollup merge of #43891 - Fourchaux:master, r=steveklabnikCorey Farwell-3/+3
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-16Merge remote-tracking branch 'origin/master' into genAlex Crichton-0/+64
2017-08-16Merge remote-tracking branch 'origin/master' into genAlex Crichton-32/+32