Struct rustc_mir::interpret::eval_context::InfiniteLoopDetector [−][src]
pub(crate) struct InfiniteLoopDetector<'a, 'mir, 'tcx: 'a + 'mir, M: Machine<'mir, 'tcx>> { hashes: FxHashSet<u64>, snapshots: FxHashSet<(M, Vec<Frame<'mir, 'tcx>>, 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?
Fields
hashes: FxHashSet<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?
The set of all EvalSnapshot
hashes observed by this detector.
When a collision occurs in this table, we store the full snapshot in
snapshots
.
snapshots: FxHashSet<(M, Vec<Frame<'mir, 'tcx>>, 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 set of all EvalSnapshot
s observed by this detector.
An EvalSnapshot
will only be fully cloned once it has caused a
collision in hashes
. As a result, the detector must observe at least
two full cycles of an infinite loop before it triggers.
Methods
impl<'a, 'mir, 'tcx, M> InfiniteLoopDetector<'a, 'mir, 'tcx, M> where
M: Machine<'mir, 'tcx>,
'tcx: 'a + 'mir,
[src]
impl<'a, 'mir, 'tcx, M> InfiniteLoopDetector<'a, 'mir, 'tcx, M> where
M: Machine<'mir, 'tcx>,
'tcx: 'a + 'mir,
pub fn is_empty(&self) -> bool
[src]
pub fn is_empty(&self) -> 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
if the loop detector has not yet observed a snapshot.
pub fn observe_and_analyze(
&mut self,
machine: &M,
stack: &Vec<Frame<'mir, 'tcx>>,
memory: &Memory<'a, 'mir, 'tcx, M>
) -> EvalResult<'tcx, ()>
[src]
pub fn observe_and_analyze(
&mut self,
machine: &M,
stack: &Vec<Frame<'mir, 'tcx>>,
memory: &Memory<'a, 'mir, 'tcx, M>
) -> 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> Default for InfiniteLoopDetector<'a, 'mir, 'tcx, M> where
M: Machine<'mir, 'tcx>,
'tcx: 'a + 'mir,
[src]
impl<'a, 'mir, 'tcx, M> Default for InfiniteLoopDetector<'a, 'mir, 'tcx, M> where
M: Machine<'mir, 'tcx>,
'tcx: 'a + 'mir,
Auto Trait Implementations
impl<'a, 'mir, 'tcx, M> !Send for InfiniteLoopDetector<'a, 'mir, 'tcx, M>
impl<'a, 'mir, 'tcx, M> !Send for InfiniteLoopDetector<'a, 'mir, 'tcx, M>
impl<'a, 'mir, 'tcx, M> !Sync for InfiniteLoopDetector<'a, 'mir, 'tcx, M>
impl<'a, 'mir, 'tcx, M> !Sync for InfiniteLoopDetector<'a, 'mir, 'tcx, M>