[][src]Struct rustc_mir::transform::const_prop::ConstPropMachine

struct ConstPropMachine<'mir, 'tcx> {
    stack: Vec<Frame<'mir, 'tcx, (), ()>>,
    written_only_inside_own_block_locals: FxHashSet<Local>,
    only_propagate_inside_block_locals: BitSet<Local>,
    can_const_prop: IndexVec<Local, ConstPropMode>,


stack: Vec<Frame<'mir, 'tcx, (), ()>>

The virtual call stack.

written_only_inside_own_block_locals: FxHashSet<Local>

OnlyInsideOwnBlock locals that were written in the current block get erased at the end.

only_propagate_inside_block_locals: BitSet<Local>

Locals that need to be cleared after every block terminates.

can_const_prop: IndexVec<Local, ConstPropMode>


impl<'mir, 'tcx> ConstPropMachine<'mir, 'tcx>[src]

fn new(
    only_propagate_inside_block_locals: BitSet<Local>,
    can_const_prop: IndexVec<Local, ConstPropMode>
) -> Self

Trait Implementations

impl<'mir, 'tcx> Machine<'mir, 'tcx> for ConstPropMachine<'mir, 'tcx>[src]

type PointerTag = ()

Tag tracked alongside every pointer. This is used to implement "Stacked Borrows" https://www.ralfj.de/blog/2018/08/07/stacked-borrows.html. The default() is used for pointers to consts, statics, vtables and functions. The Debug formatting is used for displaying pointers; we cannot use Display as () does not implement that, but it should be "nice" output. Read more

type ExtraFnVal = !

Machines can define extra (non-instance) things that represent values of function pointers. For example, Miri uses this to return a function pointer from dlsym that can later be called to execute the right thing. Read more

type MemoryKind = !

Additional memory kinds a machine wishes to distinguish from the builtin ones

type MemoryMap = FxHashMap<AllocId, (MemoryKind<!>, Allocation)>

Memory's allocation map

type AllocExtra = ()

Extra data stored in every allocation.

type FrameExtra = ()

Extra data stored in every call frame.

type MemoryExtra = ()

Extra data stored in memory. A reference to this is available when AllocExtra gets initialized, so you can e.g., have an Rc here if there is global state you need access to in the AllocExtra hooks. Read more

Auto Trait Implementations

impl<'mir, 'tcx> !RefUnwindSafe for ConstPropMachine<'mir, 'tcx>

impl<'mir, 'tcx> !Send for ConstPropMachine<'mir, 'tcx>

impl<'mir, 'tcx> !Sync for ConstPropMachine<'mir, 'tcx>

impl<'mir, 'tcx> Unpin for ConstPropMachine<'mir, 'tcx> where
    'tcx: 'mir, 

impl<'mir, 'tcx> !UnwindSafe for ConstPropMachine<'mir, 'tcx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]