Skip to main content

SurfaceInstruction

Enum SurfaceInstruction 

Source
pub enum SurfaceInstruction {
Show 145 variants Span(u32, u32, u32), Label(Ident), FunctionStart, FunctionEnd, Breakpoint, Branch(Ident), ConditionalBranch(Ident, Ident), Return(u32), IndirectCall, Call(u32, Ident), Halt, Print, LoadI32(u32), LoadI64(u32), LoadU32(u32), LoadU64(u32), LoadF32(u32), LoadF64(u32), LoadBool(u32), StoreI32(u32), StoreI64(u32), StoreU32(u32), StoreU64(u32), StoreF32(u32), StoreF64(u32), StoreBool(u32), Dup, HeapAlloc(u32), GetItem, HeapDealloc, HeapReserve, HeapPush, ConstI32(SurfaceValue), ConstI64(SurfaceValue), ConstU32(SurfaceValue), ConstU64(SurfaceValue), ConstF32(SurfaceValue), ConstF64(SurfaceValue), ConstBool(SurfaceValue), ConstString(SurfaceValue), ConstFunctionRef(SurfaceValue), ConstHeapRef(SurfaceValue), AddI32, AddF32, AddI64, AddU32, AddU64, AddF64, SubI32, SubI64, SubU32, SubU64, SubF32, SubF64, MulI32, MulI64, MulU32, MulU64, MulF32, MulF64, DivI32, DivI64, DivU32, DivU64, DivF32, DivF64, RemI32, RemI64, RemU32, RemU64, RemF32, RemF64, NegI32, NegI64, NegF32, NegF64, ShlI32, ShlI64, ShlU32, ShlU64, ShrI32, ShrI64, ShrU32, ShrU64, RolI32, RolI64, RolU32, RolU64, RorI32, RorI64, RorU32, RorU64, BitAndI32, BitAndI64, BitAndU32, BitAndU64, BitOrI32, BitOrI64, BitOrU32, BitOrU64, BitXorI32, BitXorI64, BitXorU32, BitXorU64, Not, And, Or, Xor, EqI32, EqI64, EqU32, EqU64, EqF32, EqF64, NeI32, NeI64, NeU32, NeU64, NeF32, NeF64, LtI32, LtI64, LtU32, LtU64, LtF32, LtF64, GtI32, GtI64, GtU32, GtU64, GtF32, GtF64, LeI32, LeI64, LeU32, LeU64, LeF32, LeF64, GeI32, GeI64, GeU32, GeU64, GeF32, GeF64, HeapLen,
}

Variants§

§

Span(u32, u32, u32)

§

Label(Ident)

§

FunctionStart

§

FunctionEnd

§

Breakpoint

§

Branch(Ident)

§

ConditionalBranch(Ident, Ident)

§

Return(u32)

§

IndirectCall

§

Call(u32, Ident)

§

Halt

§

Print

§

LoadI32(u32)

§

LoadI64(u32)

§

LoadU32(u32)

§

LoadU64(u32)

§

LoadF32(u32)

§

LoadF64(u32)

§

LoadBool(u32)

§

StoreI32(u32)

§

StoreI64(u32)

§

StoreU32(u32)

§

StoreU64(u32)

§

StoreF32(u32)

§

StoreF64(u32)

§

StoreBool(u32)

§

Dup

§

HeapAlloc(u32)

Allocate a full heap object, where the allocation length is the capacity.

§

GetItem

§

HeapDealloc

§

HeapReserve

Reserves n slots (where n is the top value on the stack) that can be pushed to.

§

HeapPush

Push to a heap_ref that is below capacity.

§

ConstI32(SurfaceValue)

§

ConstI64(SurfaceValue)

§

ConstU32(SurfaceValue)

§

ConstU64(SurfaceValue)

§

ConstF32(SurfaceValue)

§

ConstF64(SurfaceValue)

§

ConstBool(SurfaceValue)

§

ConstString(SurfaceValue)

§

ConstFunctionRef(SurfaceValue)

§

ConstHeapRef(SurfaceValue)

§

AddI32

§

AddF32

§

AddI64

§

AddU32

§

AddU64

§

AddF64

§

SubI32

§

SubI64

§

SubU32

§

SubU64

§

SubF32

§

SubF64

§

MulI32

§

MulI64

§

MulU32

§

MulU64

§

MulF32

§

MulF64

§

DivI32

§

DivI64

§

DivU32

§

DivU64

§

DivF32

§

DivF64

§

RemI32

§

RemI64

§

RemU32

§

RemU64

§

RemF32

§

RemF64

§

NegI32

§

NegI64

§

NegF32

§

NegF64

§

ShlI32

§

ShlI64

§

ShlU32

§

ShlU64

§

ShrI32

§

ShrI64

§

ShrU32

§

ShrU64

§

RolI32

§

RolI64

§

RolU32

§

RolU64

§

RorI32

§

RorI64

§

RorU32

§

RorU64

§

BitAndI32

§

BitAndI64

§

BitAndU32

§

BitAndU64

§

BitOrI32

§

BitOrI64

§

BitOrU32

§

BitOrU64

§

BitXorI32

§

BitXorI64

§

BitXorU32

§

BitXorU64

§

Not

§

And

§

Or

§

Xor

§

EqI32

§

EqI64

§

EqU32

§

EqU64

§

EqF32

§

EqF64

§

NeI32

§

NeI64

§

NeU32

§

NeU64

§

NeF32

§

NeF64

§

LtI32

§

LtI64

§

LtU32

§

LtU64

§

LtF32

§

LtF64

§

GtI32

§

GtI64

§

GtU32

§

GtU64

§

GtF32

§

GtF64

§

LeI32

§

LeI64

§

LeU32

§

LeU64

§

LeF32

§

LeF64

§

GeI32

§

GeI64

§

GeU32

§

GeU64

§

GeF32

§

GeF64

§

HeapLen

Pop a heap reference and push the object’s current length as a u64.

Trait Implementations§

Source§

impl Clone for Instruction

Source§

fn clone(&self) -> Instruction

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 Debug for Instruction

Source§

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

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

impl<'__vihaco_src> Parse<'__vihaco_src> for Instruction

Source§

fn parser() -> impl Parser<'__vihaco_src, &'__vihaco_src str, Self, Err<Simple<'__vihaco_src, char>>>

Source§

impl PartialEq for Instruction

Source§

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

Source§

impl SurfaceInstruction for Instruction

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, 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.

§

impl<'src, T> IntoMaybe<'src, T> for T
where T: 'src,

§

type Proj<U: 'src> = U

§

fn map_maybe<R>( self, _f: impl FnOnce(&'src T) -> &'src R, g: impl FnOnce(T) -> R, ) -> <T as IntoMaybe<'src, T>>::Proj<R>
where R: 'src,

§

impl<T> OrderedSeq<'_, T> for T
where T: Clone,

§

impl<'p, T> Seq<'p, T> for T
where T: Clone,

§

type Item<'a> = &'a T where T: 'a

The item yielded by the iterator.
§

type Iter<'a> = Once<&'a T> where T: 'a

An iterator over the items within this container, by reference.
§

fn seq_iter(&self) -> <T as Seq<'p, T>>::Iter<'_>

Iterate over the elements of the container.
§

fn contains(&self, val: &T) -> bool
where T: PartialEq,

Check whether an item is contained within this sequence.
§

fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>
where 'p: 'b,

Convert an item of the sequence into a [MaybeRef].
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.