pub enum Instruction {
Show 40 variants
IConst(f64),
INeg(InstructionI),
INot(InstructionI),
IInv(InstructionI),
IAdd(InstructionI, IC),
IMul(InstructionI, IC),
IMod {
dividend: IC,
divisor: IC,
},
IExp {
base: IC,
power: IC,
},
ILT(IC, IC),
ILTE(IC, IC),
IEQ(IC, IC),
INE(IC, IC),
IGTE(IC, IC),
IGT(IC, IC),
IOR(InstructionI, IC),
IAND(InstructionI, IC),
IVar(String),
IFunc {
name: String,
args: Vec<IC>,
},
IFuncInt(InstructionI),
IFuncCeil(InstructionI),
IFuncFloor(InstructionI),
IFuncAbs(InstructionI),
IFuncSign(InstructionI),
IFuncLog {
base: IC,
of: IC,
},
IFuncRound {
modulus: IC,
of: IC,
},
IFuncMin(InstructionI, IC),
IFuncMax(InstructionI, IC),
IFuncSin(InstructionI),
IFuncCos(InstructionI),
IFuncTan(InstructionI),
IFuncASin(InstructionI),
IFuncACos(InstructionI),
IFuncATan(InstructionI),
IFuncSinH(InstructionI),
IFuncCosH(InstructionI),
IFuncTanH(InstructionI),
IFuncASinH(InstructionI),
IFuncACosH(InstructionI),
IFuncATanH(InstructionI),
IPrintFunc(PrintFunc),
}
Expand description
An Instruction
is an optimized AST node resulting from compilation.
Variants§
IConst(f64)
INeg(InstructionI)
INot(InstructionI)
IInv(InstructionI)
IAdd(InstructionI, IC)
IMul(InstructionI, IC)
IMod
IExp
ILT(IC, IC)
ILTE(IC, IC)
IEQ(IC, IC)
INE(IC, IC)
IGTE(IC, IC)
IGT(IC, IC)
IOR(InstructionI, IC)
IAND(InstructionI, IC)
IVar(String)
IFunc
IFuncInt(InstructionI)
IFuncCeil(InstructionI)
IFuncFloor(InstructionI)
IFuncAbs(InstructionI)
IFuncSign(InstructionI)
IFuncLog
IFuncRound
IFuncMin(InstructionI, IC)
IFuncMax(InstructionI, IC)
IFuncSin(InstructionI)
IFuncCos(InstructionI)
IFuncTan(InstructionI)
IFuncASin(InstructionI)
IFuncACos(InstructionI)
IFuncATan(InstructionI)
IFuncSinH(InstructionI)
IFuncCosH(InstructionI)
IFuncTanH(InstructionI)
IFuncASinH(InstructionI)
IFuncACosH(InstructionI)
IFuncATanH(InstructionI)
IPrintFunc(PrintFunc)
Trait Implementations§
Source§impl Debug for Instruction
impl Debug for Instruction
Source§impl Default for Instruction
impl Default for Instruction
Source§impl Evaler for Instruction
impl Evaler for Instruction
Source§impl PartialEq for Instruction
impl PartialEq for Instruction
impl StructuralPartialEq for Instruction
Auto Trait Implementations§
impl Freeze for Instruction
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnwindSafe for Instruction
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