Skip to main content

NyarOpcode

Enum NyarOpcode 

Source
#[repr(u8)]
pub enum NyarOpcode {
Show 81 variants Nop = 0, Push = 1, Pop = 2, Dup = 3, Swap = 4, LoadLocal = 5, StoreLocal = 6, LoadGlobal = 7, StoreGlobal = 8, LoadUpvalue = 9, StoreUpvalue = 10, CloseUpvalues = 11, Jump = 12, JumpIfFalse = 13, JumpIfTrue = 14, JumpIfNull = 15, PushNone = 16, Return = 19, MakeClosure = 21, Call = 32, CallVirtual = 33, CallDynamic = 34, CallClosure = 35, InvokeMethod = 36, CallSymbol = 37, FFICall = 240, TailCall = 20, TailCallClosure = 22, GetField = 48, SetField = 49, NewObject = 50, NewArray = 51, GetElement = 52, SetElement = 53, MakeTuple = 54, HasKey = 55, MatchVariant = 56, SizeOf = 57, NewDynObject = 58, RemoveKey = 59, NewList = 60, PushElementLeft = 61, PopElementLeft = 62, PushElementRight = 63, PopElementRight = 64, TypeOf = 65, InstanceOf = 66, CheckCast = 67, Cast = 68, Initiate = 69, Finalize = 70, Perform = 80, WithHandler = 81, ResumeWith = 82, CaptureCont = 83, Await = 84, BlockOn = 85, MatchEffect = 86, GetWitnessTable = 96, WitnessMethod = 97, OpenExistential = 98, CloseExistential = 99, Quote = 112, Splice = 113, Eval = 114, ExpandMacro = 115, NewChannel = 87, SendChannel = 88, RecvChannel = 89, SelectChannel = 90, NewQuery = 91, QueryExec = 92, NewClock = 93, ClockWait = 94, I32Ext = 193, I64Ext = 194, F32Ext = 195, F64Ext = 196, BigIntExt = 197, StringExt = 198, Halt = 255,
}
Expand description

Nyar 操作码枚举

Variants§

§

Nop = 0

无操作

§

Push = 1

入栈

§

Pop = 2

出栈

§

Dup = 3

复制栈顶

§

Swap = 4

交换栈顶

§

LoadLocal = 5

加载局部变量

§

StoreLocal = 6

存储局部变量

§

LoadGlobal = 7

加载全局变量

§

StoreGlobal = 8

存储全局变量

§

LoadUpvalue = 9

加载上值 (Upvalue)

§

StoreUpvalue = 10

存储上值 (Upvalue)

§

CloseUpvalues = 11

关闭上值

§

Jump = 12

无条件跳转

§

JumpIfFalse = 13

为假时跳转

§

JumpIfTrue = 14

为真时跳转

§

JumpIfNull = 15

为空时跳转

§

PushNone = 16

入栈空值

§

Return = 19

返回

§

MakeClosure = 21

创建闭包

§

Call = 32

函数调用

§

CallVirtual = 33

虚函数调用

§

CallDynamic = 34

动态调用

§

CallClosure = 35

闭包调用

§

InvokeMethod = 36

方法调用

§

CallSymbol = 37

符号调用

§

FFICall = 240

FFI 调用

§

TailCall = 20

尾调用

§

TailCallClosure = 22

闭包尾调用

§

GetField = 48

获取字段

§

SetField = 49

设置字段

§

NewObject = 50

创建对象

§

NewArray = 51

创建数组

§

GetElement = 52

获取元素

§

SetElement = 53

设置元素

§

MakeTuple = 54

创建元组

§

HasKey = 55

是否存在键

§

MatchVariant = 56

匹配变体

§

SizeOf = 57

获取大小

§

NewDynObject = 58

创建动态对象

§

RemoveKey = 59

移除键

§

NewList = 60

创建列表

§

PushElementLeft = 61

左侧入队

§

PopElementLeft = 62

左侧出队

§

PushElementRight = 63

元素入队右侧

§

PopElementRight = 64

元素出队右侧

§

TypeOf = 65

获取类型

§

InstanceOf = 66

类型实例判断

§

CheckCast = 67

检查转换

§

Cast = 68

类型转换

§

Initiate = 69

初始化

§

Finalize = 70

终止

§

Perform = 80

执行副作用 (Effect)

§

WithHandler = 81

注册副作用处理器

§

ResumeWith = 82

继续副作用执行

§

CaptureCont = 83

捕获延续 (Continuation)

§

Await = 84

等待 (Await)

§

BlockOn = 85

阻塞等待 (BlockOn)

§

MatchEffect = 86

匹配副作用

§

GetWitnessTable = 96

获取虚表

§

WitnessMethod = 97

虚表方法调用

§

OpenExistential = 98

打开存在类型

§

CloseExistential = 99

关闭存在类型

§

Quote = 112

引用 (Quote)

§

Splice = 113

拼接 (Splice)

§

Eval = 114

求值 (Eval)

§

ExpandMacro = 115

宏展开

§

NewChannel = 87

新建通道

§

SendChannel = 88

发送通道消息

§

RecvChannel = 89

接收通道消息

§

SelectChannel = 90

选择通道

§

NewQuery = 91

新建查询

§

QueryExec = 92

执行查询

§

NewClock = 93

新建时钟

§

ClockWait = 94

时钟等待

§

I32Ext = 193

I32 扩展指令

§

I64Ext = 194

I64 扩展指令

§

F32Ext = 195

F32 扩展指令

§

F64Ext = 196

F64 扩展指令

§

BigIntExt = 197

大整数扩展指令

§

StringExt = 198

字符串扩展指令

§

Halt = 255

停机

Trait Implementations§

Source§

impl Clone for NyarOpcode

Source§

fn clone(&self) -> NyarOpcode

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 NyarOpcode

Source§

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

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

impl<'de> Deserialize<'de> for NyarOpcode

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 Hash for NyarOpcode

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 NyarOpcode

Source§

fn eq(&self, other: &NyarOpcode) -> 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 NyarOpcode

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 NyarOpcode

Source§

impl Eq for NyarOpcode

Source§

impl StructuralPartialEq for NyarOpcode

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<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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> 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> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

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