pub enum Operation<'a> {
Show 14 variants
Invalid,
Dfg,
Cfg,
Block,
DefineFunc(&'a Symbol<'a>),
DeclareFunc(&'a Symbol<'a>),
Custom(TermId),
DefineAlias(&'a Symbol<'a>, TermId),
DeclareAlias(&'a Symbol<'a>),
TailLoop,
Conditional,
DeclareConstructor(&'a Symbol<'a>),
DeclareOperation(&'a Symbol<'a>),
Import {
name: &'a str,
},
}
Expand description
Operations that nodes can perform.
See ast::Operation
for the AST representation.
Variants§
Invalid
Invalid operation to be used as a placeholder. This is useful for modules that have non-contiguous node ids, or modules that have not yet been fully constructed.
Dfg
Data flow graphs.
Cfg
Control flow graphs.
Block
Basic blocks in a control flow graph.
DefineFunc(&'a Symbol<'a>)
Function definitions.
DeclareFunc(&'a Symbol<'a>)
Function declarations.
Custom(TermId)
Custom operation.
DefineAlias(&'a Symbol<'a>, TermId)
Alias definitions.
DeclareAlias(&'a Symbol<'a>)
Alias declarations.
TailLoop
Tail controlled loop. Nodes with this operation contain a dataflow graph that is executed in a loop. The loop body is executed at least once, producing a result that indicates whether to continue the loop or return the result.
§Port Types
- Inputs:
inputs
+rest
- Outputs:
outputs
+rest
- Sources:
inputs
+rest
- Targets:
(adt [inputs outputs])
+rest
Conditional
DeclareConstructor(&'a Symbol<'a>)
Declaration for a term constructor.
Nodes with this operation must be within a module region.
DeclareOperation(&'a Symbol<'a>)
Declaration for a operation.
Nodes with this operation must be within a module region.
Import
Import a symbol.
Implementations§
Trait Implementations§
impl<'a> Eq for Operation<'a>
impl<'a> StructuralPartialEq for Operation<'a>
Auto Trait Implementations§
impl<'a> Freeze for Operation<'a>
impl<'a> RefUnwindSafe for Operation<'a>
impl<'a> Send for Operation<'a>
impl<'a> Sync for Operation<'a>
impl<'a> Unpin for Operation<'a>
impl<'a> UnwindSafe for Operation<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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>
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>
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