pub struct BlockDef {
pub insts: Vec<Value>,
pub terminator: Terminator,
pub succs: Vec<Block>,
pub pos_in_succ_pred: Vec<usize>,
pub preds: Vec<Block>,
pub pos_in_pred_succ: Vec<usize>,
pub params: Vec<(Type, Value)>,
pub desc: String,
}
Fields§
§insts: Vec<Value>
Instructions in this block.
terminator: Terminator
Terminator: branch or return.
succs: Vec<Block>
Successor blocks.
pos_in_succ_pred: Vec<usize>
For each successor block, our index in its preds
array.
preds: Vec<Block>
Predecessor blocks.
pos_in_pred_succ: Vec<usize>
For each predecessor block, our index in its succs
array.
params: Vec<(Type, Value)>
Type and Value for each blockparam.
desc: String
Descriptive name for the block, if any.
Trait Implementations§
Source§impl Block<FunctionBody> for BlockDef
impl Block<FunctionBody> for BlockDef
type Terminator = Terminator
fn term(&self) -> &Self::Terminator
fn term_mut(&mut self) -> &mut Self::Terminator
Source§impl Block<FunctionBody> for BlockDef
impl Block<FunctionBody> for BlockDef
fn insts(&self) -> impl Iterator<Item = <FunctionBody as Func>::Value>
fn add_inst( func: &mut FunctionBody, key: <FunctionBody as Func>::Block, v: <FunctionBody as Func>::Value, )
Source§impl<'de> Deserialize<'de> for BlockDef
impl<'de> Deserialize<'de> for BlockDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BlockDef
impl RefUnwindSafe for BlockDef
impl Send for BlockDef
impl Sync for BlockDef
impl Unpin for BlockDef
impl UnwindSafe for BlockDef
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more