pub enum BasicBlockTerminator<'p> {
ConditionalJump {
condition: &'p MemoryReference,
target: &'p Target,
jump_if_condition_zero: bool,
},
Continue,
Jump {
target: &'p Target,
},
Halt,
}
Expand description
The terminator of a basic block, which determines the control flow to the next basic block.
Variants§
Implementations§
Source§impl BasicBlockTerminator<'_>
impl BasicBlockTerminator<'_>
Sourcepub fn is_dynamic(&self) -> bool
pub fn is_dynamic(&self) -> bool
Returns true
if the terminator is dynamic, i.e. JUMP-WHEN
or JUMP-UNLESS
.
Dynamic terminators are those that can change the control flow based on the state of the
program at runtime, as opposed to static terminators like JUMP
and HALT
.
pub fn into_instruction(self) -> Option<Instruction>
Trait Implementations§
Source§impl<'p> Clone for BasicBlockTerminator<'p>
impl<'p> Clone for BasicBlockTerminator<'p>
Source§fn clone(&self) -> BasicBlockTerminator<'p>
fn clone(&self) -> BasicBlockTerminator<'p>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'p> Debug for BasicBlockTerminator<'p>
impl<'p> Debug for BasicBlockTerminator<'p>
Source§impl<'p> Default for BasicBlockTerminator<'p>
impl<'p> Default for BasicBlockTerminator<'p>
Source§fn default() -> BasicBlockTerminator<'p>
fn default() -> BasicBlockTerminator<'p>
Returns the “default value” for a type. Read more
Source§impl<'p> From<&'p BasicBlockTerminatorOwned> for BasicBlockTerminator<'p>
impl<'p> From<&'p BasicBlockTerminatorOwned> for BasicBlockTerminator<'p>
Source§fn from(value: &'p BasicBlockTerminatorOwned) -> Self
fn from(value: &'p BasicBlockTerminatorOwned) -> Self
Converts to this type from the input type.
Source§impl From<BasicBlockTerminator<'_>> for BasicBlockTerminatorOwned
impl From<BasicBlockTerminator<'_>> for BasicBlockTerminatorOwned
Source§fn from(value: BasicBlockTerminator<'_>) -> Self
fn from(value: BasicBlockTerminator<'_>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'p> Freeze for BasicBlockTerminator<'p>
impl<'p> RefUnwindSafe for BasicBlockTerminator<'p>
impl<'p> Send for BasicBlockTerminator<'p>
impl<'p> Sync for BasicBlockTerminator<'p>
impl<'p> Unpin for BasicBlockTerminator<'p>
impl<'p> UnwindSafe for BasicBlockTerminator<'p>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.