Update docs for BrTable.
This commit is contained in:
parent
6647bc4090
commit
4ea0aee6f4
10
src/isa.rs
10
src/isa.rs
|
@ -111,9 +111,15 @@ pub enum Instruction {
|
|||
BrIfEqz(Target),
|
||||
BrIfNez(Target),
|
||||
|
||||
/// Last one is the default.
|
||||
/// br_table [t1 t2 t3 .. tn] tdefault
|
||||
///
|
||||
/// Can be less than zero.
|
||||
/// Pops the value from the stack. Then this value is used as an index
|
||||
/// to the branch table.
|
||||
///
|
||||
/// However, the last target represents the default target. So if the index
|
||||
/// is greater than length of the branch table, then the last index will be used.
|
||||
///
|
||||
/// Validation ensures that there should be at least one target.
|
||||
BrTable(Box<[Target]>),
|
||||
|
||||
Unreachable,
|
||||
|
|
Loading…
Reference in New Issue