Enum timi::machine::MachinePrimOp
[−]
[src]
pub enum MachinePrimOp { Add, Sub, Mul, Div, Negate, G, GEQ, L, LEQ, EQ, NEQ, Construct { tag: DataTag, arity: u32, }, If, CasePair, CaseList, Undef, }
Primitive operations that are implemented directly in the machine
Variants
Add
Add two machine integers
Sub
Subtract two machine integers
Mul
Multiply two machine integers
Div
Divide two machine integers
Negate
Negate a machine integer
G
Compare two integers and return if LHS > RHS
GEQ
Compare two integers and return if LHS >= RHS
L
Compare two integers and return if LHS < RHS
LEQ
Compare two integers and return if LHS >= RHS
EQ
Compare two integers and return if LHS == RHS
NEQ
Compare two integers and return if LHS != RHS
Construct
Construct a complex object which is tagged with DataTag
and takes arity
number of components.
Fields of Construct
tag: DataTag | Tag used to disambiguate between different data objects |
arity: u32 | number of components that the complex object has. |
If
Check a predicate and run the then
or else
clause
CasePair
Explode a tuple and pass the left
and right
components of a tuple to a function
CaseList
Perform case analysis on a list.
Undef
Undefined. Machine will quit on reaching this address. Useful for testing code that should never run
Trait Implementations
impl Clone for MachinePrimOp
[src]
fn clone(&self) -> MachinePrimOp
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for MachinePrimOp
[src]
fn eq(&self, __arg_0: &MachinePrimOp) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &MachinePrimOp) -> bool
This method tests for !=
.