Enum rtlola_frontend::mir::ExpressionKind [−][src]
This enum contains all possible kinds of expressions and their relevant information.
Variants
LoadConstant(Constant)
Load a constant value
ArithLog(ArithLogOp, Vec<Expression>)
Apply an arithmetic or logic operation. The function is monomorphized.
Note: Arguments never need to be coerced. Unary: 1st argument -> operand Binary: 1st argument -> lhs, 2nd argument -> rhs n-ary: kth argument -> kth operand
Access another stream
Fields of StreamAccess
target: StreamReference
The target stream to be accessed
parameters: Vec<Expression>
The parameters of the specific stream instance that is accessed.
If the stream behind target
is not parametrized, this collection is empty.
access_kind: StreamAccessKind
The kind of access
A conditional (if-then-else) expression
Fields of Ite
condition: Box<Expression>
The condition under which either consequence
or alternative
is selected.
consequence: Box<Expression>
The consequence should be evaluated and returned if the condition evaluates to true.
alternative: Box<Expression>
The alternative should be evaluated and returned if the condition evaluates to false.
Tuple(Vec<Expression>)
A tuple expression
TupleAccess(Box<Expression>, usize)
Represents a tuple projections, i.e., it accesses a specific tuple element.
Function(String, Vec<Expression>)
Represents a function call. The function is monomorphized.
Note: Arguments never need to be coerced. Unary: 1st argument -> operand Binary: 1st argument -> lhs, 2nd argument -> rhs n-ary: kth argument -> kth operand
Converting a value to a different type
The result type is indicated in the expression with the Convert
kind.
Fields of Convert
expr: Box<Expression>
The expression that produces a value. The type of the expression indicates the source of the conversion.
Transforms an optional value into a definitive one
Fields of Default
expr: Box<Expression>
The expression that results in an optional value.
default: Box<Expression>
An infallible expression providing the default value if expr
fails to produce a value.
Trait Implementations
impl Clone for ExpressionKind
[src]
fn clone(&self) -> ExpressionKind
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ExpressionKind
[src]
impl PartialEq<ExpressionKind> for ExpressionKind
[src]
fn eq(&self, other: &ExpressionKind) -> bool
[src]
fn ne(&self, other: &ExpressionKind) -> bool
[src]
impl StructuralPartialEq for ExpressionKind
[src]
Auto Trait Implementations
impl RefUnwindSafe for ExpressionKind
impl Send for ExpressionKind
impl Sync for ExpressionKind
impl Unpin for ExpressionKind
impl UnwindSafe for ExpressionKind
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,