Skip to main content

Opcode

Enum Opcode 

Source
#[repr(u8)]
pub enum Opcode {
Show 82 variants ZERO = 0, PUSH_CONST = 1, PUSH_NIL = 2, PUSH_FALSE = 3, PUSH_TRUE = 4, PUSH_IMM = 5, POP = 6, LOAD_LOCAL = 7, STORE_LOCAL = 8, LOAD_UPVALUE = 9, STORE_UPVALUE = 10, LOAD_INDEX = 11, STORE_INDEX = 12, LOAD_INDEX_IMM = 13, STORE_INDEX_IMM = 14, LOAD_STRUCT_FIELD = 15, STORE_STRUCT_FIELD = 16, LOAD_PKG_FIELD = 17, STORE_PKG_FIELD = 18, LOAD_FIELD = 19, STORE_FIELD = 20, STORE_DEREF = 21, BIND_METHOD = 22, BIND_INTERFACE_METHOD = 23, CAST = 24, ADD = 25, SUB = 26, MUL = 27, QUO = 28, REM = 29, AND = 30, OR = 31, XOR = 32, SHL = 33, SHR = 34, AND_NOT = 35, UNARY_ADD = 36, UNARY_SUB = 37, UNARY_XOR = 38, REF_LOCAL = 39, REF_UPVALUE = 40, REF_SLICE_MEMBER = 41, REF_STRUCT_FIELD = 42, REF_PKG_MEMBER = 43, REF_LITERAL = 44, DEREF = 45, SEND = 46, RECV = 47, NOT = 48, EQL = 49, LSS = 50, GTR = 51, NEQ = 52, LEQ = 53, GEQ = 54, PRE_CALL = 55, CALL = 56, RETURN = 57, JUMP = 58, JUMP_IF = 59, JUMP_IF_NOT = 60, SWITCH = 61, SELECT = 62, LOOP = 63, RANGE_INIT = 64, RANGE = 65, TYPE_ASSERT = 66, TYPE = 67, IMPORT = 68, SLICE = 69, SLICE_FULL = 70, LITERAL = 71, NEW = 72, MAKE = 73, LEN = 74, CAP = 75, APPEND = 76, CLOSE = 77, PANIC = 78, RECOVER = 79, ASSERT = 80, FFI = 81,
}

Variants§

§

ZERO = 0

§

PUSH_CONST = 1

§

PUSH_NIL = 2

§

PUSH_FALSE = 3

§

PUSH_TRUE = 4

§

PUSH_IMM = 5

§

POP = 6

§

LOAD_LOCAL = 7

§

STORE_LOCAL = 8

§

LOAD_UPVALUE = 9

§

STORE_UPVALUE = 10

§

LOAD_INDEX = 11

§

STORE_INDEX = 12

§

LOAD_INDEX_IMM = 13

§

STORE_INDEX_IMM = 14

§

LOAD_STRUCT_FIELD = 15

§

STORE_STRUCT_FIELD = 16

§

LOAD_PKG_FIELD = 17

§

STORE_PKG_FIELD = 18

§

LOAD_FIELD = 19

§

STORE_FIELD = 20

§

STORE_DEREF = 21

§

BIND_METHOD = 22

§

BIND_INTERFACE_METHOD = 23

§

CAST = 24

§

ADD = 25

§

SUB = 26

§

MUL = 27

§

QUO = 28

§

REM = 29

§

AND = 30

§

OR = 31

§

XOR = 32

§

SHL = 33

§

SHR = 34

§

AND_NOT = 35

§

UNARY_ADD = 36

§

UNARY_SUB = 37

§

UNARY_XOR = 38

§

REF_LOCAL = 39

§

REF_UPVALUE = 40

§

REF_SLICE_MEMBER = 41

§

REF_STRUCT_FIELD = 42

§

REF_PKG_MEMBER = 43

§

REF_LITERAL = 44

§

DEREF = 45

§

SEND = 46

§

RECV = 47

§

NOT = 48

§

EQL = 49

§

LSS = 50

§

GTR = 51

§

NEQ = 52

§

LEQ = 53

§

GEQ = 54

§

PRE_CALL = 55

§

CALL = 56

§

RETURN = 57

§

JUMP = 58

§

JUMP_IF = 59

§

JUMP_IF_NOT = 60

§

SWITCH = 61

§

SELECT = 62

§

LOOP = 63

§

RANGE_INIT = 64

§

RANGE = 65

§

TYPE_ASSERT = 66

§

TYPE = 67

§

IMPORT = 68

§

SLICE = 69

§

SLICE_FULL = 70

§

LITERAL = 71

§

NEW = 72

§

MAKE = 73

§

LEN = 74

§

CAP = 75

§

APPEND = 76

§

CLOSE = 77

§

PANIC = 78

§

RECOVER = 79

§

ASSERT = 80

§

FFI = 81

Implementations§

Source§

impl Opcode

Source

pub fn offset(&self, base: Opcode) -> OpIndex

Source

pub fn property(&self) -> (&str, i8)

Source

pub fn text(&self) -> &str

Trait Implementations§

Source§

impl Clone for Opcode

Source§

fn clone(&self) -> Opcode

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for Opcode

Source§

impl Debug for Opcode

Source§

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

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

impl Display for Opcode

Source§

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

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

impl Eq for Opcode

Source§

impl Hash for Opcode

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Opcode

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Opcode

Auto Trait Implementations§

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Slottable for T
where T: Copy,

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V