about summary refs log tree commit diff
path: root/src/librustc_data_structures/lib.rs
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-126/+0
2020-08-19Add tagged pointer impl to data structuresMark Rousskov-0/+4
2020-08-15Merge branch 'master' into feature/incorporate-tracingpawanbisht62-0/+3
2020-08-14Rework `rustc_serialize`Matthew Jasper-0/+2
- Move the type parameter from `encode` and `decode` methods to the trait. - Remove `UseSpecialized(En|De)codable` traits. - Remove blanket impls for references. - Add `RefDecodable` trait to allow deserializing to arena-allocated references safely. - Remove ability to (de)serialize HIR. - Create proc-macros `(Ty)?(En|De)codable` to help implement these new traits.
2020-08-09Avoid deleting temporary files on errorMark Rousskov-0/+1
Previously if the compiler error'd, fatally, then temporary directories which should be preserved by -Csave-temps would be deleted due to fatal compiler errors being implemented as panics.
2020-08-06Incorporate tracing cratebishtpawan-1/+1
2020-05-29Add Extend::{extend_one,extend_reserve}Josh Stone-0/+1
This adds new optional methods on `Extend`: `extend_one` add a single element to the collection, and `extend_reserve` pre-allocates space for the predicted number of incoming elements. These are used in `Iterator` for `partition` and `unzip` as they shuffle elements one-at-a-time into their respective collections.
2020-05-10use min_specialization for some rustc crates where it requires no changesRalf Jung-1/+1
2020-05-07Auto merge of #55617 - oli-obk:stacker, r=nagisa,oli-obkbors-0/+1
Prevent compiler stack overflow for deeply recursive code I was unable to write a test that 1. runs in under 1s 2. overflows on my machine without this patch The following reproduces the issue, but I don't think it's sensible to include a test that takes 30s to compile. We can now easily squash newly appearing overflows by the strategic insertion of calls to `ensure_sufficient_stack`. ```rust // compile-pass #![recursion_limit="1000000"] macro_rules! chain { (EE $e:expr) => {$e.sin()}; (RECURSE $i:ident $e:expr) => {chain!($i chain!($i chain!($i chain!($i $e))))}; (Z $e:expr) => {chain!(RECURSE EE $e)}; (Y $e:expr) => {chain!(RECURSE Z $e)}; (X $e:expr) => {chain!(RECURSE Y $e)}; (A $e:expr) => {chain!(RECURSE X $e)}; (B $e:expr) => {chain!(RECURSE A $e)}; (C $e:expr) => {chain!(RECURSE B $e)}; // causes overflow on x86_64 linux // less than 1 second until overflow on test machine // after overflow has been fixed, takes 30s to compile :/ (D $e:expr) => {chain!(RECURSE C $e)}; (E $e:expr) => {chain!(RECURSE D $e)}; (F $e:expr) => {chain!(RECURSE E $e)}; // more than 10 seconds (G $e:expr) => {chain!(RECURSE F $e)}; (H $e:expr) => {chain!(RECURSE G $e)}; (I $e:expr) => {chain!(RECURSE H $e)}; (J $e:expr) => {chain!(RECURSE I $e)}; (K $e:expr) => {chain!(RECURSE J $e)}; (L $e:expr) => {chain!(RECURSE L $e)}; } fn main() { let x = chain!(D 42.0_f32); } ``` fixes #55471 fixes #41884 fixes #40161 fixes #34844 fixes #32594 cc @alexcrichton @rust-lang/compiler I looked at all code that checks the recursion limit and inserted stack growth calls where appropriate.
2020-05-05perf: Reduce snapshot/rollback overheadMarkus Westerlind-0/+1
By merging the undo_log of all structures part of the snapshot the cost of creating a snapshot becomes much cheaper. Since snapshots with no or few changes are so frequent this ends up mattering more than the slight overhead of dispatching on the variants that map to each field.
2020-05-02Move ensure_sufficient_stack to data_structuresSimonas Kazlauskas-0/+1
We anticipate this to have uses in all sorts of crates and keeping it in `rustc_data_structures` enables access to it from more locations without necessarily pulling in the large `librustc` crate.
2020-04-20Remove unused ToHex/FromHex traitShotaro Yamada-2/+0
2020-04-18Move `MapInPlace` to rustc_data_structuresYuki Okushi-0/+1
2020-04-11Depend on libc from crates.ioLuca Barbieri-2/+0
2020-03-30rustc -> rustc_middle part 1Mazdak Farrokhzad-1/+1
2020-03-13move frozen to rustc_data_structuresMark Mansi-0/+1
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