| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Because the meaning of this `index` variable is quite different to all
the other `index` variables in this file.
|
|
The name `waiting_cache` sounds like it is related to the states
`NodeState::Waiting`, but it's not; the cache holds nodes of various
states.
This commit changes it to `active_state`.
|
|
We normally use `index` for indices to `ObligationForest::nodes`, but
this is a `Nodes::dependents` index.
|
|
|
|
This is a big speed win for `keccak` and `inflate`.
|
|
This gives a slight speed-up.
|
|
Now that all indices have type `usize`, it makes sense to be more
consistent about their naming. This commit removes all uses of `i` in
favour of `index`.
|
|
The size of the indices doesn't matter much here, and having a
`newtype_index!` index type without also using `IndexVec` requires lots
of conversions. So this commit removes `NodeIndex` in favour of uniform
use of `usize` as the index type. As well as making the code slightly
more concise, it also slightly speeds things up.
|
|
`Node` has an optional parent and a list of other descendents. Most of
the time the parent is treated the same as the other descendents --
error-handling is the exception -- and chaining them together for
iteration has a non-trivial cost.
This commit changes the representation. There is now a single list of
descendants, and a boolean flag that indicates if there is a parent (in
which case it is first descendent). This representation encodes the same
information, in a way that is less idiomatic but cheaper to iterate over
for the common case where the parent doesn't need special treatment.
As a result, some benchmark workloads are up to 2% faster.
|
|
Various `ObligationForest` improvements
These commits make the code both nicer and faster.
r? @nikomatsakis
|
|
Upgrade parking_lot and tempfile rustc dependencies
This should be last piece to unbreak `rustc` in https://github.com/rust-lang/rust/issues/63848
|
|
|
|
|
|
It's more concise, more idiomatic, and measurably faster.
|
|
This makes the code a little faster, presumably because bounds checks
aren't needed on `nodes` accesses. It requires making `scratch` a
`RefCell`, which is not unreasonable.
|
|
|
|
|
|
|
|
These refer to code that no longer exists.
|
|
|
|
This commit removes the custom index implementation of `NodeIndex`,
which probably predates `newtype_index!`.
As well as eliminating code, it improves the debugging experience,
because the custom implementation had the property of being incremented
by 1 (so it could use `NonZeroU32`), which was incredibly confusing if
you didn't expect it.
For some reason, I also had to remove an `unsafe` block marker from
`from_u32_unchecked()` that the compiler said was now unnecessary.
|
|
Those with type `usize` are now called `i`, those with type `NodeIndex`
are called `index`.
|
|
This function is very hot, doesn't get inlined because it's recursive,
and the function calls are significant.
This commit splits it into inlined and uninlined variants, and uses the
inlined variant for the hot call site. This wins several percent on a
few benchmarks.
|
|
|
|
Refactor `TinyList::contains` and `len` to iterate instead of recurse
None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rollup of 8 pull requests
Successful merges:
- #61856 (Lint attributes on function arguments)
- #62360 (Document that ManuallyDrop::drop should not called more than once)
- #62392 (Update minifier-rs version)
- #62871 (Explicit error message for async recursion.)
- #62995 (Avoid ICE when suggestion span is at Eof)
- #63053 (SystemTime docs: recommend Instant for elapsed time)
- #63081 (tidy: Cleanup the directory whitelist)
- #63088 (Remove anonymous_parameters from unrelated test)
Failed merges:
r? @ghost
|
|
|
|
rustbuild
Remove some random unnecessary lint `allow`s
|
|
|
|
cleanup: Remove `extern crate serialize as rustc_serialize`s
|
|
https://github.com/rust-lang/rust/issues/60532
|
|
|
|
|
|
Make some rustc macros more hygienic
|
|
|
|
|
|
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!
|
|
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
|
|
|
|
|
|
|
|
|