Skip to main content

SurfaceInstruction

Enum SurfaceInstruction 

Source
pub enum SurfaceInstruction {
Show 42 variants Span(u32, u32, u32), Label(Ident), FunctionStart, FunctionEnd, Breakpoint, Branch(Ident), ConditionalBranch(Ident, Ident), Return, IndirectCall, Call(u32, Ident), Halt, Print, Load(SurfaceType, u32), Store(SurfaceType, u32), Dup, HeapAlloc(u32), GetItem, HeapDealloc, Const(SurfaceType, SurfaceValue), Add(SurfaceType), Sub(SurfaceType), Mul(SurfaceType), Div(SurfaceType), Rem(SurfaceType), Neg(SurfaceType), Shl(SurfaceType), Shr(SurfaceType), Rol(SurfaceType), Ror(SurfaceType), BitAnd(SurfaceType), BitOr(SurfaceType), BitXor(SurfaceType), Not, And, Or, Xor, Eq(SurfaceType), Ne(SurfaceType), Lt(SurfaceType), Gt(SurfaceType), Le(SurfaceType), Ge(SurfaceType),
}

Variants§

§

Span(u32, u32, u32)

span file:file_id start:u32 end:u32 span 0 1 2 — three space-separated u32s.

§

Label(Ident)

Label definition.

§

FunctionStart

func_start <name> — marks function entry. <name> is symbolic and orchestrator-resolved; the unit variant carries no payload.

§

FunctionEnd

func_end <name> — marks function exit (debug only).

§

Breakpoint

breakpoint. Must precede Branch (whose token br would be a prefix of breakpoint).

§

Branch(Ident)

br <target> — symbolic. Deferred to orchestrator.

§

ConditionalBranch(Ident, Ident)

cond_br <true_target>, <false_target> — symbolic. Deferred.

§

Return

ret (bare) is the form real .sst uses; numeric ret <n> has no precedent so we defer. Orchestrator emits Return(0) for bare ret.

§

IndirectCall

call_indirect. Must precede Call for the prefix check.

§

Call(u32, Ident)

call <arity>, <addr> — symbolic addr. Deferred.

§

Halt

halt — stop execution.

§

Print

print — write top-of-stack to stdout.

§

Load(SurfaceType, u32)

load.<type> <address> — two fields with single-space separator.

§

Store(SurfaceType, u32)

store.<type> <address>.

§

Dup

dup.

§

HeapAlloc(u32)

heap_alloc <n>.

§

GetItem

get_item. Must precede Ge (token geget_item).

§

HeapDealloc

heap_dealloc — pops a HeapRef and marks the slot dead, returning it to the free list for reuse by the next heap_alloc.

§

Const(SurfaceType, SurfaceValue)

const.<type> <literal> — numeric/bool only here. .str/.fn_ref/ .heap_ref are orchestrator-handled.

§

Add(SurfaceType)

§

Sub(SurfaceType)

§

Mul(SurfaceType)

§

Div(SurfaceType)

§

Rem(SurfaceType)

§

Neg(SurfaceType)

§

Shl(SurfaceType)

§

Shr(SurfaceType)

§

Rol(SurfaceType)

§

Ror(SurfaceType)

§

BitAnd(SurfaceType)

§

BitOr(SurfaceType)

§

BitXor(SurfaceType)

§

Not

§

And

§

Or

§

Xor

§

Eq(SurfaceType)

§

Ne(SurfaceType)

§

Lt(SurfaceType)

§

Gt(SurfaceType)

§

Le(SurfaceType)

§

Ge(SurfaceType)

Trait Implementations§

Source§

impl Clone for SurfaceInstruction

Source§

fn clone(&self) -> SurfaceInstruction

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 SurfaceInstruction

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 SurfaceInstruction

Source§

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

Source§

impl PartialEq for SurfaceInstruction

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 StructuralPartialEq for SurfaceInstruction

Source§

impl SurfaceInstruction for SurfaceInstruction

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<'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.
§

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