#[repr(u8)]
pub enum Opcode {
Show 131 variants POP_TOP, ROT_TWO, ROT_THREE, DUP_TOP, DUP_TOP2, ROT_FOUR, NOP, UNARY_POSITIVE, UNARY_NEGATIVE, UNARY_NOT, UNARY_INVERT, BINARY_MATRIX_MULTIPLY, INPLACE_MATRIX_MULTIPLY, BINARY_POWER, BINARY_MULTIPLY, BINARY_MODULO, BINARY_ADD, BINARY_SUBTRACT, BINARY_SUBSCR, BINARY_TRUE_DIVIDE, INPLACE_FLOOR_DIVIDE, INPLACE_TRUE_DIVIDE, GET_LEN, MATCH_MAPPING, MATCH_SEQUENCE, MATCH_KEYS, PUSH_EXC_INFO, CHECK_EXC_MATCH, CHECK_EG_MATCH, WITH_EXCEPT_START, GET_AITER, GET_ANEXT, BEFORE_ASYNC_WITH, BEFORE_WITH, END_ASYNC_FOR, INPLACE_ADD, INPLACE_SUBTRACT, INPLACE_MULTIPLY, INPLACE_MODULO, STORE_SUBSCR, BINARY_AND, BINARY_XOR, BINARY_OR, GET_ITER, GET_YIELD_FROM_ITER, PRINT_EXPR, LOAD_BUILD_CLASS, LOAD_ASSERTION_ERROR, LIST_TO_TUPLE, RETURN_VALUE, POP_BLOCK, POP_EXCEPT, STORE_NAME, DELETE_NAME, UNPACK_SEQUENCE, FOR_ITER, UNPACK_EX, STORE_ATTR, STORE_GLOBAL, LOAD_CONST, LOAD_NAME, BUILD_TUPLE, BUILD_LIST, BUILD_SET, BUILD_MAP, LOAD_ATTR, COMPARE_OP, IMPORT_NAME, IMPORT_FROM, JUMP_FORWARD, JUMP_IF_FALSE_OR_POP, JUMP_IF_TRUE_OR_POP, JUMP_ABSOLUTE, POP_JUMP_IF_FALSE, POP_JUMP_IF_TRUE, LOAD_GLOBAL, IS_OP, CONTAINS_OP, RERAISE, LOAD_FAST, STORE_FAST, DELETE_FAST, RAISE_VARARGS, CALL_FUNCTION, MAKE_FUNCTION, LOAD_CLOSURE, LOAD_DEREF, STORE_DEREF, CALL_FUNCTION_KW, CALL_FUNCTION_EX, SETUP_WITH, LOAD_METHOD, CALL_METHOD, LIST_EXTEND, ERG_POP_NTH, ERG_PEEK_NTH, ERG_INC, ERG_DEC, ERG_LOAD_FAST_IMMUT, ERG_STORE_FAST_IMMUT, ERG_MOVE_FAST, ERG_CLONE_FAST, ERG_COPY_FAST, ERG_REF_FAST, ERG_REF_MUT_FAST, ERG_MOVE_OUTER, ERG_CLONE_OUTER, ERG_COPY_OUTER, ERG_REF_OUTER, ERG_REF_MUT_OUTER, ERG_LESS_THAN, ERG_LESS_EQUAL, ERG_EQUAL, ERG_NOT_EQUAL, ERG_MAKE_SLOT, ERG_MAKE_TYPE, ERG_MAKE_PURE_FUNCTION, ERG_CALL_PURE_FUNCTION, ERG_LOAD_EMPTY_SLOT, ERG_LOAD_EMPTY_STR, ERG_LOAD_1_NAT, ERG_LOAD_1_INT, ERG_LOAD_1_REAL, ERG_LOAD_NONE, ERG_MUTATE, ERG_STORE_SUBSCR, ERG_BINARY_SUBSCR, ERG_BINARY_RANGE, ERG_TRY_BINARY_DIVIDE, ERG_BINARY_TRUE_DIVIDE, NOT_IMPLEMENTED,
}
Expand description

Based on Python opcodes. This is represented by u8.

TODO: implement all opcodes

Variants

POP_TOP

ROT_TWO

ROT_THREE

DUP_TOP

DUP_TOP2

