Struct rustc_mir::interpret::Memory
[−]
[src]
pub struct Memory<'a, 'mir, 'tcx: 'a + 'mir, M: Machine<'mir, 'tcx>> { pub data: M::MemoryData, pub cur_frame: usize, pub tcx: TyCtxtAt<'a, 'tcx, 'tcx>, // some fields omitted }
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Fields
data: M::MemoryData
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Additional data required by the Machine
cur_frame: usize
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
The current stack frame. Used to check accesses against locks.
tcx: TyCtxtAt<'a, 'tcx, 'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Methods
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M>
pub fn new(tcx: TyCtxtAt<'a, 'tcx, 'tcx>, data: M::MemoryData) -> Self
[src]
pub fn new(tcx: TyCtxtAt<'a, 'tcx, 'tcx>, data: M::MemoryData) -> Self
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn allocations<'x>(
&'x self
) -> impl Iterator<Item = (AllocId, &'x Allocation)>
[src]
pub fn allocations<'x>(
&'x self
) -> impl Iterator<Item = (AllocId, &'x Allocation)>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn create_fn_alloc(&mut self, instance: Instance<'tcx>) -> MemoryPointer
[src]
pub fn create_fn_alloc(&mut self, instance: Instance<'tcx>) -> MemoryPointer
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn allocate_cached(&mut self, bytes: &[u8]) -> MemoryPointer
[src]
pub fn allocate_cached(&mut self, bytes: &[u8]) -> MemoryPointer
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn allocate(
&mut self,
size: u64,
align: Align,
kind: Option<MemoryKind<M::MemoryKinds>>
) -> EvalResult<'tcx, MemoryPointer>
[src]
pub fn allocate(
&mut self,
size: u64,
align: Align,
kind: Option<MemoryKind<M::MemoryKinds>>
) -> EvalResult<'tcx, MemoryPointer>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
kind is None
for statics
pub fn reallocate(
&mut self,
ptr: MemoryPointer,
old_size: u64,
old_align: Align,
new_size: u64,
new_align: Align,
kind: MemoryKind<M::MemoryKinds>
) -> EvalResult<'tcx, MemoryPointer>
[src]
pub fn reallocate(
&mut self,
ptr: MemoryPointer,
old_size: u64,
old_align: Align,
new_size: u64,
new_align: Align,
kind: MemoryKind<M::MemoryKinds>
) -> EvalResult<'tcx, MemoryPointer>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn deallocate_local(&mut self, ptr: MemoryPointer) -> EvalResult<'tcx>
[src]
pub fn deallocate_local(&mut self, ptr: MemoryPointer) -> EvalResult<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn deallocate(
&mut self,
ptr: MemoryPointer,
size_and_align: Option<(u64, Align)>,
kind: MemoryKind<M::MemoryKinds>
) -> EvalResult<'tcx>
[src]
pub fn deallocate(
&mut self,
ptr: MemoryPointer,
size_and_align: Option<(u64, Align)>,
kind: MemoryKind<M::MemoryKinds>
) -> EvalResult<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn pointer_size(&self) -> u64
[src]
pub fn pointer_size(&self) -> u64
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn endianness(&self) -> Endian
[src]
pub fn endianness(&self) -> Endian
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn check_align(
&self,
ptr: Pointer,
required_align: Align
) -> EvalResult<'tcx>
[src]
pub fn check_align(
&self,
ptr: Pointer,
required_align: Align
) -> EvalResult<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Check that the pointer is aligned AND non-NULL.
pub fn check_bounds(&self, ptr: MemoryPointer, access: bool) -> EvalResult<'tcx>
[src]
pub fn check_bounds(&self, ptr: MemoryPointer, access: bool) -> EvalResult<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M>
Allocation accessors
pub fn get(&self, id: AllocId) -> EvalResult<'tcx, &Allocation>
[src]
pub fn get(&self, id: AllocId) -> EvalResult<'tcx, &Allocation>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_fn(&self, ptr: MemoryPointer) -> EvalResult<'tcx, Instance<'tcx>>
[src]
pub fn get_fn(&self, ptr: MemoryPointer) -> EvalResult<'tcx, Instance<'tcx>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn dump_alloc(&self, id: AllocId)
[src]
pub fn dump_alloc(&self, id: AllocId)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
For debugging, print an allocation and all allocations it points to, recursively.
pub fn dump_allocs(&self, allocs: Vec<AllocId>)
[src]
pub fn dump_allocs(&self, allocs: Vec<AllocId>)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
For debugging, print a list of allocations and all allocations they point to, recursively.
pub fn leak_report(&self) -> usize
[src]
pub fn leak_report(&self) -> usize
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M>
Reading and writing
pub fn mark_static_initialized(
&mut self,
alloc_id: AllocId,
mutability: Mutability
) -> EvalResult<'tcx>
[src]
pub fn mark_static_initialized(
&mut self,
alloc_id: AllocId,
mutability: Mutability
) -> EvalResult<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
mark an allocation as static and initialized, either mutable or not
pub fn copy(
&mut self,
src: Pointer,
src_align: Align,
dest: Pointer,
dest_align: Align,
size: u64,
nonoverlapping: bool
) -> EvalResult<'tcx>
[src]
pub fn copy(
&mut self,
src: Pointer,
src_align: Align,
dest: Pointer,
dest_align: Align,
size: u64,
nonoverlapping: bool
) -> EvalResult<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn read_c_str(&self, ptr: MemoryPointer) -> EvalResult<'tcx, &[u8]>
[src]
pub fn read_c_str(&self, ptr: MemoryPointer) -> EvalResult<'tcx, &[u8]>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn read_bytes(&self, ptr: Pointer, size: u64) -> EvalResult<'tcx, &[u8]>
[src]
pub fn read_bytes(&self, ptr: Pointer, size: u64) -> EvalResult<'tcx, &[u8]>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn write_bytes(&mut self, ptr: Pointer, src: &[u8]) -> EvalResult<'tcx>
[src]
pub fn write_bytes(&mut self, ptr: Pointer, src: &[u8]) -> EvalResult<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn write_repeat(
&mut self,
ptr: Pointer,
val: u8,
count: u64
) -> EvalResult<'tcx>
[src]
pub fn write_repeat(
&mut self,
ptr: Pointer,
val: u8,
count: u64
) -> EvalResult<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn read_primval(
&self,
ptr: MemoryPointer,
ptr_align: Align,
size: u64
) -> EvalResult<'tcx, PrimVal>
[src]
pub fn read_primval(
&self,
ptr: MemoryPointer,
ptr_align: Align,
size: u64
) -> EvalResult<'tcx, PrimVal>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn read_ptr_sized(
&self,
ptr: MemoryPointer,
ptr_align: Align
) -> EvalResult<'tcx, PrimVal>
[src]
pub fn read_ptr_sized(
&self,
ptr: MemoryPointer,
ptr_align: Align
) -> EvalResult<'tcx, PrimVal>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn write_primval(
&mut self,
ptr: MemoryPointer,
ptr_align: Align,
val: PrimVal,
size: u64,
signed: bool
) -> EvalResult<'tcx>
[src]
pub fn write_primval(
&mut self,
ptr: MemoryPointer,
ptr_align: Align,
val: PrimVal,
size: u64,
signed: bool
) -> EvalResult<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn write_ptr_sized_unsigned(
&mut self,
ptr: MemoryPointer,
ptr_align: Align,
val: PrimVal
) -> EvalResult<'tcx>
[src]
pub fn write_ptr_sized_unsigned(
&mut self,
ptr: MemoryPointer,
ptr_align: Align,
val: PrimVal
) -> EvalResult<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M>
Undefined bytes
pub fn mark_definedness(
&mut self,
ptr: Pointer,
size: u64,
new_state: bool
) -> EvalResult<'tcx>
[src]
pub fn mark_definedness(
&mut self,
ptr: Pointer,
size: u64,
new_state: bool
) -> EvalResult<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Trait Implementations
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> HasMemory<'a, 'mir, 'tcx, M> for Memory<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> HasMemory<'a, 'mir, 'tcx, M> for Memory<'a, 'mir, 'tcx, M>
fn memory_mut(&mut self) -> &mut Memory<'a, 'mir, 'tcx, M>
[src]
fn memory_mut(&mut self) -> &mut Memory<'a, 'mir, 'tcx, M>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn memory(&self) -> &Memory<'a, 'mir, 'tcx, M>
[src]
fn memory(&self) -> &Memory<'a, 'mir, 'tcx, M>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn into_ptr(&self, value: Value) -> EvalResult<'tcx, Pointer>
[src]
fn into_ptr(&self, value: Value) -> EvalResult<'tcx, Pointer>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Convert the value into a pointer (or a pointer-sized integer). If the value is a ByRef, this may have to perform a load. Read more
fn into_ptr_vtable_pair(
&self,
value: Value
) -> EvalResult<'tcx, (Pointer, MemoryPointer)>
[src]
fn into_ptr_vtable_pair(
&self,
value: Value
) -> EvalResult<'tcx, (Pointer, MemoryPointer)>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn into_slice(&self, value: Value) -> EvalResult<'tcx, (Pointer, u64)>
[src]
fn into_slice(&self, value: Value) -> EvalResult<'tcx, (Pointer, u64)>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> HasDataLayout for &'a Memory<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> HasDataLayout for &'a Memory<'a, 'mir, 'tcx, M>
fn data_layout(&self) -> &TargetDataLayout
[src]
fn data_layout(&self) -> &TargetDataLayout
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?