pub struct FunctionBody {
pub entry_block: BlockId,
pub blocks: IndexMap<BlockId, BasicBlock>,
pub locals: Vec<LocalVariable>,
pub cranelift_func: Option<CraneliftFunction>,
/* private fields */
}Fields§
§entry_block: BlockId§blocks: IndexMap<BlockId, BasicBlock>§locals: Vec<LocalVariable>§cranelift_func: Option<CraneliftFunction>Implementations§
Source§impl FunctionBody
impl FunctionBody
pub fn new() -> Self
pub fn create_block(&mut self) -> BlockId
pub fn get_block(&self, id: BlockId) -> Option<&BasicBlock>
pub fn get_block_mut(&mut self, id: BlockId) -> Option<&mut BasicBlock>
pub fn entry_block(&self) -> BlockId
pub fn add_local(&mut self, var: LocalVariable) -> LocalId
Trait Implementations§
Source§impl Clone for FunctionBody
impl Clone for FunctionBody
Source§fn clone(&self) -> FunctionBody
fn clone(&self) -> FunctionBody
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FunctionBody
impl Debug for FunctionBody
Source§impl Default for FunctionBody
impl Default for FunctionBody
Source§impl<'de> Deserialize<'de> for FunctionBody
impl<'de> Deserialize<'de> for FunctionBody
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 FunctionBody
impl RefUnwindSafe for FunctionBody
impl Send for FunctionBody
impl Sync for FunctionBody
impl Unpin for FunctionBody
impl UnsafeUnpin for FunctionBody
impl UnwindSafe for FunctionBody
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