Skip to main content

OpCode

Enum OpCode 

Source
#[repr(u8)]
pub enum OpCode {
Show 66 variants Nop = 0, LoadK = 1, LoadNil = 2, LoadBool = 3, LoadInt = 4, Move = 5, NewList = 6, NewMap = 7, NewRecord = 8, NewUnion = 9, NewTuple = 10, NewSet = 11, GetField = 16, SetField = 17, GetIndex = 18, SetIndex = 19, GetTuple = 20, Add = 32, Sub = 33, Mul = 34, Div = 35, Mod = 36, Pow = 37, Neg = 38, Concat = 39, FloorDiv = 46, BitOr = 40, BitAnd = 41, BitXor = 42, BitNot = 43, Shl = 44, Shr = 45, Eq = 48, Lt = 49, Le = 50, Not = 51, And = 52, Or = 53, In = 54, Is = 55, NullCo = 56, Test = 57, Jmp = 64, Call = 65, TailCall = 66, Return = 67, Halt = 68, Loop = 69, ForPrep = 70, ForLoop = 71, ForIn = 72, Break = 73, Continue = 74, Intrinsic = 80, Closure = 81, GetUpval = 82, SetUpval = 83, ToolCall = 96, Schema = 97, Emit = 98, TraceRef = 99, Await = 100, Spawn = 101, Append = 112, IsVariant = 113, Unbox = 114,
}
Expand description

Opcodes for the Lumen register VM. Hex values match SPEC section 40.2.

Variants§

§

Nop = 0

§

LoadK = 1

§

LoadNil = 2

§

LoadBool = 3

§

LoadInt = 4

§

Move = 5

§

NewList = 6

§

NewMap = 7

§

NewRecord = 8

§

NewUnion = 9

§

NewTuple = 10

§

NewSet = 11

§

GetField = 16

§

SetField = 17

§

GetIndex = 18

§

SetIndex = 19

§

GetTuple = 20

§

Add = 32

§

Sub = 33

§

Mul = 34

§

Div = 35

§

Mod = 36

§

Pow = 37

§

Neg = 38

§

Concat = 39

§

FloorDiv = 46

§

BitOr = 40

§

BitAnd = 41

§

BitXor = 42

§

BitNot = 43

§

Shl = 44

§

Shr = 45

§

Eq = 48

§

Lt = 49

§

Le = 50

§

Not = 51

§

And = 52

§

Or = 53

§

In = 54

§

Is = 55

§

NullCo = 56

§

Test = 57

§

Jmp = 64

§

Call = 65

§

TailCall = 66

§

Return = 67

§

Halt = 68

§

Loop = 69

§

ForPrep = 70

§

ForLoop = 71

§

ForIn = 72

§

Break = 73

§

Continue = 74

§

Intrinsic = 80

§

Closure = 81

§

GetUpval = 82

§

SetUpval = 83

§

ToolCall = 96

§

Schema = 97

§

Emit = 98

§

TraceRef = 99

§

Await = 100

§

Spawn = 101

§

Append = 112

§

IsVariant = 113

§

Unbox = 114

Trait Implementations§

Source§

impl Clone for OpCode

Source§

fn clone(&self) -> OpCode

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OpCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for OpCode

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for OpCode

Source§

fn eq(&self, other: &OpCode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for OpCode

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Copy for OpCode

Source§

impl Eq for OpCode

Source§

impl StructuralPartialEq for OpCode

Auto Trait Implementations§

§

impl Freeze for OpCode

§

impl RefUnwindSafe for OpCode

§

impl Send for OpCode

§

impl Sync for OpCode

§

impl Unpin for OpCode

§

impl UnwindSafe for OpCode

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,