mirror of
https://github.com/fluencelabs/interface-types
synced 2025-06-26 21:21:38 +00:00
feat(interface-types) Draft instruction interpreter.
This commit is contained in:
25
src/ast.rs
25
src/ast.rs
@ -1,3 +1,4 @@
|
||||
use crate::instructions::Instruction;
|
||||
use std::str;
|
||||
|
||||
#[derive(PartialEq, Debug)]
|
||||
@ -21,30 +22,6 @@ pub(crate) enum AdapterKind {
|
||||
HelperFunction,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Debug)]
|
||||
pub enum Instruction<'input> {
|
||||
ArgumentGet(u64),
|
||||
Call(u64),
|
||||
CallExport(&'input str),
|
||||
ReadUtf8,
|
||||
WriteUtf8(&'input str),
|
||||
AsWasm(InterfaceType),
|
||||
AsInterface(InterfaceType),
|
||||
TableRefAdd,
|
||||
TableRefGet,
|
||||
CallMethod(u64),
|
||||
MakeRecord(InterfaceType),
|
||||
GetField(InterfaceType, u64),
|
||||
Const(InterfaceType, u64),
|
||||
FoldSeq(u64),
|
||||
Add(InterfaceType),
|
||||
MemToSeq(InterfaceType, &'input str),
|
||||
Load(InterfaceType, &'input str),
|
||||
SeqNew(InterfaceType),
|
||||
ListPush,
|
||||
RepeatWhile(u64, u64),
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Debug)]
|
||||
pub struct Export<'input> {
|
||||
pub name: &'input str,
|
||||
|
Reference in New Issue
Block a user