pub enum StmtKind<'a, E: ExprNode> {
Assignment {
lhs: Ident,
size: Option<usize>,
rhs: E,
},
LoadAssignment {
load: LoadNode<'a, E>,
size: Option<usize>,
rhs: E,
},
RangeAssignment {
range: RangeNode<E>,
size: Option<usize>,
rhs: E,
},
Label(Cow<'a, str>),
Branch {
target: TargetNode<'a, E>,
},
ConditionalBranch {
condition: E,
target: TargetNode<'a, E>,
},
BranchIndirect {
target: E,
},
Call {
target: TargetNode<'a, E>,
},
CallIndirect {
target: E,
},
Return {
target: E,
},
Expression(E),
Internal(&'static str),
}Expand description
The shape of one statement. See AstNode for the meaning of each
variant.
Variants§
Assignment
lhs = rhs.
Fields
§
rhs: EThe value.
LoadAssignment
*[space]:size ptr = rhs.
Fields
§
rhs: EThe value.
RangeAssignment
value[start, size] = rhs.
Fields
§
rhs: EThe value.
Label(Cow<'a, str>)
<name>.
Branch
goto target.
Fields
§
target: TargetNode<'a, E>Where.
ConditionalBranch
if condition goto target.
BranchIndirect
goto [target].
Fields
§
target: EThe address.
Call
call target.
Fields
§
target: TargetNode<'a, E>Where.
CallIndirect
call [target].
Fields
§
target: EThe address.
Return
return [target].
Fields
§
target: EThe address.
Expression(E)
An expression evaluated for its effect.
Internal(&'static str)
A statement that has no place in a consumer-form AST: build,
delayslot, export, or a deferred build. The passes reject it
with PcodeLowerError::InternalNode.
Trait Implementations§
Auto Trait Implementations§
impl<'a, E> Freeze for StmtKind<'a, E>
impl<'a, E> RefUnwindSafe for StmtKind<'a, E>where
E: RefUnwindSafe,
LoadNode<'a, E>: RefUnwindSafe,
RangeNode<E>: RefUnwindSafe,
TargetNode<'a, E>: RefUnwindSafe,
impl<'a, E> Send for StmtKind<'a, E>
impl<'a, E> Sync for StmtKind<'a, E>
impl<'a, E> Unpin for StmtKind<'a, E>
impl<'a, E> UnsafeUnpin for StmtKind<'a, E>where
E: UnsafeUnpin,
LoadNode<'a, E>: UnsafeUnpin,
RangeNode<E>: UnsafeUnpin,
TargetNode<'a, E>: UnsafeUnpin,
impl<'a, E> UnwindSafe for StmtKind<'a, E>where
E: UnwindSafe,
LoadNode<'a, E>: UnwindSafe,
RangeNode<E>: UnwindSafe,
TargetNode<'a, E>: UnwindSafe,
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