Struct cranelift_codegen::ir::jumptable::JumpTableData
source · pub struct JumpTableData { /* private fields */ }
Expand description
Contents of a jump table.
All jump tables use 0-based indexing and are densely populated.
Implementations§
source§impl JumpTableData
impl JumpTableData
sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create a new empty jump table with the specified capacity.
sourcepub fn push_entry(&mut self, dest: Block)
pub fn push_entry(&mut self, dest: Block)
Append a table entry.
sourcepub fn branches_to(&self, block: Block) -> bool
pub fn branches_to(&self, block: Block) -> bool
Checks if any of the entries branch to block
.
sourcepub fn as_mut_slice(&mut self) -> &mut [Block]
pub fn as_mut_slice(&mut self) -> &mut [Block]
Access the whole table as a mutable slice.
Trait Implementations§
source§impl Clone for JumpTableData
impl Clone for JumpTableData
source§fn clone(&self) -> JumpTableData
fn clone(&self) -> JumpTableData
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more