roc/compiler/module/src/low_level.rs
2020-06-23 19:31:50 -04:00

32 lines
623 B
Rust

/// Low-level operations that get translated directly into e.g. LLVM instructions.
/// These are always wrapped when exposed to end users, and can only make it
/// into an Expr when added directly by can::builtins
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum LowLevel {
ListLen,
ListGetUnsafe,
ListSet,
ListSetInPlace,
ListIsEmpty,
NumAdd,
NumSub,
NumMul,
NumGt,
NumGte,
NumLt,
NumLte,
NumDivUnchecked,
NumRemUnchecked,
NumAbs,
NumNeg,
NumSin,
NumCos,
NumSqrt,
NumRound,
NumToFloat,
Eq,
NotEq,
And,
Or,
Not,
}