Expand description
Main evaluator loop and setting up the initial stack frame.
Re-exportsΒ§
use std::ffi::OsStr;πuse std::ffi::OsString;πuse std::num::NonZeroI32;πuse std::panic;πuse std::panic::AssertUnwindSafe;πuse std::path::PathBuf;πuse std::rc::Rc;πuse std::task::Poll;πuse std::iter;πuse std::mem;πuse std::thread;πuse rustc_abi::ExternAbi;πuse rustc_data_structures::fx::FxHashMap;πuse rustc_data_structures::fx::FxHashSet;πuse rustc_errors::FatalErrorMarker;πuse rustc_hir::def::Namespace;πuse rustc_hir::def_id::DefId;πuse rustc_hir::def_id::LOCAL_CRATE;πuse rustc_hir_analysis::check::check_function_signature;πuse rustc_middle::middle::exported_symbols::ExportedSymbol;πuse rustc_middle::traits::ObligationCause;πuse rustc_middle::traits::ObligationCauseCode;πuse rustc_middle::ty::layout::HasTyCtxt;πuse rustc_middle::ty::layout::HasTypingEnv;πuse rustc_middle::ty::layout::LayoutCx;πuse rustc_middle::ty;πuse rustc_middle::ty::Ty;πuse rustc_middle::ty::TyCtxt;πuse rustc_session::config::EntryFnType;πuse rustc_target::spec::Os;πuse crate::concurrency::GenmcCtx;πuse crate::diagnostics::report_leaks;πuse crate::helpers::is_no_core;πuse crate::shims::global_ctor;πuse crate::shims::tls;πuse crate::*;π
StructsΒ§
- Miri
Config - Configuration needed to spawn a Miri instance.
- Program
Exit Handler - A state machine thatβs run when the program is exiting.
EnumsΒ§
- Exit
Type - Main
Thread πState - The state of the main thread. Implementation detail of
on_main_stack_empty. - Miri
Entry FnType - Program
Exit πState
ConstantsΒ§
- THREAD_
YIELDS_ πAT_ EXIT - When the program exits, we will yield to any other thread that is ready to execute.
But we must only do that a finite number of times, or a background thread running
loop {}will hang the program.
FunctionsΒ§
- args_
to_ πutf16_ command_ string - Turns an array of arguments into a Windows command line string.
- call_
main π - create_
ecx - Returns a freshly created
InterpCx. Public because this is also used bypriroda. - entry_
fn - Finds the entry point Miri should execute.
- eval_
entry - Evaluates the entry function specified by
entry_id. ReturnsOk(())if program execution completed with exit code 0. ReturnsErr(code)if an evaluation error occurred or the program returned a non-0 exit code.