about summary refs log tree commit diff
path: root/src/librustc_data_structures/lib.rs
AgeCommit message (Collapse)AuthorLines
2018-12-23Rollup merge of #57034 - Zoxc:query-perf8, r=michaelwoeristerkennytm-0/+2
Inline tweaks r? @michaelwoerister
2018-12-21Inline tweaksJohn Kåre Alsaker-0/+2
2018-12-19Stabilize Vec(Deque)::resize_withScott McMurray-1/+0
Closes #41758
2018-12-17Tweak query code for performanceJohn Kåre Alsaker-0/+22
2018-12-03data_structures: remove tuple_sliceljedrz-1/+0
2018-11-29Use raw_entry for more efficient interningJohn Kåre Alsaker-0/+2
2018-11-13Move `static_assert!` into librustc_data_structures.Nicholas Nethercote-0/+1
This means it can be used by more crates.
2018-10-31Bump nightly to 1.32.0Alex Crichton-1/+0
* Also update the bootstrap compiler * Update cargo to 1.32.0 * Clean out stage0 annotations
2018-10-19Stabilize impl_header_lifetime_elision in 2015Scott McMurray-1/+1
It's already stable in 2018; this finishes the stabilization.
2018-10-14Added graphviz visualization for obligation forests.Diogo Sousa-0/+1
This can be a big help when debugging the trait resolver.
2018-09-27Bump to 1.31.0 and bootstrap from 1.30 betaJosh Stone-2/+1
2018-09-26Remove OneVectorljedrz-2/+0
2018-09-18Remove `array_vec.rs`.Nicholas Nethercote-1/+0
`SparseBitSet` is the only remaining user of `ArrayVec`. This commit switches it to using `SmallVec`, and removes `array_vec.rs`. Why the switch? Although `SparseBitSet` is size-limited and doesn't need the ability to spill to the heap, `SmallVec` has many more features than `ArrayVec`. In particular, it's now possible to keep `SparseBitSet`'s elements in sorted order, which gives in-order iteration, which is a requirement for the next commit.
2018-09-18Merge indexed_set.rs into bitvec.rs, and rename it bit_set.rs.Nicholas Nethercote-2/+1
Currently we have two files implementing bitsets (and 2D bit matrices). This commit combines them into one, taking the best features from each. This involves renaming a lot of things. The high level changes are as follows. - bitvec.rs --> bit_set.rs - indexed_set.rs --> (removed) - BitArray + IdxSet --> BitSet (merged, see below) - BitVector --> GrowableBitSet - {,Sparse,Hybrid}IdxSet --> {,Sparse,Hybrid}BitSet - BitMatrix --> BitMatrix - SparseBitMatrix --> SparseBitMatrix The changes within the bitset types themselves are as follows. ``` OLD OLD NEW BitArray<C> IdxSet<T> BitSet<T> -------- ------ ------ grow - grow new - (remove) new_empty new_empty new_empty new_filled new_filled new_filled - to_hybrid to_hybrid clear clear clear set_up_to set_up_to set_up_to clear_above - clear_above count - count contains(T) contains(&T) contains(T) contains_all - superset is_empty - is_empty insert(T) add(&T) insert(T) insert_all - insert_all() remove(T) remove(&T) remove(T) words words words words_mut words_mut words_mut - overwrite overwrite merge union union - subtract subtract - intersect intersect iter iter iter ``` In general, when choosing names I went with: - names that are more obvious (e.g. `BitSet` over `IdxSet`). - names that are more like the Rust libraries (e.g. `T` over `C`, `insert` over `add`); - names that are more set-like (e.g. `union` over `merge`, `superset` over `contains_all`, `domain_size` over `num_bits`). Also, using `T` for index arguments seems more sensible than `&T` -- even though the latter is standard in Rust collection types -- because indices are always copyable. It also results in fewer `&` and `*` sigils in practice.
2018-09-15Auto merge of #54177 - nnethercote:streamline-bit-stuff, r=Mark-Simulacrumbors-1/+0
Remove bitslice.rs As the comment in `bitslice.rs` says: > FIXME: merge with `bitvec`
2018-09-13Remove bitslice.rs.Nicholas Nethercote-1/+0
This requires the following changes. - It moves parts of bitslice.rs into bitvec.rs: `bitwise()`, `BitwiseOperator`, `bits_to_string()`. - It changes `IdxSet` to just be a wrapper around `BitArray`. - It changes `BitArray` and `BitVec` to use `usize` words instead of `u128` words. (`BitSlice` and `IdxSet` already use `usize`.) Local profiling showed `usize` was better. - It moves some operations from `IdxSet` into `BitArray`: `new_filled()`, `clear()`, `set_up_to()`, `trim_to()` (renamed `clear_above()`), `words()` and `words_mut()`, `encode()` and `decode(). The `IdxSet` operations now just call the `BitArray` operations. - It replaces `BitArray`'s iterator implementation with `IdxSet`'s, because the latter is more concise. It also removes the buggy `size_hint` function from `BitArray`'s iterator, which counted the number of *words* rather than the number of *bits*. `IdxSet`'s iterator is now just a thin wrapper around `BitArray`'s iterator. - It moves some unit tests from `indexed_set.rs` to `bitvec.rs`.
2018-09-11stabalize infer outlives requirements (RFC 2093).toidiu-1/+0
Co-authored-by: nikomatsakis
2018-08-29Remove `AccumulateVec` and its uses.Nicholas Nethercote-1/+0
It's basically just a less capable version of `SmallVec`.
2018-08-28Auto merge of #53314 - nikomatsakis:nll-invert-liveness, r=pnkfelixbors-0/+3
NLL: experiment with inverting liveness I got inspired to see what would happen here. Fixes #52460 r? @pnkfelix
2018-08-27enable feature `impl_header_lifetime_elision`Niko Matsakis-0/+1
2018-08-27implement liveness tracing, remove old liveness systemNiko Matsakis-0/+2
2018-08-24check that adding infer-outlives requirement to all crates worksNiko Matsakis-0/+1
2018-08-23Use optimized SmallVec implementationIgor Gutorov-0/+2
2018-08-19Stabilize macro_vis_matcherJakub Kozlowski-1/+1
2018-08-13Move SmallVec and ThinVec out of libsyntaxljedrz-0/+1
2018-08-13Auto merge of #53161 - michaelwoerister:cstrings, r=wesleywiserbors-0/+2
Avoid many allocations for CStrings during codegen. Giving in to my irrational fear of dynamic allocations. Let's see what perf says to this.
2018-08-12Rollup merge of #53230 - memoryruins:nll_bootstrap_4, r=nikomatsakisGuillaume Gomez-0/+1
[nll] enable feature(nll) on various crates for bootstrap: part 4 #53172 r? @nikomatsakis
2018-08-10Introduce SmallCStr and use it where applicable.Michael Woerister-0/+1
2018-08-10Introduce const_cstr!() macro and use it where applicable.Michael Woerister-0/+1
2018-08-09Move Fingerprint to data structuresMark Rousskov-1/+2
2018-08-09Move SVH structure to data structuresMark Rousskov-0/+2
2018-08-09[nll] librustc_data_structures: enable feature(nll) for bootstrapmemoryruins-0/+1
2018-08-05Remove unnecessary feature attributes that sneaked invarkor-1/+0
2018-07-25Deny bare_trait_objects globallyTatsuyuki Ishi-2/+0
2018-07-20data_structures: Add a reference wrapper for pointer-indexed maps/setsVadim Petrochenkov-10/+11
Use `ptr::eq` for comparing pointers
2018-07-16Generate region values directly to reduce memory usage.David Wood-0/+1
Also modify `SparseBitMatrix` so that it does not require knowing the dimensions in advance, but instead grows on demand.
2018-07-13Auto merge of #51987 - nikomatsakis:nll-region-infer-scc, r=pnkfelixbors-2/+1
nll experiment: compute SCCs instead of iterative region solving This is an attempt to speed up region solving by replacing the current iterative dataflow with a SCC computation. The idea is to detect cycles (SCCs) amongst region constraints and then compute just one value per cycle. The graph with all cycles removed is of course a DAG, so we can then solve constraints "bottom up" once the liveness values are known. I kinda ran out of time this morning so the last commit is a bit sloppy but I wanted to get this posted, let travis run on it, and maybe do a perf run, before I clean it up.
2018-07-12rename `control_flow_graph` to `graph`Niko Matsakis-1/+1
2018-07-12rename `graph` to `control_flow_graph::implementation`Niko Matsakis-1/+0
2018-07-11Deny bare trait objects in in src/librustc_data_structuresljedrz-0/+2
2018-07-01create a new `WorkQueue` data structureNiko Matsakis-0/+1
2018-06-06Add and use OnDrop::disableJohn Kåre Alsaker-0/+8
2018-06-01Add a WorkerLocal abstractionJohn Kåre Alsaker-0/+1
2018-06-01Add TinyList data structure.Michael Woerister-0/+1
2018-05-24get `rustc_hash` from external crateNiko Matsakis-0/+1
2018-05-22Add SortedMap to rustc_data_structures.Michael Woerister-0/+1
2018-05-17Rollup merge of #50808 - SimonSapin:nonzero, r=alexcrichtonkennytm-1/+0
Stabilize num::NonZeroU* Tracking issue: https://github.com/rust-lang/rust/issues/49137
2018-05-16Stabilize num::NonZeroU*Simon Sapin-1/+0
Tracking issue: https://github.com/rust-lang/rust/issues/49137
2018-05-14Remove LazyBTreeMap.Nicholas Nethercote-1/+0
It was introduced in #50240 to avoid an allocation when creating a new BTreeMap, which gave some speed-ups. But then #50352 made that the default behaviour for BTreeMap, so LazyBTreeMap is no longer necessary.
2018-05-13Add parallel abstractionsJohn Kåre Alsaker-0/+1