roc/compiler/module/src/low_level.rs
2021-01-25 13:20:40 +01:00

71 lines
1.2 KiB
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 {
StrConcat,
StrIsEmpty,
StrStartsWith,
StrEndsWith,
StrSplit,
StrCountGraphemes,
StrFromInt,
ListLen,
ListGetUnsafe,
ListSet,
ListSetInPlace,
ListSingle,
ListRepeat,
ListReverse,
ListConcat,
ListContains,
ListAppend,
ListPrepend,
ListJoin,
ListMap,
ListKeepIf,
ListWalk,
ListWalkBackwards,
ListSum,
DictSize,
DictEmpty,
NumAdd,
NumAddWrap,
NumAddChecked,
NumSub,
NumSubWrap,
NumSubChecked,
NumMul,
NumMulWrap,
NumMulChecked,
NumGt,
NumGte,
NumLt,
NumLte,
NumCompare,
NumDivUnchecked,
NumRemUnchecked,
NumAbs,
NumNeg,
NumSin,
NumCos,
NumSqrtUnchecked,
NumRound,
NumToFloat,
NumPow,
NumCeiling,
NumPowInt,
NumFloor,
NumIsFinite,
NumAtan,
NumAcos,
NumAsin,
NumBitwiseAnd,
NumBitwiseXor,
Eq,
NotEq,
And,
Or,
Not,
Hash,
}