| Age | Commit message (Collapse) | Author | Lines |
|
Retire `IsNotConst` naming
This naming scheme caused a lot of confusion lately (including ICEs) due to misrefactored code. Also clean up the initialization code for said flag.
r? @eddyb
previous discussions: https://github.com/rust-lang/rust/pull/58784#issuecomment-468717439 https://github.com/rust-lang/rust/pull/58403#discussion_r265936336
|
|
Introduce an arena type which may be used to allocate a list of types with destructors
You can also specify that you want deserializers for `&'tcx [T]` and `&'tcx T` for a type in the list, which will allocate those using the arena.
Based on https://github.com/rust-lang/rust/pull/59517 and https://github.com/rust-lang/rust/pull/59533. Look at the last commit for the interesting changes.
An alternative to https://github.com/rust-lang/rust/pull/56448. cc @michaelwoerister @eddyb
r? @oli-obk
|
|
|
|
|
|
|
|
|
|
Implicit promotion on the other hand has very strict rules on what may be done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Remove adt_def from projections and downcasts in MIR
As part of optimizing generator layouts in MIR, we'd like to allow downcasting generators to variants which do not have a corresponding `def_id`, since they are created by the compiler.
This refactor hopes to allow that, without regressing perf.
r? @eddyb
|
|
|
|
|
|
r=oli-obk
Renames `EvalErrorKind` to `InterpError`
This PR renames `EvalErrorKind` to `InterpError`.
This is related to #54395.
|
|
Fixes for shallow borrows
* Don't promote these borrows if we're going to remove them before
codegen
* Correctly mark unreachable code
|
|
|
|
|
|
* Don't promote these borrows if we're going to remove them before
codegen
* Correctly mark unreachable code
|
|
|
|
Renames `EvalContext` to `InterpretCx`
This PR renames `EvalContext` to `InterpretCx` in `src/librustc_mir`.
This PR is related to #54395 .
|
|
Merge `Promoted` and `Static` in `mir::Place`
fixes #53848
|
|
|
|
Use a valid name for graphviz graphs
Hiridification has broken graphviz output because `HirId` has a more complex display implemetation than `NodeId`. Since the id was just used to generate a distinct identifier, we just pull out the various constituent indexed.
|
|
|
|
|
|
|
|
|
|
Fixes for the generator transform
* Moves cleanup annotations in pretty printed MIR so that they can be tested
* Correctly determines which drops are in cleanup blocks when elaborating generator drops
* Use the correct state for poisoning a generator
Closes #58892
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Don't promote function calls to nonpromotable things
fixes https://github.com/rust-lang/rust/issues/58767 and fixes https://github.com/rust-lang/rust/issues/58634
r? @eddyb
should we additionally check the function call return type? It might be a promotable function (or any `const fn` inside a `const fn`), but its return type might contain interior mutability.
|
|
|
|
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
|
|
[NLL] Remove `LiveVar`
The `LiveVar` type (and related) made it harder to reason about the code. It seemed as an abstraction that didn't bring any useful concept to the reader (when transitioning from the RFC theory to the actual implementation code).
It achieved a compactness in the vectors storing the def/use/drop information that was related only to the `LocalUseMap`. This PR went in the other direction and favored time over memory (but this decision can be easily reverted to the other side without reintroducing `LiveVar`).
What this PR aims at is to clarify that there's no significant transformation between the MIR `Local` and the `LiveVar` (now refactored as `live_locals: Vec<Local>`): we're just filtering (not mapping) the entire group of `Local`s into a meaningful subset that we should perform the liveness analysis on.
As a side note, there is no guarantee that the liveness analysis is performed only on (what the code calls) "live" variables, if the NLL facts are requested it will be performed on *any* variable so there can't be any assumptions on that regard. (Still, this PR didn't change the general naming convention to reduce the number of changes here and streamline the review process).
**Acceptance criteria:** This PR attempts to do only a minor refactoring and not to change the logic so it can't have any performance impact, particularly, it can't lose any of the significant performance improvement achieved in the great work done in https://github.com/rust-lang/rust/pull/52115.
r? @nikomatsakis
|
|
|
|
This also ensure that dropping a generator won't leak upvars if dropping
one of them panics
|
|
[NLL] Type check operations with pointer types
It seems these were forgotten about. Moving to `Rvalue::AddressOf` simplifies the coercions from references, but I want this to be fixed as soon as possible.
r? @pnkfelix
|
|
|
|
|