ROT_FOUR

NOP

UNARY_POSITIVE

UNARY_NEGATIVE

UNARY_NOT

UNARY_INVERT

BINARY_MATRIX_MULTIPLY

INPLACE_MATRIX_MULTIPLY

BINARY_POWER

BINARY_MULTIPLY

BINARY_MODULO

BINARY_ADD

BINARY_SUBTRACT

BINARY_SUBSCR

BINARY_TRUE_DIVIDE

INPLACE_FLOOR_DIVIDE

INPLACE_TRUE_DIVIDE

GET_LEN

MATCH_MAPPING

MATCH_SEQUENCE

MATCH_KEYS

PUSH_EXC_INFO

CHECK_EXC_MATCH

CHECK_EG_MATCH

WITH_EXCEPT_START

GET_AITER

GET_ANEXT

BEFORE_ASYNC_WITH

BEFORE_WITH

END_ASYNC_FOR

INPLACE_ADD

INPLACE_SUBTRACT

INPLACE_MULTIPLY

INPLACE_MODULO

STORE_SUBSCR

BINARY_AND

BINARY_XOR

BINARY_OR

GET_ITER

GET_YIELD_FROM_ITER

PRINT_EXPR

LOAD_BUILD_CLASS

LOAD_ASSERTION_ERROR

LIST_TO_TUPLE

RETURN_VALUE

POP_BLOCK

POP_EXCEPT

STORE_NAME

DELETE_NAME

UNPACK_SEQUENCE

FOR_ITER

UNPACK_EX

STORE_ATTR

STORE_GLOBAL

LOAD_CONST

LOAD_NAME

BUILD_TUPLE

BUILD_LIST

BUILD_SET

BUILD_MAP

LOAD_ATTR

COMPARE_OP

IMPORT_NAME

IMPORT_FROM

JUMP_FORWARD

JUMP_IF_FALSE_OR_POP

JUMP_IF_TRUE_OR_POP

JUMP_ABSOLUTE

POP_JUMP_IF_FALSE

POP_JUMP_IF_TRUE

LOAD_GLOBAL

IS_OP

CONTAINS_OP

RERAISE

LOAD_FAST

STORE_FAST

DELETE_FAST

RAISE_VARARGS

CALL_FUNCTION

MAKE_FUNCTION

LOAD_CLOSURE

LOAD_DEREF

STORE_DEREF

CALL_FUNCTION_KW

CALL_FUNCTION_EX

SETUP_WITH

LOAD_METHOD

CALL_METHOD

LIST_EXTEND

ERG_POP_NTH

ERG_PEEK_NTH

ERG_INC

ERG_DEC

ERG_LOAD_FAST_IMMUT

ERG_STORE_FAST_IMMUT

ERG_MOVE_FAST

ERG_CLONE_FAST

ERG_COPY_FAST

ERG_REF_FAST

ERG_REF_MUT_FAST

ERG_MOVE_OUTER

ERG_CLONE_OUTER

ERG_COPY_OUTER

ERG_REF_OUTER

ERG_REF_MUT_OUTER

ERG_LESS_THAN

ERG_LESS_EQUAL

ERG_EQUAL

ERG_NOT_EQUAL

ERG_MAKE_SLOT

ERG_MAKE_TYPE

ERG_MAKE_PURE_FUNCTION

ERG_CALL_PURE_FUNCTION

ERG_LOAD_EMPTY_SLOT

ERG_LOAD_EMPTY_STR

ERG_LOAD_1_NAT

ERG_LOAD_1_INT

ERG_LOAD_1_REAL

ERG_LOAD_NONE

ERG_MUTATE

ERG_STORE_SUBSCR

[] = (it doesn’t cause any exceptions)

ERG_BINARY_SUBSCR

= [] (it doesn’t cause any exceptions)

ERG_BINARY_RANGE

ERG_TRY_BINARY_DIVIDE

/? (rhs may be 0, it may cause a runtime panic)

ERG_BINARY_TRUE_DIVIDE

/ (rhs could not be 0, it doesn’t cause any exceptions)

NOT_IMPLEMENTED

Implementations

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
Converts to this type from the input type.
This method returns an Ordering between self and other. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method tests greater than or equal to (for self and other) and is used by the >= operator. 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
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.