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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.