| Age | Commit message (Collapse) | Author | Lines |
|
This reverts commit 6810f5286b6b91daab06fc3dccb27d8c46f14349, reversing
changes made to 8586ec6980462c99a8926646201b2444d8938d29.
|
|
Remove bitslice.rs
As the comment in `bitslice.rs` says:
> FIXME: merge with `bitvec`
|
|
Add forever unstable attribute to allow specifying arbitrary scalar ranges
r? @eddyb for the first commit and @nikomatsakis for the second one
|
|
Fix compiling some rustc crates to wasm
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!
|
|
Because they're just thin wrappers around `BitIter` and `slice::Iter`.
|
|
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`.
|
|
So that the `BitArray` code is all together and before the `BitVector`
code, instead of being awkwardly interleaved.
|
|
Co-authored-by: nikomatsakis
|
|
|
|
|
|
|
|
|
|
This reverts (part of) commit cb9a336ae2cf6a75fdcc130853286349cb424c96.
|
|
|
|
|
|
Also, adjust the MAX to be `u32::MAX - 1`, leaving room for `u32::MAX`
to become a sentinel value in the future.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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!
|
|
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
|
|
|
|
|
|
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
|
|
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.
|
|
`bad_style` is being deprecated in favor of `nonstandard_style`:
- https://github.com/rust-lang/rust/issues/41646
|
|
It's basically just a less capable version of `SmallVec`.
|
|
|
|
NLL: experiment with inverting liveness
I got inspired to see what would happen here.
Fixes #52460
r? @pnkfelix
|
|
|
|
|
|
|
|
fix for late-bound regions
Fix for https://github.com/rust-lang/rust/issues/53419
r? @nikomatsakis
|
|
`HybridIdxSet` tweaks
A couple of tweaks to `HybridIdxSet`.
r? @nikomatsakis
|
|
Lazier sparse bit matrix
A small NLL win.
r? @nikomatsakis
|
|
|
|
They let `union()`, `union_sparse()` and `union_hybrid()` be merged.
Likewise for subtract()`, `subtract_sparse()` and `subtract_hybrid()`.
|
|
Because `domain` is a more obvious term than `universe` for this
concept.
|
|
|
|
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()`.
|
|
|
|
The new names are clearer.
|
|
Merge `IdxSet` and `IdxSetBuf`
Because it simplifies things.
@r? nikomatsakis
|
|
Replace usages of ptr::offset with ptr::{add,sub}.
Rust provides these helper methods – so let's use them!
|
|
Fix typos found by codespell.
|
|
|
|
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.
|