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 — 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 ge ⊂ get_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
impl Clone for SurfaceInstruction
Source§fn clone(&self) -> SurfaceInstruction
fn clone(&self) -> SurfaceInstruction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SurfaceInstruction
impl Debug for SurfaceInstruction
Source§impl<'__vihaco_src> Parse<'__vihaco_src> for SurfaceInstruction
impl<'__vihaco_src> Parse<'__vihaco_src> for SurfaceInstruction
Source§impl PartialEq for SurfaceInstruction
impl PartialEq for SurfaceInstruction
Source§fn eq(&self, other: &SurfaceInstruction) -> bool
fn eq(&self, other: &SurfaceInstruction) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SurfaceInstruction
impl SurfaceInstruction for SurfaceInstruction
Auto Trait Implementations§
impl Freeze for SurfaceInstruction
impl RefUnwindSafe for SurfaceInstruction
impl Send for SurfaceInstruction
impl Sync for SurfaceInstruction
impl Unpin for SurfaceInstruction
impl UnsafeUnpin for SurfaceInstruction
impl UnwindSafe for SurfaceInstruction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
§type Iter<'a> = Once<&'a T>
where
T: 'a
type Iter<'a> = Once<&'a T> where T: 'a
§fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
§fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
MaybeRef].