Struct cranelift_codegen::ir::jumptable::JumpTableData [−][src]
pub struct JumpTableData { /* fields omitted */ }Contents of a jump table.
All jump tables use 0-based indexing and are expected to be densely populated. They don't need to be completely populated, though. Individual entries can be missing.
Methods
impl JumpTableData[src]
impl JumpTableDatapub fn new() -> Self[src]
pub fn new() -> SelfCreate a new empty jump table.
pub fn with_capacity(capacity: usize) -> Self[src]
pub fn with_capacity(capacity: usize) -> SelfCreate a new empty jump table with the specified capacity.
pub fn len(&self) -> usize[src]
pub fn len(&self) -> usizeGet the number of table entries.
pub fn set_entry(&mut self, idx: usize, dest: Ebb)[src]
pub fn set_entry(&mut self, idx: usize, dest: Ebb)Set a table entry.
The table will grow as needed to fit idx.
pub fn push_entry(&mut self, dest: Ebb)[src]
pub fn push_entry(&mut self, dest: Ebb)Append a table entry.
pub fn clear_entry(&mut self, idx: usize)[src]
pub fn clear_entry(&mut self, idx: usize)Clear a table entry.
The br_table instruction will fall through if given an index corresponding to a cleared
table entry.
pub fn get_entry(&self, idx: usize) -> Option<Ebb>[src]
pub fn get_entry(&self, idx: usize) -> Option<Ebb>Get the entry for idx, or None.
ⓘImportant traits for Entries<'a>pub fn entries(&self) -> Entries[src]
pub fn entries(&self) -> EntriesEnumerate over all (idx, dest) pairs in the table in order.
This returns an iterator that skips any empty slots in the table.
pub fn branches_to(&self, ebb: Ebb) -> bool[src]
pub fn branches_to(&self, ebb: Ebb) -> boolChecks if any of the entries branch to ebb.
pub fn as_mut_slice(&mut self) -> &mut [PackedOption<Ebb>][src]
pub fn as_mut_slice(&mut self) -> &mut [PackedOption<Ebb>]Access the whole table as a mutable slice.
Trait Implementations
impl Clone for JumpTableData[src]
impl Clone for JumpTableDatafn clone(&self) -> JumpTableData[src]
fn clone(&self) -> JumpTableDataReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Display for JumpTableData[src]
impl Display for JumpTableDataAuto Trait Implementations
impl Send for JumpTableData
impl Send for JumpTableDataimpl Sync for JumpTableData
impl Sync for JumpTableData