Skip to main content

Module interpret

Module interpret 

Source
Expand description

An interpreter for MIR used in CTFE and by miri.

Re-exportsΒ§

use std::io::Read; πŸ”’
use std::io::Write; πŸ”’
use std::num::NonZero; πŸ”’
use std::fmt; πŸ”’
use std::io; πŸ”’
use rustc_abi::AddressSpace; πŸ”’
use rustc_abi::Align; πŸ”’
use rustc_abi::Endian; πŸ”’
use rustc_abi::HasDataLayout; πŸ”’
use rustc_abi::Size; πŸ”’
use rustc_ast::Mutability; πŸ”’
use rustc_data_structures::fx::FxHashMap; πŸ”’
use rustc_data_structures::sharded::ShardedHashMap; πŸ”’
use rustc_data_structures::sync::AtomicU64; πŸ”’
use rustc_data_structures::sync::Lock; πŸ”’
use rustc_hir::def::DefKind; πŸ”’
use rustc_hir::def_id::DefId; πŸ”’
use rustc_hir::def_id::LocalDefId; πŸ”’
use rustc_macros::StableHash; πŸ”’
use rustc_macros::TyDecodable; πŸ”’
use rustc_macros::TyEncodable; πŸ”’
use rustc_macros::TypeFoldable; πŸ”’
use rustc_macros::TypeVisitable; πŸ”’
use rustc_serialize::Decodable; πŸ”’
use rustc_serialize::Encodable; πŸ”’
use rustc_span::bug; πŸ”’
use tracing::debug; πŸ”’
use tracing::trace; πŸ”’
pub use err_exhaust;
pub use err_inval;
pub use err_machine_stop;
pub use err_ub;
pub use err_ub_format;
pub use err_unsup;
pub use err_unsup_format;
pub use throw_exhaust;
pub use throw_inval;
pub use throw_machine_stop;
pub use throw_ub;
pub use throw_ub_format;
pub use throw_unsup;
pub use throw_unsup_format;
pub use self::allocation::AllocBytes;
pub use self::allocation::AllocError;
pub use self::allocation::AllocInit;
pub use self::allocation::AllocRange;
pub use self::allocation::AllocResult;
pub use self::allocation::Allocation;
pub use self::allocation::ConstAllocation;
pub use self::allocation::InitChunk;
pub use self::allocation::InitChunkIter;
pub use self::allocation::alloc_range;
pub use self::error::BadBytesAccess;
pub use self::error::CheckAlignMsg;
pub use self::error::CheckInAllocMsg;
pub use self::error::ErrorHandled;
pub use self::error::EvalStaticInitializerRawResult;
pub use self::error::EvalToAllocationRawResult;
pub use self::error::EvalToConstValueResult;
pub use self::error::EvalToValTreeResult;
pub use self::error::InterpErrorInfo;
pub use self::error::InterpErrorKind;
pub use self::error::InterpResult;
pub use self::error::InvalidMetaKind;
pub use self::error::InvalidProgramInfo;
pub use self::error::MachineStopType;
pub use self::error::Misalignment;
pub use self::error::ReportedErrorInfo;
pub use self::error::ResourceExhaustionInfo;
pub use self::error::UndefinedBehaviorInfo;
pub use self::error::UnsupportedOpInfo;
pub use self::error::ValTreeCreationError;
pub use self::error::interp_ok;
pub use self::pointer::CtfeProvenance;
pub use self::pointer::Pointer;
pub use self::pointer::PointerArithmetic;
pub use self::pointer::Provenance;
pub use self::value::Scalar;
use crate::mir; πŸ”’
use crate::ty::codec::TyDecoder; πŸ”’
use crate::ty::codec::TyEncoder; πŸ”’
use crate::ty::print::with_no_trimmed_paths; πŸ”’
use crate::ty::print::with_no_trimmed_paths; πŸ”’
use crate::ty; πŸ”’
use crate::ty::Instance; πŸ”’
use crate::ty::Ty; πŸ”’
use crate::ty::TyCtxt; πŸ”’

ModulesΒ§

allocation πŸ”’
The virtual memory representation of the MIR interpreter.
error πŸ”’
pointer πŸ”’
queries πŸ”’
value πŸ”’

StructsΒ§

AllocDecodingSession
AllocDecodingState
AllocId
AllocMap πŸ”’
GlobalId
Uniquely identifies one of the following:

EnumsΒ§

AllocDiscriminant πŸ”’
GlobalAlloc
An allocation in the global (tcx-managed) memory can be either a function pointer, a static, or a β€œreal” allocation with some data in it.
State πŸ”’

ConstantsΒ§

CTFE_ALLOC_SALT

FunctionsΒ§

read_target_uint
specialized_encode_alloc_id
write_target_uint