Struct rustc_mir::interpret::EvalContext
[−]
[src]
pub struct EvalContext<'a, 'mir, 'tcx: 'a + 'mir, M: Machine<'mir, 'tcx>> { pub machine: M, pub tcx: TyCtxtAt<'a, 'tcx, 'tcx>, pub param_env: ParamEnv<'tcx>, pub memory: Memory<'a, 'mir, 'tcx, M>, // 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
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.
Methods
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 fn alloc_ptr(&mut self, ty: Ty<'tcx>) -> EvalResult<'tcx, MemoryPointer>
[src]
pub fn alloc_ptr(&mut self, ty: Ty<'tcx>) -> 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 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 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 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(&self, ty: Ty<'tcx>, substs: &'tcx Substs<'tcx>) -> Ty<'tcx>
[src]
pub fn monomorphize(&self, ty: Ty<'tcx>, substs: &'tcx Substs<'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?
pub fn size_and_align_of_dst(
&mut self,
ty: Ty<'tcx>,
value: Value
) -> EvalResult<'tcx, (Size, Align)>
[src]
pub fn size_and_align_of_dst(
&mut self,
ty: Ty<'tcx>,
value: Value
) -> 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 size and aligment of the value at the given type. Note that the value does not matter if the type is sized. For unsized types, the value has to be a fat pointer, and we only care about the "extra" data in it.
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 fn deallocate_local(&mut self, local: Option<Value>) -> EvalResult<'tcx>
[src]
pub fn deallocate_local(&mut self, local: Option<Value>) -> 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 eval_operand(
&mut self,
op: &Operand<'tcx>
) -> EvalResult<'tcx, ValTy<'tcx>>
[src]
pub fn eval_operand(
&mut self,
op: &Operand<'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?
pub fn read_discriminant_value(
&mut self,
place: Place,
ty: Ty<'tcx>
) -> EvalResult<'tcx, u128>
[src]
pub fn read_discriminant_value(
&mut self,
place: Place,
ty: Ty<'tcx>
) -> EvalResult<'tcx, 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 read_global_as_value(
&self,
gid: GlobalId<'tcx>,
ty: Ty<'tcx>
) -> EvalResult<'tcx, Value>
[src]
pub fn read_global_as_value(
&self,
gid: GlobalId<'tcx>,
ty: Ty<'tcx>
) -> 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 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 force_allocation(&mut self, place: Place) -> EvalResult<'tcx, Place>
[src]
pub fn force_allocation(&mut self, place: Place) -> EvalResult<'tcx, 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 follow_by_ref_value(
&self,
value: Value,
ty: Ty<'tcx>
) -> EvalResult<'tcx, Value>
[src]
pub fn follow_by_ref_value(
&self,
value: Value,
ty: Ty<'tcx>
) -> 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?
ensures this Value is not a ByRef
pub fn value_to_primval(
&self,
ValTy { value: value, ty: ty }: ValTy<'tcx>
) -> EvalResult<'tcx, PrimVal>
[src]
pub fn value_to_primval(
&self,
ValTy { value: value, ty: ty }: ValTy<'tcx>
) -> 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_ptr(
&mut self,
dest: Place,
val: Pointer,
dest_ty: Ty<'tcx>
) -> EvalResult<'tcx>
[src]
pub fn write_ptr(
&mut self,
dest: Place,
val: Pointer,
dest_ty: 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?
pub fn write_primval(
&mut self,
dest: Place,
val: PrimVal,
dest_ty: Ty<'tcx>
) -> EvalResult<'tcx>
[src]
pub fn write_primval(
&mut self,
dest: Place,
val: PrimVal,
dest_ty: 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?
pub fn write_value(
&mut self,
ValTy { value: src_val, ty: dest_ty }: ValTy<'tcx>,
dest: Place
) -> EvalResult<'tcx>
[src]
pub fn write_value(
&mut self,
ValTy { value: src_val, ty: dest_ty }: ValTy<'tcx>,
dest: Place
) -> 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_value_to_ptr(
&mut self,
value: Value,
dest: Pointer,
dest_align: Align,
dest_ty: Ty<'tcx>
) -> EvalResult<'tcx>
[src]
pub fn write_value_to_ptr(
&mut self,
value: Value,
dest: Pointer,
dest_align: Align,
dest_ty: 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?
pub fn ty_to_primval_kind(&self, ty: Ty<'tcx>) -> EvalResult<'tcx, PrimValKind>
[src]
pub fn ty_to_primval_kind(&self, ty: Ty<'tcx>) -> EvalResult<'tcx, PrimValKind>
🔬 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_value(
&self,
ptr: Pointer,
align: Align,
ty: Ty<'tcx>
) -> EvalResult<'tcx, Value>
[src]
pub fn read_value(
&self,
ptr: Pointer,
align: Align,
ty: Ty<'tcx>
) -> 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 fn try_read_value(
&self,
ptr: Pointer,
ptr_align: Align,
ty: Ty<'tcx>
) -> EvalResult<'tcx, Option<Value>>
[src]
pub fn try_read_value(
&self,
ptr: Pointer,
ptr_align: Align,
ty: Ty<'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?
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 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_local(&self, place: Place)
[src]
pub fn dump_local(&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 modify_local<F>(
&mut self,
frame: usize,
local: Local,
f: F
) -> EvalResult<'tcx> where
F: FnOnce(&mut Self, Value) -> EvalResult<'tcx, Value>,
[src]
pub fn modify_local<F>(
&mut self,
frame: usize,
local: Local,
f: F
) -> EvalResult<'tcx> where
F: FnOnce(&mut Self, Value) -> 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?
Convenience function to ensure correct usage of locals
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 report(
&self,
e: &mut EvalError,
as_err: bool,
explicit_span: Option<Span>
)
[src]
pub fn report(
&self,
e: &mut EvalError,
as_err: bool,
explicit_span: Option<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: Ty<'tcx>) -> EvalResult<'tcx, u128>
[src]
pub fn sign_extend(&self, value: u128, ty: Ty<'tcx>) -> EvalResult<'tcx, 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: Ty<'tcx>) -> EvalResult<'tcx, u128>
[src]
pub fn truncate(&self, value: u128, ty: Ty<'tcx>) -> EvalResult<'tcx, 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 try_read_place(
&mut self,
place: &Place<'tcx>
) -> EvalResult<'tcx, Option<Value>>
[src]
pub fn try_read_place(
&mut self,
place: &Place<'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?
Reads a value from the place without going through the intermediate step of obtaining
a miri::Place
pub fn read_field(
&self,
base: Value,
variant: Option<usize>,
field: Field,
base_ty: Ty<'tcx>
) -> EvalResult<'tcx, Option<(Value, Ty<'tcx>)>>
[src]
pub fn read_field(
&self,
base: Value,
variant: Option<usize>,
field: Field,
base_ty: Ty<'tcx>
) -> EvalResult<'tcx, Option<(Value, 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?
pub fn read_place(&self, place: Place) -> EvalResult<'tcx, Value>
[src]
pub fn read_place(&self, place: Place) -> 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 fn eval_place(&mut self, mir_place: &Place<'tcx>) -> EvalResult<'tcx, Place>
[src]
pub fn eval_place(&mut self, mir_place: &Place<'tcx>) -> EvalResult<'tcx, 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 place_field(
&mut self,
base: Place,
field: Field,
base_layout: TyLayout<'tcx>
) -> EvalResult<'tcx, (Place, TyLayout<'tcx>)>
[src]
pub fn place_field(
&mut self,
base: Place,
field: Field,
base_layout: TyLayout<'tcx>
) -> EvalResult<'tcx, (Place, 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 fn val_to_place(&self, val: Value, ty: Ty<'tcx>) -> EvalResult<'tcx, Place>
[src]
pub fn val_to_place(&self, val: Value, ty: Ty<'tcx>) -> EvalResult<'tcx, 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 place_index(
&mut self,
base: Place,
outer_ty: Ty<'tcx>,
n: u64
) -> EvalResult<'tcx, Place>
[src]
pub fn place_index(
&mut self,
base: Place,
outer_ty: Ty<'tcx>,
n: u64
) -> EvalResult<'tcx, 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 eval_place_projection(
&mut self,
base: Place,
base_ty: Ty<'tcx>,
proj_elem: &ProjectionElem<'tcx, Local, Ty<'tcx>>
) -> EvalResult<'tcx, Place>
[src]
pub fn eval_place_projection(
&mut self,
base: Place,
base_ty: Ty<'tcx>,
proj_elem: &ProjectionElem<'tcx, Local, Ty<'tcx>>
) -> EvalResult<'tcx, 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 place_ty(&self, place: &Place<'tcx>) -> Ty<'tcx>
[src]
pub fn place_ty(&self, place: &Place<'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?
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 intrinsic_with_overflow(
&mut self,
op: BinOp,
left: ValTy<'tcx>,
right: ValTy<'tcx>,
dest: Place,
dest_ty: Ty<'tcx>
) -> EvalResult<'tcx>
[src]
pub fn intrinsic_with_overflow(
&mut self,
op: BinOp,
left: ValTy<'tcx>,
right: ValTy<'tcx>,
dest: Place,
dest_ty: 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?
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 intrinsic_overflowing(
&mut self,
op: BinOp,
left: ValTy<'tcx>,
right: ValTy<'tcx>,
dest: Place,
dest_ty: Ty<'tcx>
) -> EvalResult<'tcx, bool>
[src]
pub fn intrinsic_overflowing(
&mut self,
op: BinOp,
left: ValTy<'tcx>,
right: ValTy<'tcx>,
dest: Place,
dest_ty: Ty<'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?
Applies the binary operation op
to the arguments and writes the result to the
destination. Returns true
if the operation overflowed.
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 binary_op(
&self,
bin_op: BinOp,
left: PrimVal,
left_ty: Ty<'tcx>,
right: PrimVal,
right_ty: Ty<'tcx>
) -> EvalResult<'tcx, (PrimVal, bool)>
[src]
pub fn binary_op(
&self,
bin_op: BinOp,
left: PrimVal,
left_ty: Ty<'tcx>,
right: PrimVal,
right_ty: Ty<'tcx>
) -> EvalResult<'tcx, (PrimVal, 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: PrimVal,
ty: Ty<'tcx>
) -> EvalResult<'tcx, PrimVal>
[src]
pub fn unary_op(
&self,
un_op: UnOp,
val: PrimVal,
ty: Ty<'tcx>
) -> 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?
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_check_limit(&mut self, n: usize)
[src]
pub fn inc_step_counter_and_check_limit(&mut self, n: 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 step(&mut self) -> EvalResult<'tcx, bool>
[src]
pub 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.
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: BasicBlock)
[src]
pub fn goto_block(&mut self, target: BasicBlock)
🔬 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, MemoryPointer>
[src]
pub fn get_vtable(
&mut self,
ty: Ty<'tcx>,
trait_ref: PolyTraitRef<'tcx>
) -> 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?
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: MemoryPointer
) -> EvalResult<'tcx, Option<Instance<'tcx>>>
[src]
pub fn read_drop_type_from_vtable(
&self,
vtable: MemoryPointer
) -> EvalResult<'tcx, Option<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 read_size_and_align_from_vtable(
&self,
vtable: MemoryPointer
) -> EvalResult<'tcx, (Size, Align)>
[src]
pub fn read_size_and_align_from_vtable(
&self,
vtable: MemoryPointer
) -> 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?
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: Machine<'mir, 'tcx>> HasTyCtxt<'tcx> for &'a EvalContext<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> HasTyCtxt<'tcx> for &'a EvalContext<'a, 'mir, 'tcx, M>
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<Ty<'tcx>> for &'a EvalContext<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> LayoutOf<Ty<'tcx>> for &'a EvalContext<'a, 'mir, 'tcx, M>
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?
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> HasMemory<'a, 'mir, 'tcx, M> for EvalContext<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> HasMemory<'a, 'mir, 'tcx, M> for EvalContext<'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?
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>