pub struct BasicBlock {
pub vip: Vip,
pub sp_offset: i64,
pub sp_index: u32,
pub last_temporary_index: u32,
pub instructions: Vec<Instruction>,
pub prev_vip: Vec<Vip>,
pub next_vip: Vec<Vip>,
}
Expand description
Basic block containing a linear sequence of VTIL instructions
Fields§
§vip: Vip
The virtual instruction pointer at entry
sp_offset: i64
The stack pointer offset at entry
sp_index: u32
The stack instance index at entry
last_temporary_index: u32
Last temporary index used
instructions: Vec<Instruction>
List of instructions contained in this basic block (in order)
prev_vip: Vec<Vip>
Predecessor basic block entrypoint(s)
next_vip: Vec<Vip>
Successor basic block entrypoint(s)
Implementations§
Source§impl BasicBlock
impl BasicBlock
Sourcepub fn tmp(&mut self, bit_count: i32) -> RegisterDesc
pub fn tmp(&mut self, bit_count: i32) -> RegisterDesc
Allocate a temporary register for this basic block
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Returns if the block is complete: terminated by a branching instruction
Sourcepub fn fork(&mut self, entry: Vip) -> BasicBlock
pub fn fork(&mut self, entry: Vip) -> BasicBlock
Makes a new BasicBlock
connected to the current block, at the specified
instruction pointer
§Panics
Panics if the block is incomplete, or entry
is an invalid instruction
pointer
Trait Implementations§
Source§impl Debug for BasicBlock
impl Debug for BasicBlock
Source§impl SizeWith<BasicBlock> for BasicBlock
impl SizeWith<BasicBlock> for BasicBlock
fn size_with(basic_block: &BasicBlock) -> usize
Source§impl TryFromCtx<'_, Endian> for BasicBlock
impl TryFromCtx<'_, Endian> for BasicBlock
Source§impl TryIntoCtx<Endian> for BasicBlock
impl TryIntoCtx<Endian> for BasicBlock
Auto Trait Implementations§
impl Freeze for BasicBlock
impl RefUnwindSafe for BasicBlock
impl Send for BasicBlock
impl Sync for BasicBlock
impl Unpin for BasicBlock
impl UnwindSafe for BasicBlock
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