summary refs log tree commit diff
path: root/src/librustc_data_structures/indexed_set.rs
AgeCommit message (Collapse)AuthorLines
2018-07-02improve commentsNiko Matsakis-0/+6
2018-06-29Rename `IdxSet::clone_from`.Nicholas Nethercote-1/+3
The current situation is something of a mess. - `IdxSetBuf` derefs to `IdxSet`. - `IdxSetBuf` implements `Clone`, and therefore has a provided `clone_from` method, which does allocation and so is expensive. - `IdxSet` has a `clone_from` method that is non-allocating and therefore cheap, but this method is not from the `Clone` trait. As a result, if you have an `IdxSetBuf` called `b`, if you call `b.clone_from(b2)` you'll get the expensive `IdxSetBuf` method, but if you call `(*b).clone_from(b2)` you'll get the cheap `IdxSetBuf` method. `liveness_of_locals()` does the former, presumably unintentionally, and therefore does lots of unnecessary allocations. Having a `clone_from` method that isn't from the `Clone` trait is a bad idea in general, so this patch renames it as `overwrite`. This avoids the unnecessary allocations in `liveness_of_locals()`, speeding up most NLL benchmarks, the best by 1.5%. It also means that calls of the form `(*b).clone_from(b2)` can be rewritten as `b.overwrite(b2)`.
2018-04-02avoid IdxSets containing garbage above the universe lengthAriel Ben-Yehuda-1/+73
This makes sure that all bits in each IdxSet between the universe length and the end of the word are all zero instead of being in an indeterminate state. This fixes a crash with RUST_LOG=rustc_mir, and is probably a good idea anyway.
2018-03-06Remove IdxSet::elemsvarkor-26/+0
2018-03-06Remove IdxSet::each_bitvarkor-33/+0
2018-03-06Remove IdxSet::reset_to_emptyvarkor-5/+0
2017-12-13Implement Borrow/BorrowMut/ToOwned relationships betweed IdxSetBuf and IdxSet.Felix S. Klock II-0/+20
2017-12-09Use Try syntax for Option in place of macros or matchMatt Brubeck-4/+2
2017-11-28incr.comp.: Make a bunch of query results encodable.Michael Woerister-0/+21
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-09-13Analyse storage liveness and preserve it during generator transformationJohn Kåre Alsaker-1/+5
2017-08-16Merge remote-tracking branch 'origin/master' into genAlex Crichton-0/+64
2017-08-16MIR based borrow check (opt-in).Felix S. Klock II-0/+30
One can either use `-Z borrowck-mir` or add the `#[rustc_mir_borrowck]` attribute to opt into MIR based borrow checking. Note that regardless of whether one opts in or not, AST-based borrow check will still run as well. The errors emitted from AST-based borrow check will include a "(Ast)" suffix in their error message, while the errors emitted from MIR-based borrow check will include a "(Mir)" suffix. post-rebase: removed check for intra-statement mutual conflict; replaced with assertion checking that at most one borrow is generated per statement. post-rebase: removed dead code: `IdxSet::pairs` and supporting stuff.
2017-08-16Move `DataFlowState::{each_bit,interpret_set}` method definitions to parent ↵Felix S. Klock II-0/+34
module. Refactored `each_bit`, which traverses a `IdxSet`, so that the bulk of its implementation lives in `rustc_data_structures`.
2017-08-09Fix iterator over indexed setsAlex Crichton-3/+3
2017-08-09Initial pass review commentsAlex Crichton-0/+39
2017-07-28Generator literal supportJohn Kåre Alsaker-0/+8
2017-03-27Fix various useless derefs and slicingsOliver Schneider-4/+4
2016-10-10Move IdxSetBuf and BitSlice to rustc_data_structuresWesley Wiser-0/+156
Resolves a FIXME