pub struct BlockVec<'a> { /* private fields */ }
Expand description
A block decomposition of a given bytecode sequence. This is a non-overlapping decomponsition of single instructions into instruction blocks.
Implementations§
source§impl<'a> BlockVec<'a>
impl<'a> BlockVec<'a>
pub fn new(insns: &'a [Instruction]) -> Self
sourcepub fn insns(&self) -> &'a [Instruction]
pub fn insns(&self) -> &'a [Instruction]
Return the underlying instruction sequence for this block vector.
sourcepub fn get(&self, index: usize) -> &'a [Instruction]
pub fn get(&self, index: usize) -> &'a [Instruction]
Get the ith block within this decomposition.
sourcepub fn lookup_insn(&self, index: usize) -> usize
pub fn lookup_insn(&self, index: usize) -> usize
Determine which block encloses a given instruction (as determined by its instruction offset).
Trait Implementations§
source§impl<'a> From<BlockVec<'a>> for BlockGraph<'a>
impl<'a> From<BlockVec<'a>> for BlockGraph<'a>
source§impl<'a> Index<usize> for BlockVec<'a>
impl<'a> Index<usize> for BlockVec<'a>
source§fn index(&self, index: usize) -> &'a [Instruction]
fn index(&self, index: usize) -> &'a [Instruction]
Used for indexing operations (e.g. seq[i]
, etc)
§type Output = [Instruction]
type Output = [Instruction]
The returned type after indexing.
source§impl<'a> PartialEq for BlockVec<'a>
impl<'a> PartialEq for BlockVec<'a>
source§impl<'a> Seq for BlockVec<'a>
impl<'a> Seq for BlockVec<'a>
impl<'a> StructuralPartialEq for BlockVec<'a>
Auto Trait Implementations§
impl<'a> Freeze for BlockVec<'a>
impl<'a> RefUnwindSafe for BlockVec<'a>
impl<'a> Send for BlockVec<'a>
impl<'a> Sync for BlockVec<'a>
impl<'a> Unpin for BlockVec<'a>
impl<'a> UnwindSafe for BlockVec<'a>
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