about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-12-14 14:07:57 +0100
committerGitHub <noreply@github.com>2024-12-14 14:07:57 +0100
commitfffdb1bc013a0fbcd2d3a16e4aec1357082f637e (patch)
treeb6e3dfb9b9ec140d4cb65041d074f26ffcdcccc2 /compiler/rustc_codegen_gcc
parent1c24da63a2713fc370e031cce85f6106f928751a (diff)
parent4d5d4700f3c7fa5151560d27f389c15a7a3047a0 (diff)
downloadrust-fffdb1bc013a0fbcd2d3a16e4aec1357082f637e.tar.gz
rust-fffdb1bc013a0fbcd2d3a16e4aec1357082f637e.zip
Rollup merge of #134191 - willcrichton:dev, r=RalfJung,lqd
Make some types and methods related to Polonius + Miri public

We have a tool, [Aquascope](https://github.com/cognitive-engineering-lab/aquascope/), which uses Polonius and Miri to visualize the compile-time and run-time semantics of a Rust program. Changes in the last few months to both APIs have hidden away details we depend upon. This PR re-exposes some of those details, specifically:

**Polonius:**
- `BorrowSet` and `BorrowData` are added to `rustc_borrowck::consumers`, and their fields are made `pub` instead of `pub(crate)`. We need this to interpret the `BorrowIndex`es generated by Polonius.
- `BorrowSet::build` is now `pub`. We need this because the borrowck API doesn't provide access to the `BorrowSet` constructed during checking.
- `PoloniusRegionVid` is added to `rustc_borrowck::consumers`. We need this because it's also contained in the Polonius facts.

**Miri:**
- `InterpCx::local_to_op` is now a special case of `local_at_frame_to_op`, which allows querying locals in any frame. We need this because we walk the whole stack at each step to collect the state of memory.
- `InterpCx::layout_of_local` is now `pub`. We need this because we need to know the layout of every local at each step.

If these changes go against some design goal for keeping certain types private, please let me know so we can hash out a better solution. Additionally, if there's a better way to document that it's important that certain types stay public, also let me know. For example, `BorrowSet` was previously public but was hidden in 6676cec, breaking our build.

cc ```@RalfJung``` ```@nnethercote``` ```@gavinleroy```
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions