pub enum WasmBlock<'a> {
Block {
body: Vec<WasmBlock<'a>>,
out: Block,
},
Loop {
body: Vec<WasmBlock<'a>>,
header: Block,
},
Leaf {
block: Block,
},
Br {
target: WasmLabel,
},
If {
cond: Value,
if_true: Vec<WasmBlock<'a>>,
if_false: Vec<WasmBlock<'a>>,
},
Select {
selector: Value,
targets: Vec<WasmLabel>,
default: WasmLabel,
},
BlockParams {
from: &'a [Value],
to: &'a [(Type, Value)],
},
Return {
values: &'a [Value],
},
ReturnCall {
func: Func,
values: &'a [Value],
},
ReturnCallIndirect {
sig: Signature,
table: Table,
values: &'a [Value],
},
ReturnCallRef {
sig: Signature,
values: &'a [Value],
},
Unreachable,
}
Variants§
Block
A Wasm block that has the given contents and whose label jumps to the given CFG block exit.
Loop
A Wasm loop that has the given contents and whose label jumps to the given CFG block header.
Leaf
A leaf node: one CFG block.
Br
A translated unconditional branch.
If
A translated conditional.
Select
A translated select (switch).
BlockParams
Blockparam transfer.
Return
A function return instruction.
ReturnCall
A function tail call instruction
ReturnCallIndirect
A function indirect tail call instruction
ReturnCallRef
A function refernce tail call instruction
Unreachable
An unreachable instruction.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for WasmBlock<'a>
impl<'a> RefUnwindSafe for WasmBlock<'a>
impl<'a> Send for WasmBlock<'a>
impl<'a> Sync for WasmBlock<'a>
impl<'a> Unpin for WasmBlock<'a>
impl<'a> UnwindSafe for WasmBlock<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more