pub enum Statement {
Emit(Range<Expression>),
Store {
pointer: Handle<Expression>,
value: Handle<Expression>,
},
If {
condition: Handle<Expression>,
accept: Block,
reject: Block,
},
Loop {
body: Block,
continuing: Block,
break_if: Option<Handle<Expression>>,
},
Call {
function: Handle<Function>,
arguments: Vec<Handle<Expression>>,
result: Option<Handle<Expression>>,
},
Atomic {
pointer: Handle<Expression>,
fun: AtomicFunction,
value: Handle<Expression>,
result: Option<Handle<Expression>>,
},
Break,
Continue,
Return {
value: Option<Handle<Expression>>,
},
Barrier(Barrier),
}Expand description
A statement in the IR.
Statements have side effects and/or control flow. They operate on expressions referenced by handles.
Variants§
Emit(Range<Expression>)
Mark a range of expressions as producing live values.
Store
Write a value through a pointer.
If
Conditional branch.
Loop
Unified loop construct (handles for/while/loop).
Call
Call a function.
Atomic
Perform an atomic operation.
Fields
§
pointer: Handle<Expression>§
fun: AtomicFunction§
value: Handle<Expression>§
result: Option<Handle<Expression>>Break
Break out of the innermost loop.
Continue
Continue to the next iteration of the innermost loop.
Return
Return from the function.
Fields
§
value: Option<Handle<Expression>>Barrier(Barrier)
Synchronization barrier.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Statement
impl RefUnwindSafe for Statement
impl Send for Statement
impl Sync for Statement
impl Unpin for Statement
impl UnsafeUnpin for Statement
impl UnwindSafe for Statement
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