syntax support for ref.ops and pass ref_null.wast

This commit is contained in:
Ilya Rezvov
2022-01-30 16:21:22 -07:00
parent 99532adb63
commit 960acac955
6 changed files with 67 additions and 2 deletions
+7 -1
View File
@@ -108,6 +108,8 @@ data ValueType =
| I64
| F32
| F64
| Func
| Extern
deriving (Show, Eq, Generic, NFData)
type ResultType = [ValueType]
@@ -134,6 +136,10 @@ data Instruction index =
| Return
| Call index
| CallIndirect index
-- Reference instructions
| RefNull ElemType
| RefIsNull
| RefFunc index
-- Parametric instructions
| Drop
| Select
@@ -207,7 +213,7 @@ data Function = Function {
data Limit = Limit Natural (Maybe Natural) deriving (Show, Eq, Generic, NFData)
data ElemType = FuncRef deriving (Show, Eq, Generic, NFData)
data ElemType = FuncRef | ExternRef deriving (Show, Eq, Generic, NFData)
data TableType = TableType Limit ElemType deriving (Show, Eq, Generic, NFData)