about summary refs log tree commit diff
path: root/src/librustc_data_structures
AgeCommit message (Collapse)AuthorLines
2018-09-13Reorder bitvec.rs.Nicholas Nethercote-40/+37
So that the `BitArray` code is all together and before the `BitVector` code, instead of being awkwardly interleaved.
2018-09-11stabalize infer outlives requirements (RFC 2093).toidiu-1/+0
Co-authored-by: nikomatsakis
2018-09-11Simplify Scope/ScopeData to have less chance of introducing UB or size increasesOliver Schneider-2/+4
2018-09-11Address attribute naming and use `Bound` enumOliver Schneider-1/+1
2018-09-11Forbid the upper indices of `IndexVec` indices to allow for niche optimizationsOliver Schneider-2/+3
2018-09-07add `const_fn` featureNiko Matsakis-3/+3
2018-09-07switch back to using a plain `u32`, not `NonZeroU32`Niko Matsakis-5/+5
This reverts (part of) commit cb9a336ae2cf6a75fdcc130853286349cb424c96.
2018-09-07remove use of `from_u32_unchecked`Niko Matsakis-2/+20
2018-09-07switch to using `NonZeroU32` to represent indicesNiko Matsakis-5/+5
2018-09-07rewrite constants to use NewType::MAX instead of u32::MAXNiko Matsakis-5/+17
Also, adjust the MAX to be `u32::MAX - 1`, leaving room for `u32::MAX` to become a sentinel value in the future.
2018-09-07add various `#[inline]` directivesNiko Matsakis-0/+10
2018-09-07remove all references to `private` from outside the macroNiko Matsakis-12/+44
2018-09-07change from tuple struct to brace structNiko Matsakis-7/+9
2018-09-07make field always private, add `From` implsNiko Matsakis-64/+52
2018-09-07add a commentNiko Matsakis-0/+7
2018-09-07change syntax of `newtype_index` to look like a struct declNiko Matsakis-3/+30
2018-09-07Fix compiling some rustc crates to wasmAlex Crichton-292/+298
I was dabbling recently seeing what it would take to compile `rustfmt` to the `wasm32-unknown-unknown` target and it turns out not much effort is needed! Currently `rustfmt` depends on a few rustc crates published to crates.io, so this commit touches up those crates to compile for wasm themselves. Notably: * The `rustc_data_structures` crate's `flock` implementation is stubbed out to unconditionally return errors on unsupported platforms. * The `rustc_errors` crate is extended to not do any locking for all non-windows platforms. In both of these cases if we port the compiler to new platforms the functionality isn't critical but will be discovered over time as it comes up, so this hopefully doesn't make it too too hard to compile to new platforms!
2018-09-06Auto merge of #52626 - brunocodutra:issue-52475, r=oli-obkbors-0/+17
Fix issue #52475: Make loop detector only consider reachable memory As [suggested](https://github.com/rust-lang/rust/pull/51702#discussion_r197585664) by @oli-obk `alloc_id`s should be ignored by traversing all `Allocation`s in interpreter memory at a given moment in time, beginning by `ByRef` locals in the stack. - [x] Generalize the implementation of `Hash` for `EvalSnapshot` to traverse `Allocation`s - [x] Generalize the implementation of `PartialEq` for `EvalSnapshot` to traverse `Allocation`s - [x] Commit regression tests Fixes #52626 Fixes https://github.com/rust-lang/rust/issues/52849
2018-09-04Breaking change upgradesMark Rousskov-1/+7
2018-09-03Implement Hash in terms of HashStable for EvalSnapshotBruno Dutra-0/+17
2018-08-30Rollup merge of #53786 - frewsxcv:frewsxcv-bad-style, r=ManishearthPietro Albini-1/+1
Replace usages of 'bad_style' with 'nonstandard_style'. `bad_style` is being deprecated in favor of `nonstandard_style`: - https://github.com/rust-lang/rust/issues/41646
2018-08-30Rollup merge of #53472 - eddyb:fx-pls, r=pnkfelixPietro Albini-5/+5
Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc. Most of the compiler uses the `Fx` hasher but some places ended up with the default one.
2018-08-29Replace usages of 'bad_style' with 'nonstandard_style'.Corey Farwell-1/+1
`bad_style` is being deprecated in favor of `nonstandard_style`: - https://github.com/rust-lang/rust/issues/41646
2018-08-29Remove `AccumulateVec` and its uses.Nicholas Nethercote-247/+3
It's basically just a less capable version of `SmallVec`.
2018-08-28Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.Eduard-Mihai Burtescu-5/+5
2018-08-28Auto merge of #53314 - nikomatsakis:nll-invert-liveness, r=pnkfelixbors-2/+88
NLL: experiment with inverting liveness I got inspired to see what would happen here. Fixes #52460 r? @pnkfelix
2018-08-27micro-optimize dominator codeNiko Matsakis-2/+2
2018-08-27enable feature `impl_header_lifetime_elision`Niko Matsakis-0/+1
2018-08-27implement liveness tracing, remove old liveness systemNiko Matsakis-0/+85
2018-08-27Auto merge of #53441 - toidiu:ak-fix53419, r=nikomatsakisbors-0/+1
fix for late-bound regions Fix for https://github.com/rust-lang/rust/issues/53419 r? @nikomatsakis
2018-08-27Auto merge of #53656 - nnethercote:HybridIdxSet-tweaks, r=nikomatsakisbors-74/+100
`HybridIdxSet` tweaks A couple of tweaks to `HybridIdxSet`. r? @nikomatsakis
2018-08-26Auto merge of #53629 - nnethercote:lazier-SparseBitMatrix, r=nikomatsakisbors-34/+38
Lazier sparse bit matrix A small NLL win. r? @nikomatsakis
2018-08-24check that adding infer-outlives requirement to all crates worksNiko Matsakis-0/+1
2018-08-24Introduce `UnionIntoIdxSet` and `SubtractFromIdxSet` traits.Nicholas Nethercote-38/+68
They let `union()`, `union_sparse()` and `union_hybrid()` be merged. Likewise for subtract()`, `subtract_sparse()` and `subtract_hybrid()`.
2018-08-24Rename `universe_size` as `domain_size`.Nicholas Nethercote-36/+32
Because `domain` is a more obvious term than `universe` for this concept.
2018-08-23Use SmallVec for SmallCStrAndre Bogus-48/+39
2018-08-23Make SparseBitMatrix a bit lazier.Nicholas Nethercote-28/+32
Currently when a row is instantiated in SparseBitMatrix, any missing rows prior to it are also fully instantiated. This patch changes things so that those prior rows are minimally instantiated (with a `None`). This avoids a decent number of allocations in NLL, speeding up several benchmarks by up to 0.5%. The patch also removes two unused methods, `len()` and `iter_enumerated()`.
2018-08-23Use optimized SmallVec implementationIgor Gutorov-355/+12
2018-08-23Rename the fields in `SparseBitMatrix`.Nicholas Nethercote-19/+19
The new names are clearer.
2018-08-23Auto merge of #53520 - nnethercote:merge-IdxSet-IdxSetBuf, r=nikomatsakisbors-150/+64
Merge `IdxSet` and `IdxSetBuf` Because it simplifies things. @r? nikomatsakis
2018-08-21Rollup merge of #53329 - frewsxcv:frewsxcv-ptr-add-sub, r=RalfJungkennytm-4/+4
Replace usages of ptr::offset with ptr::{add,sub}. Rust provides these helper methods – so let's use them!
2018-08-21Rollup merge of #53496 - matthiaskrgr:codespell_08_2018, r=varkorkennytm-2/+2
Fix typos found by codespell.
2018-08-20Replace usages of ptr::offset with ptr::{add,sub}.Corey Farwell-4/+4
2018-08-20Remove IdxSet typedef and Rename {,Hybrid}IdxSetBuf as {,Hybrid}IdxSet.Nicholas Nethercote-66/+63
Now that the `Buf` vs. non-`Buf` distinction has been removed, it makes sense to drop the `Buf` suffix and use the shorter names everywhere.
2018-08-20Merge `IdxSet` and `IdxSetBuf`.Nicholas Nethercote-88/+5
The `Buf` vs. non-`Buf` distinction is no longer necessary, and the nastiest code in this file can be removed. To minimize this patch, `IdxSet` is made a typedef of `IdxSetBuf`. The next patch will remove this typedef.
2018-08-19Stabilize macro_vis_matcherJakub Kozlowski-1/+1
2018-08-19Fix typos found by codespell.Matthias Krüger-2/+2
2018-08-18Use the new Entry::or_default method where possible.Eduard-Mihai Burtescu-4/+4
2018-08-17Auto merge of #53383 - nnethercote:HybridIdxSetBuf, r=nikomatsakisbors-10/+237
Speed up NLL with HybridIdxSetBuf. It's a sparse-when-small but dense-when-large index set that is very efficient for sets that (a) have few elements, (b) have large universe_size values, and (c) are cleared frequently. Which makes it perfect for the `gen_set` and `kill_set` sets used by the new borrow checker. This patch reduces `tuple-stress`'s NLL-check time by 40%, and up to 12% for several other benchmarks. And it halves the max-rss for `keccak`, and has smaller wins for `inflate` and `clap-rs`.
2018-08-16Speed up NLL with `HybridIdxSetBuf`.Nicholas Nethercote-10/+237
`HybridIdxSetBuf` is a sparse-when-small but dense-when-large index set that is very efficient for sets that (a) have few elements, (b) have large `universe_size` values, and (c) are cleared frequently. Which makes it perfect for the `gen_set` and `kill_set` sets used by the new borrow checker. This patch reduces the execution time of the five slowest NLL benchmarks by 55%, 21%, 16%, 10% and 9%. It also reduces the max-rss of three benchmarks by 53%, 33%, and 9%.