summary refs log tree commit diff
path: root/src/librustc_data_structures/lib.rs
AgeCommit message (Collapse)AuthorLines
2020-02-04Remove unused feature gates from librustc_data_structuresbjorn3-3/+0
2020-01-24[self-profiler] Use `ThreadId::as_u64()` instead of transmuteWesley Wiser-0/+1
2020-01-11use winapi for non-stdlib Windows bindingsAndy Russell-3/+0
2020-01-09{rustc::util -> rustc_data_structures}::capturesMazdak Farrokhzad-0/+1
2020-01-05Use self profile infrastructure for -Z time and -Z time-passesJohn Kåre Alsaker-0/+3
2019-12-25Store callbacks in global staticsMark Rousskov-0/+2
The callbacks have precisely two states: the default, and the one present throughout almost all of the rustc run (the filled in value which has access to TyCtxt). We used to store this as a thread local, and reset it on each thread to the non-default value. But this is somewhat wasteful, since there is no reason to set it globally -- while the callbacks themselves access TLS, they do not do so in a manner that fails in when we do not have TLS to work with.
2019-12-22Format the worldMark Rousskov-33/+31
2019-12-17Revert "Auto merge of #67362 - Mark-Simulacrum:par-4-default, r=alexcrichton"Mark Rousskov-1/+0
This reverts commit 3ed3b8bb7b100afecf7d5f52eafbb70fec27f537, reversing changes made to 99b89533d4cdf7682ea4054ad0ee36c351d05df1. We will reland a similar patch at a future date but for now we should get a nightly released in a few hours with the parallel patch, so this should be reverted to make sure that the next nightly is not parallel-enabled.
2019-12-17Move AtomicU64 usage to AtomicUsizeMark Rousskov-0/+1
2019-11-12Move self-profile infrastructure to data structuresMark Rousskov-0/+1
The single dependency on queries (QueryName) can be fairly easily abstracted via a trait and this further decouples Session from librustc (the primary goal).
2019-09-29remove indexed_vec re-export from rustc_data_structurescsmoe-1/+0
2019-09-29remove bit_set re-export from rustc_data_structurescsmoe-1/+1
2019-09-29move bit_set into rustc_indexcsmoe-2/+1
2019-09-29move index_vec into rustc_indexcsmoe-1/+1
2019-09-28data_structures: Add deterministic FxHashMap and FxHashSet wrappersShivani Bhardwaj-0/+2
StableMap A wrapper for FxHashMap that allows to insert, remove, get and get_mut but no iteration support. StableSet A wrapper for FxHashSet that allows to insert, remove, get and create a sorted vector from a hashset but no iteration support.
2019-08-14Handle cfg(bootstrap) throughoutMark Rousskov-1/+1
2019-08-08Use associated_type_bounds where applicable - closes #61738Ilija Tovilo-0/+1
2019-07-31Remove derives `Encodable`/`Decodable` and unstabilize attribute `#[bench]`Vadim Petrochenkov-1/+1
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-1/+0
rustbuild Remove some random unnecessary lint `allow`s
2019-07-23cleanup: Remove `extern crate serialize as rustc_serialize`sVadim Petrochenkov-2/+0
2019-07-19Use sharded maps for interningJohn Kåre Alsaker-1/+1
2019-07-07rustc: Remove `dylib` crate type from most rustc cratesAlex Crichton-4/+0
Now that procedural macros no longer link transitively to libsyntax, this shouldn't be needed any more! This commit is an experiment in removing all dynamic libraries from rustc except for librustc_driver itself. Let's see how far we can get with that!
2019-07-05Rollup merge of #61545 - flip1995:internal_lints, r=oli-obkMazdak Farrokhzad-0/+1
Implement another internal lints cc #49509 This adds ~~two~~ one internal lint~~s~~: 1. LINT_PASS_IMPL_WITHOUT_MACRO: Make sure, that the `{declare,impl}_lint_pass` macro is used to implement lint passes. cc #59669 2. ~~USAGE_OF_TYCTXT_AND_SPAN_ARGS: item 2 on the list in #49509~~ ~~With 2. I wasn't sure, if this lint should be applied everywhere. That means a careful review of 0955835 would be great. Also 73fb9b4 allows this lint on some functions. Should I also apply this lint there?~~ TODO (not directly relevant for review): - [ ] https://github.com/rust-lang/rust/pull/59316#discussion_r280186517 (not sure yet, if this works or how to query for `rustc_private`, since it's not in [`Features`](https://doc.rust-lang.org/nightly/nightly-rustc/syntax/feature_gate/struct.Features.html) :thinking: cc @eddyb) - [x] https://github.com/rust-lang/rust/pull/61735#discussion_r292389870 - [x] Check explicitly for the `{declare,impl}_lint_pass!` macros r? @oli-obk
2019-07-02just create a binary search slice helper fnNiko Matsakis-1/+1
2019-07-02add a `VecMap` data structureNiko Matsakis-0/+1
2019-06-24Turn internal lints into tool lintsflip1995-1/+1
2019-06-24Allow default_hash_types in some cratesflip1995-0/+1
2019-03-10Make the rustc driver and interface demand drivenJohn Kåre Alsaker-0/+3
2019-03-01Add support for using a jobserver with RayonJohn Kåre Alsaker-0/+1
2019-02-15Always emit an error for a query cycleJohn Kåre Alsaker-0/+6
2019-02-09librustc_data_structures => 2018Taiki Endo-10/+3
2019-02-07Remove images' url to make it work even without internet connectionGuillaume Gomez-3/+1
2018-12-29Replace LockCell with atomic typesJohn Kåre Alsaker-0/+1
2018-12-25Remove licensesMark Rousskov-10/+0
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`.