about summary refs log tree commit diff
path: root/compiler/rustc_data_structures
AgeCommit message (Collapse)AuthorLines
2023-04-06Support multithreaded mode in `OwnedSlice` testsMaybe Waffle-8/+14
2023-04-06Add basic tests for `OwnedSlice`Maybe Waffle-0/+71
2023-04-06Use `FnOnce` for `slice_owned` instead of `Fn`Maybe Waffle-2/+2
2023-04-05Add context to phantom commentNilstrieb-2/+2
2023-04-05Fix a couple missed hash constantsThom Chiovoloni-3/+3
2023-04-05Use SipHash-1-3 instead of SipHash-2-4 for StableHasherThom Chiovoloni-270/+75
2023-04-05Fix typoMaybe Waffle-1/+1
2023-04-05Yeet `owning_ref`Maybe Waffle-1971/+1
Turns out - `owning_ref` is unsound due to `Box` aliasing stuff - `rustc` doesn't need 99% of the `owning_ref` API - `rustc` can use a far simpler abstraction that is `OwnedSlice`
2023-04-05Use `OwnedSlice` instead of `owning_ref`Maybe Waffle-3/+3
2023-04-05Implement `OwnedSlice`Maybe Waffle-5/+120
2023-04-05Use elsa =1.7.1 as 1.8.0 was an accidental copy of 1.7.0Oli Scherer-1/+1
2023-04-04Use a simpler atomic operation than the `compare_exchange` hammerOli Scherer-0/+8
2023-04-04Another AppendOnlyVecOli Scherer-10/+21
2023-04-04Replace another lock with an append-only vecOli Scherer-0/+16
2023-04-04Remove a lock in favor of an AppendOnlyVecOli Scherer-2/+7
2023-04-04Add a usize-indexed append-only-vecOli Scherer-3/+35
2023-04-04Remove a fishy Clone implOli Scherer-8/+0
2023-04-02Use `&IndexSlice` instead of `&IndexVec` where possibleScott McMurray-12/+12
All the same reasons as for `[T]`: more general, less pointer chasing, and `&mut IndexSlice` emphasizes that it doesn't change *length*.
2023-03-30Rollup merge of #109758 - nnethercote:parallel-cleanups, r=cjgillotMichael Goulet-28/+40
Parallel compiler cleanups A few small improvements I found while looking closely at this code. r? `@cjgillot` cc `@Zoxc,` `@SparrowLii`
2023-03-30`CacheAligned` and `Sharded` don't need to derive `Clone`.Nicholas Nethercote-2/+1
2023-03-30Remove `RwLock::clone_guard`.Nicholas Nethercote-12/+0
It's unused.
2023-03-30Improve the `rustc_data_structures::sync` module doc comment.Nicholas Nethercote-14/+39
Also, `MTRef<'a, T>` is a typedef for a reference to a `T`, but in practice it's only used (and useful) in combination with `MTLock`, i.e. `MTRef<'a, MTLock<T>>`. So this commit changes it to be a typedef for a reference to an `MTLock<T>`, and renames it as `MTLockRef`. I think this clarifies things, because I found `MTRef` quite puzzling at first.
2023-03-29Stabilize a portion of 'once_cell'Trevor Gross-1/+1
Move items not part of this stabilization to 'lazy_cell' or 'once_cell_try'
2023-03-25Update indexmap and rayon cratesJohn Kåre Alsaker-4/+4
2023-03-23Rollup merge of #107718 - Zoxc:z-time, r=nnethercoteMatthias Krüger-20/+65
Add `-Z time-passes-format` to allow specifying a JSON output for `-Z time-passes` This adds back the `-Z time` option as that is useful for [my rustc benchmark tool](https://github.com/Zoxc/rcb), reverting https://github.com/rust-lang/rust/pull/102725. It now uses nanoseconds and bytes as the units so it is renamed to `time-precise`.
2023-03-23Rollup merge of #109280 - compiler-errors:no-vec-map, r=Mark-SimulacrumDylan DPC-241/+0
Remove `VecMap` Not sure what the use of this data structure is over just using `FxIndexMap` or a `Vec`. r? ```@ghost```
2023-03-21Remove `unique` and move `VerboseTimingGuard` fields into a new structJohn Kåre Alsaker-31/+29
2023-03-21Add `-Z time-passes-format` to allow specifying a JSON output for `-Z ↵John Kåre Alsaker-19/+66
time-passes`
2023-03-20migrate compiler, bootstrap, and compiletest to windows-rsAndy Russell-46/+67
2023-03-17Remove VecMapMichael Goulet-241/+0
2023-03-17Fast path that skips over unchanged obligations in process_obligationsThe 8472-4/+17
- only borrow the refcell once per loop - avoid complex matches to reduce branch paths in the hot loop - use a by-ref fast path that avoids mutations at the expense of having false negatives
2023-03-08Rollup merge of #108887 - nnethercote:rename-MapInPlace, r=lqdMatthias Krüger-12/+5
Rename `MapInPlace` as `FlatMapInPlace`. After removing the `map_in_place` method, which isn't much use because modifying every element in a collection such as a `Vec` can be done trivially with iteration. r? ``@lqd``
2023-03-08Auto merge of #108312 - michaelwoerister:hash-set-not-hash-stable, r=eholkbors-13/+36
Do not implement HashStable for HashSet (MCP 533) This PR removes all occurrences of `HashSet` in query results, replacing it either with `FxIndexSet` or with `UnordSet`, and then removes the `HashStable` implementation of `HashSet`. This is part of implementing [MCP 533](https://github.com/rust-lang/compiler-team/issues/533), that is, removing the `HashStable` implementations of all collection types with unstable iteration order. The changes are mostly mechanical. The only place where additional sorting is happening is in Miri's override implementation of the `exported_symbols` query.
2023-03-08Rename `MapInPlace` as `FlatMapInPlace`.Nicholas Nethercote-12/+5
After removing the `map_in_place` method, which isn't much use because modifying every element in a collection such as a `Vec` can be done trivially with iteration.
2023-03-03Auto merge of #108709 - matthiaskrgr:rollup-j2tjbyx, r=matthiaskrgrbors-0/+2
Rollup of 8 pull requests Successful merges: - #104549 (add -Zexport-executable-symbols to unstable book) - #108292 (Label opaque type for 'captures lifetime' error message) - #108540 (Add `Atomic*::from_ptr`) - #108634 (Add link to component dashboard) - #108647 (Remove dead pgo.sh file) - #108678 (Use `Option::as_slice` where applicable) - #108681 (Improve comments in `needs_process_obligation`.) - #108688 (Match unmatched backticks in library/) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-03-03Rollup merge of #108681 - nnethercote:needs_process_obligation-comments, r=lqdMatthias Krüger-0/+2
Improve comments in `needs_process_obligation`. And a couple of other places. r? `@lqd`
2023-03-03Match end user facing unmatched backticks in compiler/est31-1/+1
2023-03-03Improve comments in `needs_process_obligation`.Nicholas Nethercote-0/+2
And a couple of other places.
2023-03-01Do not implement HashStable for HashSet.Michael Woerister-12/+4
2023-03-01Use UnordSet instead of FxHashSet for names_imported_by_glob_use query.Michael Woerister-1/+32
2023-02-28Add contains_key to SortedIndexMultiMapJesse Bakker-0/+9
2023-02-24Upgrade `ena` to 0.14.1.Nicholas Nethercote-1/+1
To get the small performance improvements from https://github.com/rust-lang/ena/pull/43.
2023-02-22Auto merge of #108300 - oli-obk:elsa, r=eholkbors-0/+46
Use a lock-free datastructure for source_span follow up to the perf regression in https://github.com/rust-lang/rust/pull/105462 The main regression is likely the CStore, but let's evaluate the perf impact of this on its own
2023-02-21Rollup merge of #104239 - b-naber:sccs-info, r=jackh726Matthias Krüger-1/+17
Better debug logs for borrowck constraint graph It's really cumbersome to work with `RegionVar`s when trying to debug borrowck code or when trying to understand how the borrowchecker works. This PR collects some region information (behind `cfg(debug_assertions)`) for created `RegionVar`s (NLL region vars, this PR doesn't touch canonicalization) and prints the nodes and edges of the strongly connected constraints graph using representatives that use that region information (either lifetime names, locations in MIR or spans).
2023-02-21address reviewb-naber-4/+20
2023-02-21Use a lock-free datastructure for `source_span`Oli Scherer-0/+46
2023-02-21Upgrade `thin-vec` from 0.2.9 to 0.2.12.Nicholas Nethercote-1/+1
Because 0.2.10 added supports for `ThinVec::splice`, and 0.2.12 is the latest release.
2023-02-19sccs infob-naber-5/+5
2023-02-16`if $c:expr { Some($r:expr) } else { None }` =>> `$c.then(|| $r)`Maybe Waffle-7/+4
2023-02-14Refactor refcounted structural_impls via functorsAlan Egerton-1/+51