[−][src]Struct rustc_mir::interpret::eval_context::EvalContext
🔬 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
machine: 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?
Stores the Machine
instance.
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?
The results of the type checker, from rustc.
param_env: ParamEnv<'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?
Bounds in scope for polymorphic evaluations.
memory: 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?
The virtual memory system.
stack: Vec<Frame<'mir, '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?
The virtual call stack.
stack_limit: 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 maximum number of stack frames allowed
steps_since_detector_enabled: isize
🔬 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?
When this value is negative, it indicates the number of interpreter steps until the loop detector is enabled. When it is positive, it is the number of steps after the detector has been enabled modulo the loop detector period.
loop_detector: InfiniteLoopDetector<'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?
Extra state to detect loops. FIXME: Move this to the CTFE machine's state, out of the general miri engine.
Methods
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
fn type_is_fat_ptr(&self, ty: Ty<'tcx>) -> bool
[src]
fn type_is_fat_ptr(&self, ty: Ty<'tcx>) -> bool
🔬 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 cast(
&mut self,
src: OpTy<'tcx>,
kind: CastKind,
dest: PlaceTy<'tcx>
) -> EvalResult<'tcx>
[src]
pub fn cast(
&mut self,
src: OpTy<'tcx>,
kind: CastKind,
dest: PlaceTy<'tcx>
) -> 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(super) fn cast_scalar(
&self,
val: Scalar,
src_layout: TyLayout<'tcx>,
dest_layout: TyLayout<'tcx>
) -> EvalResult<'tcx, Scalar>
[src]
pub(super) fn cast_scalar(
&self,
val: Scalar,
src_layout: TyLayout<'tcx>,
dest_layout: TyLayout<'tcx>
) -> EvalResult<'tcx, Scalar>
🔬 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 cast_from_int(
&self,
v: u128,
src_layout: TyLayout<'tcx>,
dest_layout: TyLayout<'tcx>
) -> EvalResult<'tcx, Scalar>
[src]
fn cast_from_int(
&self,
v: u128,
src_layout: TyLayout<'tcx>,
dest_layout: TyLayout<'tcx>
) -> EvalResult<'tcx, Scalar>
🔬 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 cast_from_float(
&self,
bits: u128,
fty: FloatTy,
dest_ty: Ty<'tcx>
) -> EvalResult<'tcx, Scalar>
[src]
fn cast_from_float(
&self,
bits: u128,
fty: FloatTy,
dest_ty: Ty<'tcx>
) -> EvalResult<'tcx, Scalar>
🔬 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 cast_from_ptr(&self, ptr: Pointer, ty: Ty<'tcx>) -> EvalResult<'tcx, Scalar>
[src]
fn cast_from_ptr(&self, ptr: Pointer, ty: Ty<'tcx>) -> EvalResult<'tcx, Scalar>
🔬 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 unsize_into_ptr(
&mut self,
src: OpTy<'tcx>,
dest: PlaceTy<'tcx>,
sty: Ty<'tcx>,
dty: Ty<'tcx>
) -> EvalResult<'tcx>
[src]
fn unsize_into_ptr(
&mut self,
src: OpTy<'tcx>,
dest: PlaceTy<'tcx>,
sty: Ty<'tcx>,
dty: Ty<'tcx>
) -> 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?
fn unsize_into(
&mut self,
src: OpTy<'tcx>,
dest: PlaceTy<'tcx>
) -> EvalResult<'tcx>
[src]
fn unsize_into(
&mut self,
src: OpTy<'tcx>,
dest: PlaceTy<'tcx>
) -> 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: 'mir, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
pub fn new(
tcx: TyCtxtAt<'a, 'tcx, 'tcx>,
param_env: ParamEnv<'tcx>,
machine: M,
memory_data: M::MemoryData
) -> Self
[src]
pub fn new(
tcx: TyCtxtAt<'a, 'tcx, 'tcx>,
param_env: ParamEnv<'tcx>,
machine: M,
memory_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(crate) fn with_fresh_body<F: FnOnce(&mut Self) -> R, R>(
&mut self,
f: F
) -> R
[src]
pub(crate) fn with_fresh_body<F: FnOnce(&mut Self) -> R, R>(
&mut self,
f: F
) -> R
🔬 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 memory(&self) -> &Memory<'a, 'mir, 'tcx, M>
[src]
pub 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?
pub fn memory_mut(&mut self) -> &mut Memory<'a, 'mir, 'tcx, M>
[src]
pub 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?
pub fn stack(&self) -> &[Frame<'mir, 'tcx>]
[src]
pub fn stack(&self) -> &[Frame<'mir, '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 cur_frame(&self) -> usize
[src]
pub fn cur_frame(&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?
pub fn storage_live(&mut self, local: Local) -> EvalResult<'tcx, LocalValue>
[src]
pub fn storage_live(&mut self, local: Local) -> EvalResult<'tcx, LocalValue>
🔬 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 a storage as live, killing the previous content and returning it. Remember to deallocate that!
pub fn storage_dead(&mut self, local: Local) -> LocalValue
[src]
pub fn storage_dead(&mut self, local: Local) -> LocalValue
🔬 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?
Returns the old value of the local. Remember to deallocate that!
pub fn str_to_value(&mut self, s: &str) -> EvalResult<'tcx, Value>
[src]
pub fn str_to_value(&mut self, s: &str) -> EvalResult<'tcx, Value>
🔬 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(super) fn resolve(
&self,
def_id: DefId,
substs: &'tcx Substs<'tcx>
) -> EvalResult<'tcx, Instance<'tcx>>
[src]
pub(super) fn resolve(
&self,
def_id: DefId,
substs: &'tcx Substs<'tcx>
) -> 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(super) fn type_is_sized(
&self,
ty: Ty<'tcx>
) -> bool
[src]
pub(super) fn type_is_sized(
&self,
ty: Ty<'tcx>
) -> bool
🔬 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 load_mir(
&self,
instance: InstanceDef<'tcx>
) -> EvalResult<'tcx, &'tcx Mir<'tcx>>
[src]
pub fn load_mir(
&self,
instance: InstanceDef<'tcx>
) -> EvalResult<'tcx, &'tcx Mir<'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 monomorphize<T: TypeFoldable<'tcx> + Subst<'tcx>>(
&self,
t: T,
substs: &'tcx Substs<'tcx>
) -> T
[src]
pub fn monomorphize<T: TypeFoldable<'tcx> + Subst<'tcx>>(
&self,
t: T,
substs: &'tcx Substs<'tcx>
) -> T
🔬 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 layout_of_local(
&self,
frame: usize,
local: Local
) -> EvalResult<'tcx, TyLayout<'tcx>>
[src]
pub fn layout_of_local(
&self,
frame: usize,
local: Local
) -> EvalResult<'tcx, TyLayout<'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(super) fn size_and_align_of(
&self,
metadata: Option<Scalar>,
layout: TyLayout<'tcx>
) -> EvalResult<'tcx, (Size, Align)>
[src]
pub(super) fn size_and_align_of(
&self,
metadata: Option<Scalar>,
layout: TyLayout<'tcx>
) -> EvalResult<'tcx, (Size, Align)>
🔬 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?
Return the actual dynamic size and alignment of the place at the given type. Only the "extra" (metadata) part of the place matters.
pub fn size_and_align_of_mplace(
&self,
mplace: MPlaceTy<'tcx>
) -> EvalResult<'tcx, (Size, Align)>
[src]
pub fn size_and_align_of_mplace(
&self,
mplace: MPlaceTy<'tcx>
) -> EvalResult<'tcx, (Size, Align)>
🔬 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 push_stack_frame(
&mut self,
instance: Instance<'tcx>,
span: Span,
mir: &'mir Mir<'tcx>,
return_place: Place,
return_to_block: StackPopCleanup
) -> EvalResult<'tcx>
[src]
pub fn push_stack_frame(
&mut self,
instance: Instance<'tcx>,
span: Span,
mir: &'mir Mir<'tcx>,
return_place: Place,
return_to_block: StackPopCleanup
) -> 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(super) fn pop_stack_frame(
&mut self
) -> EvalResult<'tcx>
[src]
pub(super) fn pop_stack_frame(
&mut self
) -> 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(super) fn deallocate_local(
&mut self,
local: LocalValue
) -> EvalResult<'tcx>
[src]
pub(super) fn deallocate_local(
&mut self,
local: LocalValue
) -> 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 const_eval(
&self,
gid: GlobalId<'tcx>
) -> EvalResult<'tcx, &'tcx Const<'tcx>>
[src]
pub fn const_eval(
&self,
gid: GlobalId<'tcx>
) -> EvalResult<'tcx, &'tcx Const<'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 frame(&self) -> &Frame<'mir, 'tcx>
[src]
pub fn frame(&self) -> &Frame<'mir, '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 frame_mut(&mut self) -> &mut Frame<'mir, 'tcx>
[src]
pub fn frame_mut(&mut self) -> &mut Frame<'mir, '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(super) fn mir(
&self
) -> &'mir Mir<'tcx>
[src]
pub(super) fn mir(
&self
) -> &'mir Mir<'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 substs(&self) -> &'tcx Substs<'tcx>
[src]
pub fn substs(&self) -> &'tcx Substs<'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_place(&self, place: Place)
[src]
pub fn dump_place(&self, place: Place)
🔬 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 generate_stacktrace(
&self,
explicit_span: Option<Span>
) -> (Vec<FrameInfo>, Span)
[src]
pub fn generate_stacktrace(
&self,
explicit_span: Option<Span>
) -> (Vec<FrameInfo>, Span)
🔬 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 sign_extend(&self, value: u128, ty: TyLayout) -> u128
[src]
pub fn sign_extend(&self, value: u128, ty: TyLayout) -> u128
🔬 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 truncate(&self, value: u128, ty: TyLayout) -> u128
[src]
pub fn truncate(&self, value: u128, ty: TyLayout) -> u128
🔬 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>> EvalContext<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
pub fn ref_to_mplace(
&self,
val: ValTy<'tcx>
) -> EvalResult<'tcx, MPlaceTy<'tcx>>
[src]
pub fn ref_to_mplace(
&self,
val: ValTy<'tcx>
) -> EvalResult<'tcx, MPlaceTy<'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?
Take a value, which represents a (thin or fat) reference, and make it a place.
Alignment is just based on the type. This is the inverse of MemPlace::to_ref
.
pub fn mplace_field(
&self,
base: MPlaceTy<'tcx>,
field: u64
) -> EvalResult<'tcx, MPlaceTy<'tcx>>
[src]
pub fn mplace_field(
&self,
base: MPlaceTy<'tcx>,
field: u64
) -> EvalResult<'tcx, MPlaceTy<'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?
Offset a pointer to project to a field. Unlike place_field, this is always possible without allocating, so it can take &self. Also return the field's layout. This supports both struct and array fields.
pub fn mplace_array_fields(
&self,
base: MPlaceTy<'tcx>
) -> EvalResult<'tcx, impl Iterator<Item = EvalResult<'tcx, MPlaceTy<'tcx>>> + 'a>
[src]
pub fn mplace_array_fields(
&self,
base: MPlaceTy<'tcx>
) -> EvalResult<'tcx, impl Iterator<Item = EvalResult<'tcx, MPlaceTy<'tcx>>> + 'a>
🔬 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 mplace_subslice(
&self,
base: MPlaceTy<'tcx>,
from: u64,
to: u64
) -> EvalResult<'tcx, MPlaceTy<'tcx>>
[src]
pub fn mplace_subslice(
&self,
base: MPlaceTy<'tcx>,
from: u64,
to: u64
) -> EvalResult<'tcx, MPlaceTy<'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 mplace_downcast(
&self,
base: MPlaceTy<'tcx>,
variant: usize
) -> EvalResult<'tcx, MPlaceTy<'tcx>>
[src]
pub fn mplace_downcast(
&self,
base: MPlaceTy<'tcx>,
variant: usize
) -> EvalResult<'tcx, MPlaceTy<'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 mplace_projection(
&self,
base: MPlaceTy<'tcx>,
proj_elem: &PlaceElem<'tcx>
) -> EvalResult<'tcx, MPlaceTy<'tcx>>
[src]
pub fn mplace_projection(
&self,
base: MPlaceTy<'tcx>,
proj_elem: &PlaceElem<'tcx>
) -> EvalResult<'tcx, MPlaceTy<'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?
Project into an mplace
pub fn place_field(
&mut self,
base: PlaceTy<'tcx>,
field: u64
) -> EvalResult<'tcx, PlaceTy<'tcx>>
[src]
pub fn place_field(
&mut self,
base: PlaceTy<'tcx>,
field: u64
) -> EvalResult<'tcx, PlaceTy<'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?
Get the place of a field inside the place, and also the field's type. Just a convenience function, but used quite a bit.
pub fn place_downcast(
&mut self,
base: PlaceTy<'tcx>,
variant: usize
) -> EvalResult<'tcx, PlaceTy<'tcx>>
[src]
pub fn place_downcast(
&mut self,
base: PlaceTy<'tcx>,
variant: usize
) -> EvalResult<'tcx, PlaceTy<'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 place_projection(
&mut self,
base: PlaceTy<'tcx>,
proj_elem: &ProjectionElem<'tcx, Local, Ty<'tcx>>
) -> EvalResult<'tcx, PlaceTy<'tcx>>
[src]
pub fn place_projection(
&mut self,
base: PlaceTy<'tcx>,
proj_elem: &ProjectionElem<'tcx, Local, Ty<'tcx>>
) -> EvalResult<'tcx, PlaceTy<'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?
Project into a place
pub(super) fn eval_place_to_mplace(
&self,
mir_place: &Place<'tcx>
) -> EvalResult<'tcx, MPlaceTy<'tcx>>
[src]
pub(super) fn eval_place_to_mplace(
&self,
mir_place: &Place<'tcx>
) -> EvalResult<'tcx, MPlaceTy<'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?
Evaluate statics and promoteds to an MPlace
. Used to share some code between
eval_place
and eval_place_to_op
.
pub fn eval_place(
&mut self,
mir_place: &Place<'tcx>
) -> EvalResult<'tcx, PlaceTy<'tcx>>
[src]
pub fn eval_place(
&mut self,
mir_place: &Place<'tcx>
) -> EvalResult<'tcx, PlaceTy<'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?
Compute a place. You should only use this if you intend to write into this
place; for reading, a more efficient alternative is eval_place_for_read
.
pub fn write_scalar(
&mut self,
val: impl Into<ScalarMaybeUndef>,
dest: PlaceTy<'tcx>
) -> EvalResult<'tcx>
[src]
pub fn write_scalar(
&mut self,
val: impl Into<ScalarMaybeUndef>,
dest: PlaceTy<'tcx>
) -> 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?
Write a scalar to a place
pub fn write_value(
&mut self,
src_val: Value,
dest: PlaceTy<'tcx>
) -> EvalResult<'tcx>
[src]
pub fn write_value(
&mut self,
src_val: Value,
dest: PlaceTy<'tcx>
) -> 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?
Write a value to a place
fn write_value_to_mplace(
&mut self,
value: Value,
dest: MPlaceTy<'tcx>
) -> EvalResult<'tcx>
[src]
fn write_value_to_mplace(
&mut self,
value: Value,
dest: MPlaceTy<'tcx>
) -> 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?
Write a value to memory
pub fn copy_op(
&mut self,
src: OpTy<'tcx>,
dest: PlaceTy<'tcx>
) -> EvalResult<'tcx>
[src]
pub fn copy_op(
&mut self,
src: OpTy<'tcx>,
dest: PlaceTy<'tcx>
) -> 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?
Copy the data from an operand to a place
pub fn force_allocation(
&mut self,
place: PlaceTy<'tcx>
) -> EvalResult<'tcx, MPlaceTy<'tcx>>
[src]
pub fn force_allocation(
&mut self,
place: PlaceTy<'tcx>
) -> EvalResult<'tcx, MPlaceTy<'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?
Make sure that a place is in memory, and return where it is.
This is essentially force_to_memplace
.
pub fn allocate(
&mut self,
layout: TyLayout<'tcx>,
kind: MemoryKind<M::MemoryKinds>
) -> EvalResult<'tcx, MPlaceTy<'tcx>>
[src]
pub fn allocate(
&mut self,
layout: TyLayout<'tcx>,
kind: MemoryKind<M::MemoryKinds>
) -> EvalResult<'tcx, MPlaceTy<'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_discriminant_index(
&mut self,
variant_index: usize,
dest: PlaceTy<'tcx>
) -> EvalResult<'tcx>
[src]
pub fn write_discriminant_index(
&mut self,
variant_index: usize,
dest: PlaceTy<'tcx>
) -> 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 place_to_op(&self, place: PlaceTy<'tcx>) -> EvalResult<'tcx, OpTy<'tcx>>
[src]
pub fn place_to_op(&self, place: PlaceTy<'tcx>) -> EvalResult<'tcx, OpTy<'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?
Every place can be read from, so we can turm them into an operand
pub(super) fn unpack_dyn_trait(
&self,
mplace: MPlaceTy<'tcx>
) -> EvalResult<'tcx, (Instance<'tcx>, MPlaceTy<'tcx>)>
[src]
pub(super) fn unpack_dyn_trait(
&self,
mplace: MPlaceTy<'tcx>
) -> EvalResult<'tcx, (Instance<'tcx>, MPlaceTy<'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?
Turn a place with a dyn Trait
type into a place with the actual dynamic type.
Also return some more information so drop doesn't have to run the same code twice.
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
pub(super) fn try_read_value_from_mplace(
&self,
mplace: MPlaceTy<'tcx>
) -> EvalResult<'tcx, Option<Value>>
[src]
pub(super) fn try_read_value_from_mplace(
&self,
mplace: MPlaceTy<'tcx>
) -> EvalResult<'tcx, Option<Value>>
🔬 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?
Try reading a value in memory; this is interesting particularily for ScalarPair. Return None if the layout does not permit loading this as a value.
pub(crate) fn try_read_value(
&self,
src: OpTy<'tcx>
) -> EvalResult<'tcx, Result<Value, MemPlace>>
[src]
pub(crate) fn try_read_value(
&self,
src: OpTy<'tcx>
) -> EvalResult<'tcx, Result<Value, MemPlace>>
🔬 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?
Try returning an immediate value for the operand.
If the layout does not permit loading this as a value, return where in memory
we can find the data.
Note that for a given layout, this operation will either always fail or always
succeed! Whether it succeeds depends on whether the layout can be represented
in a Value
, not on which data is stored there currently.
pub fn read_value(&self, op: OpTy<'tcx>) -> EvalResult<'tcx, ValTy<'tcx>>
[src]
pub fn read_value(&self, op: OpTy<'tcx>) -> EvalResult<'tcx, ValTy<'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?
Read a value from a place, asserting that that is possible with the given layout.
pub fn read_scalar(&self, op: OpTy<'tcx>) -> EvalResult<'tcx, ScalarMaybeUndef>
[src]
pub fn read_scalar(&self, op: OpTy<'tcx>) -> EvalResult<'tcx, ScalarMaybeUndef>
🔬 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?
Read a scalar from a place
pub fn read_str(&self, mplace: MPlaceTy<'tcx>) -> EvalResult<'tcx, &str>
[src]
pub fn read_str(&self, mplace: MPlaceTy<'tcx>) -> EvalResult<'tcx, &str>
🔬 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 uninit_operand(
&mut self,
layout: TyLayout<'tcx>
) -> EvalResult<'tcx, Operand>
[src]
pub fn uninit_operand(
&mut self,
layout: TyLayout<'tcx>
) -> EvalResult<'tcx, Operand>
🔬 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 operand_field(
&self,
op: OpTy<'tcx>,
field: u64
) -> EvalResult<'tcx, OpTy<'tcx>>
[src]
pub fn operand_field(
&self,
op: OpTy<'tcx>,
field: u64
) -> EvalResult<'tcx, OpTy<'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?
Projection functions
pub fn operand_downcast(
&self,
op: OpTy<'tcx>,
variant: usize
) -> EvalResult<'tcx, OpTy<'tcx>>
[src]
pub fn operand_downcast(
&self,
op: OpTy<'tcx>,
variant: usize
) -> EvalResult<'tcx, OpTy<'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(super) fn deref_operand(
&self,
src: OpTy<'tcx>
) -> EvalResult<'tcx, MPlaceTy<'tcx>>
[src]
pub(super) fn deref_operand(
&self,
src: OpTy<'tcx>
) -> EvalResult<'tcx, MPlaceTy<'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 operand_projection(
&self,
base: OpTy<'tcx>,
proj_elem: &PlaceElem<'tcx>
) -> EvalResult<'tcx, OpTy<'tcx>>
[src]
pub fn operand_projection(
&self,
base: OpTy<'tcx>,
proj_elem: &PlaceElem<'tcx>
) -> EvalResult<'tcx, OpTy<'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?
fn eval_place_to_op(
&self,
mir_place: &Place<'tcx>,
layout: Option<TyLayout<'tcx>>
) -> EvalResult<'tcx, OpTy<'tcx>>
[src]
fn eval_place_to_op(
&self,
mir_place: &Place<'tcx>,
layout: Option<TyLayout<'tcx>>
) -> EvalResult<'tcx, OpTy<'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 eval_operand(
&self,
mir_op: &Operand<'tcx>,
layout: Option<TyLayout<'tcx>>
) -> EvalResult<'tcx, OpTy<'tcx>>
[src]
pub fn eval_operand(
&self,
mir_op: &Operand<'tcx>,
layout: Option<TyLayout<'tcx>>
) -> EvalResult<'tcx, OpTy<'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?
Evaluate the operand, returning a place where you can then find the data. if you already know the layout, you can save two some table lookups by passing it in here.
pub(super) fn eval_operands(
&self,
ops: &[Operand<'tcx>]
) -> EvalResult<'tcx, Vec<OpTy<'tcx>>>
[src]
pub(super) fn eval_operands(
&self,
ops: &[Operand<'tcx>]
) -> EvalResult<'tcx, Vec<OpTy<'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?
Evaluate a bunch of operands at once
pub(super) fn const_value_to_op(
&self,
val: ConstValue<'tcx>
) -> EvalResult<'tcx, Operand>
[src]
pub(super) fn const_value_to_op(
&self,
val: ConstValue<'tcx>
) -> EvalResult<'tcx, Operand>
🔬 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 const_to_op(&self, cnst: &Const<'tcx>) -> EvalResult<'tcx, OpTy<'tcx>>
[src]
pub fn const_to_op(&self, cnst: &Const<'tcx>) -> EvalResult<'tcx, OpTy<'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(super) fn global_to_op(
&self,
gid: GlobalId<'tcx>
) -> EvalResult<'tcx, Operand>
[src]
pub(super) fn global_to_op(
&self,
gid: GlobalId<'tcx>
) -> EvalResult<'tcx, Operand>
🔬 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_discriminant(
&self,
rval: OpTy<'tcx>
) -> EvalResult<'tcx, (u128, usize)>
[src]
pub fn read_discriminant(
&self,
rval: OpTy<'tcx>
) -> EvalResult<'tcx, (u128, 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?
Read discriminant, return the runtime value as well as the variant index.
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
pub fn binop_with_overflow(
&mut self,
op: BinOp,
left: ValTy<'tcx>,
right: ValTy<'tcx>,
dest: PlaceTy<'tcx>
) -> EvalResult<'tcx>
[src]
pub fn binop_with_overflow(
&mut self,
op: BinOp,
left: ValTy<'tcx>,
right: ValTy<'tcx>,
dest: PlaceTy<'tcx>
) -> 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?
Applies the binary operation op
to the two operands and writes a tuple of the result
and a boolean signifying the potential overflow to the destination.
pub fn binop_ignore_overflow(
&mut self,
op: BinOp,
left: ValTy<'tcx>,
right: ValTy<'tcx>,
dest: PlaceTy<'tcx>
) -> EvalResult<'tcx>
[src]
pub fn binop_ignore_overflow(
&mut self,
op: BinOp,
left: ValTy<'tcx>,
right: ValTy<'tcx>,
dest: PlaceTy<'tcx>
) -> 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?
Applies the binary operation op
to the arguments and writes the result to the
destination.
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
fn binary_char_op(
&self,
bin_op: BinOp,
l: char,
r: char
) -> EvalResult<'tcx, (Scalar, bool)>
[src]
fn binary_char_op(
&self,
bin_op: BinOp,
l: char,
r: char
) -> EvalResult<'tcx, (Scalar, bool)>
🔬 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 binary_bool_op(
&self,
bin_op: BinOp,
l: bool,
r: bool
) -> EvalResult<'tcx, (Scalar, bool)>
[src]
fn binary_bool_op(
&self,
bin_op: BinOp,
l: bool,
r: bool
) -> EvalResult<'tcx, (Scalar, bool)>
🔬 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 binary_float_op(
&self,
bin_op: BinOp,
fty: FloatTy,
l: u128,
r: u128
) -> EvalResult<'tcx, (Scalar, bool)>
[src]
fn binary_float_op(
&self,
bin_op: BinOp,
fty: FloatTy,
l: u128,
r: u128
) -> EvalResult<'tcx, (Scalar, bool)>
🔬 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 binary_int_op(
&self,
bin_op: BinOp,
l: u128,
left_layout: TyLayout<'tcx>,
r: u128,
right_layout: TyLayout<'tcx>
) -> EvalResult<'tcx, (Scalar, bool)>
[src]
fn binary_int_op(
&self,
bin_op: BinOp,
l: u128,
left_layout: TyLayout<'tcx>,
r: u128,
right_layout: TyLayout<'tcx>
) -> EvalResult<'tcx, (Scalar, bool)>
🔬 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 binary_op_val(
&self,
bin_op: BinOp,
left: ValTy<'tcx>,
right: ValTy<'tcx>
) -> EvalResult<'tcx, (Scalar, bool)>
[src]
pub fn binary_op_val(
&self,
bin_op: BinOp,
left: ValTy<'tcx>,
right: ValTy<'tcx>
) -> EvalResult<'tcx, (Scalar, bool)>
🔬 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?
Convenience wrapper that's useful when keeping the layout together with the value.
pub fn binary_op(
&self,
bin_op: BinOp,
left: Scalar,
left_layout: TyLayout<'tcx>,
right: Scalar,
right_layout: TyLayout<'tcx>
) -> EvalResult<'tcx, (Scalar, bool)>
[src]
pub fn binary_op(
&self,
bin_op: BinOp,
left: Scalar,
left_layout: TyLayout<'tcx>,
right: Scalar,
right_layout: TyLayout<'tcx>
) -> EvalResult<'tcx, (Scalar, bool)>
🔬 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?
Returns the result of the specified operation and whether it overflowed.
pub fn unary_op(
&self,
un_op: UnOp,
val: Scalar,
layout: TyLayout<'tcx>
) -> EvalResult<'tcx, Scalar>
[src]
pub fn unary_op(
&self,
un_op: UnOp,
val: Scalar,
layout: TyLayout<'tcx>
) -> EvalResult<'tcx, Scalar>
🔬 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>> EvalContext<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
pub fn inc_step_counter_and_detect_loops(&mut self) -> EvalResult<'tcx, ()>
[src]
pub fn inc_step_counter_and_detect_loops(&mut self) -> 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 run(&mut self) -> EvalResult<'tcx>
[src]
pub fn run(&mut self) -> 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?
fn step(&mut self) -> EvalResult<'tcx, bool>
[src]
fn step(&mut self) -> EvalResult<'tcx, bool>
🔬 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?
Returns true as long as there are more things to do.
fn statement(&mut self, stmt: &Statement<'tcx>) -> EvalResult<'tcx>
[src]
fn statement(&mut self, stmt: &Statement<'tcx>) -> 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?
fn eval_rvalue_into_place(
&mut self,
rvalue: &Rvalue<'tcx>,
place: &Place<'tcx>
) -> EvalResult<'tcx>
[src]
fn eval_rvalue_into_place(
&mut self,
rvalue: &Rvalue<'tcx>,
place: &Place<'tcx>
) -> 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?
Evaluate an assignment statement.
There is no separate eval_rvalue
function. Instead, the code for handling each rvalue
type writes its results directly into the memory specified by the place.
fn terminator(&mut self, terminator: &Terminator<'tcx>) -> EvalResult<'tcx>
[src]
fn terminator(&mut self, terminator: &Terminator<'tcx>) -> 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>> EvalContext<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
pub fn goto_block(&mut self, target: Option<BasicBlock>) -> EvalResult<'tcx>
[src]
pub fn goto_block(&mut self, target: Option<BasicBlock>) -> 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(super) fn eval_terminator(
&mut self,
terminator: &Terminator<'tcx>
) -> EvalResult<'tcx>
[src]
pub(super) fn eval_terminator(
&mut self,
terminator: &Terminator<'tcx>
) -> 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?
fn check_argument_compat(caller: TyLayout<'tcx>, callee: TyLayout<'tcx>) -> bool
[src]
fn check_argument_compat(caller: TyLayout<'tcx>, callee: TyLayout<'tcx>) -> bool
🔬 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 pass_argument(
&mut self,
skip_zst: bool,
caller_arg: &mut impl Iterator<Item = OpTy<'tcx>>,
callee_arg: PlaceTy<'tcx>
) -> EvalResult<'tcx>
[src]
fn pass_argument(
&mut self,
skip_zst: bool,
caller_arg: &mut impl Iterator<Item = OpTy<'tcx>>,
callee_arg: PlaceTy<'tcx>
) -> 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?
Pass a single argument, checking the types for compatibility.
fn eval_fn_call(
&mut self,
instance: Instance<'tcx>,
span: Span,
caller_abi: Abi,
args: &[OpTy<'tcx>],
dest: Option<PlaceTy<'tcx>>,
ret: Option<BasicBlock>
) -> EvalResult<'tcx>
[src]
fn eval_fn_call(
&mut self,
instance: Instance<'tcx>,
span: Span,
caller_abi: Abi,
args: &[OpTy<'tcx>],
dest: Option<PlaceTy<'tcx>>,
ret: Option<BasicBlock>
) -> 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?
Call this function -- pushing the stack frame and initializing the arguments.
fn drop_in_place(
&mut self,
place: PlaceTy<'tcx>,
instance: Instance<'tcx>,
span: Span,
target: BasicBlock
) -> EvalResult<'tcx>
[src]
fn drop_in_place(
&mut self,
place: PlaceTy<'tcx>,
instance: Instance<'tcx>,
span: Span,
target: BasicBlock
) -> 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>> EvalContext<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
pub fn get_vtable(
&mut self,
ty: Ty<'tcx>,
trait_ref: PolyTraitRef<'tcx>
) -> EvalResult<'tcx, Pointer>
[src]
pub fn get_vtable(
&mut self,
ty: Ty<'tcx>,
trait_ref: PolyTraitRef<'tcx>
) -> 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?
Creates a dynamic vtable for the given type and vtable origin. This is used only for objects.
The trait_ref
encodes the erased self type. Hence if we are
making an object Foo<Trait>
from a value of type Foo<T>
, then
trait_ref
would map T:Trait
.
pub fn read_drop_type_from_vtable(
&self,
vtable: Pointer
) -> EvalResult<'tcx, (Instance<'tcx>, Ty<'tcx>)>
[src]
pub fn read_drop_type_from_vtable(
&self,
vtable: Pointer
) -> EvalResult<'tcx, (Instance<'tcx>, Ty<'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?
Return the drop fn instance as well as the actual dynamic type
pub fn read_size_and_align_from_vtable(
&self,
vtable: Pointer
) -> EvalResult<'tcx, (Size, Align)>
[src]
pub fn read_size_and_align_from_vtable(
&self,
vtable: Pointer
) -> EvalResult<'tcx, (Size, Align)>
🔬 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>> EvalContext<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
fn validate_scalar(
&self,
value: ScalarMaybeUndef,
size: Size,
scalar: &Scalar,
path: &Vec<PathElem>,
ty: Ty
) -> EvalResult<'tcx>
[src]
fn validate_scalar(
&self,
value: ScalarMaybeUndef,
size: Size,
scalar: &Scalar,
path: &Vec<PathElem>,
ty: Ty
) -> 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 validate_operand(
&self,
dest: OpTy<'tcx>,
path: &mut Vec<PathElem>,
seen: &mut FxHashSet<OpTy<'tcx>>,
todo: &mut Vec<(OpTy<'tcx>, Vec<PathElem>)>
) -> EvalResult<'tcx>
[src]
pub fn validate_operand(
&self,
dest: OpTy<'tcx>,
path: &mut Vec<PathElem>,
seen: &mut FxHashSet<OpTy<'tcx>>,
todo: &mut Vec<(OpTy<'tcx>, Vec<PathElem>)>
) -> 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?
This function checks the data at op
.
It will error if the bits at the destination do not match the ones described by the layout.
The path
may be pushed to, but the part that is present when the function
starts must not be changed!
fn aggregate_field_path_elem(
&self,
ty: Ty<'tcx>,
variant: usize,
field: usize
) -> PathElem
[src]
fn aggregate_field_path_elem(
&self,
ty: Ty<'tcx>,
variant: usize,
field: usize
) -> PathElem
🔬 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>> EvalContext<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
pub fn emulate_intrinsic(
&mut self,
instance: Instance<'tcx>,
args: &[OpTy<'tcx>],
dest: PlaceTy<'tcx>
) -> EvalResult<'tcx, bool>
[src]
pub fn emulate_intrinsic(
&mut self,
instance: Instance<'tcx>,
args: &[OpTy<'tcx>],
dest: PlaceTy<'tcx>
) -> EvalResult<'tcx, bool>
🔬 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?
Returns whether emulation happened.
pub fn hook_fn(
&mut self,
instance: Instance<'tcx>,
args: &[OpTy<'tcx>],
dest: Option<PlaceTy<'tcx>>
) -> EvalResult<'tcx, bool>
[src]
pub fn hook_fn(
&mut self,
instance: Instance<'tcx>,
args: &[OpTy<'tcx>],
dest: Option<PlaceTy<'tcx>>
) -> EvalResult<'tcx, bool>
🔬 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?
"Intercept" a function call because we have something special to do for it. Returns whether an intercept happened.
Trait Implementations
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> HasDataLayout for &'a EvalContext<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> HasDataLayout for &'a EvalContext<'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?
impl<'a, 'mir, 'tcx, M> HasTyCtxt<'tcx> for &'a EvalContext<'a, 'mir, 'tcx, M> where
M: Machine<'mir, 'tcx>,
[src]
impl<'a, 'mir, 'tcx, M> HasTyCtxt<'tcx> for &'a EvalContext<'a, 'mir, 'tcx, M> where
M: Machine<'mir, 'tcx>,
fn tcx<'b>(&'b self) -> TyCtxt<'b, 'tcx, 'tcx>
[src]
fn tcx<'b>(&'b self) -> TyCtxt<'b, '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?
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> LayoutOf for &'a EvalContext<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> LayoutOf for &'a EvalContext<'a, 'mir, 'tcx, M>
type Ty = Ty<'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?
type TyLayout = EvalResult<'tcx, TyLayout<'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?
fn layout_of(self, ty: Ty<'tcx>) -> Self::TyLayout
[src]
fn layout_of(self, ty: Ty<'tcx>) -> Self::TyLayout
🔬 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?
Auto Trait Implementations
impl<'a, 'mir, 'tcx, M> !Send for EvalContext<'a, 'mir, 'tcx, M>
impl<'a, 'mir, 'tcx, M> !Send for EvalContext<'a, 'mir, 'tcx, M>
impl<'a, 'mir, 'tcx, M> !Sync for EvalContext<'a, 'mir, 'tcx, M>
impl<'a, 'mir, 'tcx, M> !Sync for EvalContext<'a, 'mir, 'tcx, M>
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow(&self) -> &T
[src]
fn borrow(&self) -> &T
Immutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<E> SpecializationError for E
[src]
impl<E> SpecializationError for E
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized,
[src]
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized,
🔬 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?
Create an error for a missing method specialization. Defaults to panicking with type, trait & method names. S
is the encoder/decoder state type, T
is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more
impl<T> Erased for T
[src]
impl<T> Erased for T
impl<T> Send for T where
T: ?Sized,
[src]
impl<T> Send for T where
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
impl<T> Sync for T where
T: ?Sized,
impl<T> Erased for T
impl<T> Erased for T
impl<T> MaybeResult for T
[src]
impl<T> MaybeResult for T
fn from_ok(x: T) -> T
[src]
fn from_ok(x: T) -> T
🔬 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 map_same<F>(self, f: F) -> T where
F: FnOnce(T) -> T,
[src]
fn map_same<F>(self, f: F) -> T where
F: FnOnce(T) -> T,
🔬 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, T> Captures for T where
T: ?Sized,
[src]
impl<'a, T> Captures for T where
T: ?Sized,