pub enum RegTerm {
Fallthrough,
Br {
target_block: u32,
values: Vec<Reg>,
},
BrIf {
cond: Reg,
target_block: u32,
values: Vec<Reg>,
},
BrIfNull {
value: Reg,
target_block: u32,
values: Vec<Reg>,
},
BrIfNonNull {
value: Reg,
target_block: u32,
values: Vec<Reg>,
},
IfFork {
cond: Reg,
then_block: u32,
else_block: u32,
},
BrTable {
index: Reg,
targets: Vec<u32>,
default: u32,
values: Vec<Reg>,
},
Return {
values: Vec<Reg>,
},
Trap,
}Expand description
A block terminator — how execution leaves this block.
Variants§
Fallthrough
Fall through to the next block in sequence.
Br
Branch to a target block, passing values.
BrIf
Conditional branch: if cond is non-zero, branch; otherwise fall through.
BrIfNull
br_on_null: branch when the reference value is null.
BrIfNonNull
br_on_non_null: branch when the reference value is non-null,
forwarding it (as the last branch value) to the target.
IfFork
Two-way fork: if cond is non-zero, go to then_block; else to else_block.
BrTable
Multi-target dispatch (br_table): branch to targets[i] when the
index value equals i, or to default when out of range.
Return
Return from the function with values.
Trap
Unconditional trap (unreachable).
Trait Implementations§
impl StructuralPartialEq for RegTerm
Auto Trait Implementations§
impl Freeze for RegTerm
impl RefUnwindSafe for RegTerm
impl Send for RegTerm
impl Sync for RegTerm
impl Unpin for RegTerm
impl UnsafeUnpin for RegTerm
impl UnwindSafe for RegTerm
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