pub enum Op {
Show 54 variants
nop,
store(LocalName),
store_non_local(NonLocalUnmappedName),
load(LocalName),
load_non_local(NonLocalUnmappedName),
attach_ancestors,
swap,
pop,
dup,
call_method(u8),
call_function(u8),
get_attr,
set_attr,
to_string,
fmt_string(u8),
add,
sub,
mul,
div,
mod_,
not,
neg,
or,
and,
bitor,
bitand,
bitxor,
cmp_lt,
cmp_gt,
cmp_eq,
cmp_neq,
cmp_leq,
cmp_geq,
index_get,
index_set,
make_slice,
make_iter,
take_iter(i16),
mklist(u16),
mktuple(u16),
mkset(u16),
mkdict(u16),
push_int(i32),
push_float(f32),
push_bool(bool),
push_const(GlobalConstantDescriptor),
push_const_clone(GlobalConstantDescriptor),
push_global_default(GlobalConstantDescriptor),
push_unit,
jmp(i16),
cond_jmp(i16),
ret,
sh,
debug(DebugSpanDescriptor),
}
Expand description
An operation on the technetium virtual machine
Variants
nop
Do nothing
store(LocalName)
Store the object on the top of the stack in a local variable
store_non_local(NonLocalUnmappedName)
Store the object on the top of the stack in a local variable in a different frame
load(LocalName)
Load an object from a local variable
load_non_local(NonLocalUnmappedName)
Load an object from a local variable in a different frame
attach_ancestors
Special for functions: Attach the current least_ancestor
swap
Swap the top 2 objects on the stack
pop
Pop the top of the stack
dup
Create a shallow (reference) copy of the top of the stack
call_method(u8)
Call the method of the (n + 2)nd object on the stack, with arguments the n top objects on the stack
call_function(u8)
Read the (n + 1)th object on the stack as a function object, and call it with arguments the n top objects on the stack
get_attr
Get an attribute of an object, reading the top as an attribute and the 2nd to top as the object
set_attr
to_string
fmt_string(u8)
add
sub
mul
div
mod_
not
neg
or
and
bitor
bitand
bitxor
cmp_lt
cmp_gt
cmp_eq
cmp_neq
cmp_leq
cmp_geq
index_get
index_set
make_slice
make_iter
Transform the object on the top of the stack into an interator object
take_iter(i16)
Take the next element from the iterator on top of the stack. Jump if empty
mklist(u16)
Take the top n elements of the stack and put them in a list
mktuple(u16)
mkset(u16)
mkdict(u16)
push_int(i32)
push_float(f32)
push_bool(bool)
push_const(GlobalConstantDescriptor)
Push a constant referred to by a global constant descriptor
push_const_clone(GlobalConstantDescriptor)
Push a constant referred to by a global constant descriptor, and make a deep clone
push_global_default(GlobalConstantDescriptor)
Push a constant built in object / default (see: standard)
push_unit
jmp(i16)
Jump to a relative offset in the instructions
cond_jmp(i16)
Jump if the top of the stack is truthy
ret
Return the top of the stack from the current function
sh
Launch as a subprocess the string on the top of the stack
debug(DebugSpanDescriptor)
Attach a debug reference to the next instruction in case it errors
Trait Implementations
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more