Implement a poor man's jump table.
We will eventually support real jump tables, but for now just expand br_table into a sequence of conditional branches.
This commit is contained in:
@@ -39,6 +39,11 @@ impl JumpTableData {
|
||||
}
|
||||
}
|
||||
|
||||
/// Get the number of table entries.
|
||||
pub fn len(&self) -> usize {
|
||||
self.table.len()
|
||||
}
|
||||
|
||||
/// Set a table entry.
|
||||
///
|
||||
/// The table will grow as needed to fit `idx`.
|
||||
|
||||
Reference in New Issue
Block a user