diff --git a/tests/binary-parsing/import-func.wast b/tests/binary-parsing/import-func.wast new file mode 100644 index 000000000..59cc79f2d --- /dev/null +++ b/tests/binary-parsing/import-func.wast @@ -0,0 +1,4 @@ +(module $mymodule + (type (;0;) (func)) + (import "env" "managedSignalError" (func $managedSignalError (type 0))) +) diff --git a/tests/binary-parsing/import-func.wast.out b/tests/binary-parsing/import-func.wast.out new file mode 100644 index 000000000..6d974f116 --- /dev/null +++ b/tests/binary-parsing/import-func.wast.out @@ -0,0 +1,65 @@ + + + #module (... types: #type (... type: [ .ValTypes ] -> [ .ValTypes ] , metadata: ) .EmptyStmts , funcs: .EmptyStmts , tables: .EmptyStmts , mems: .EmptyStmts , globals: .EmptyStmts , elem: .EmptyStmts , data: .EmptyStmts , start: .EmptyStmts , importDefns: #import ( "env" , "managedSignalError" , #funcDesc (... id: , type: 0 ) ) .EmptyStmts , exports: .EmptyStmts , metadata: #meta (... id: , funcIds: .Map , filename: .String ) ) ~> .K + + + + .K + + + .ValStack + + + + .List + + + .Int + + + + .Map + + + .Map + + + .ModuleInstCellMap + + + 0 + + + + .FuncDefCellMap + + + 0 + + + .TabInstCellMap + + + 0 + + + .List + + + .GlobalInstCellMap + + + 0 + + + .ElemInstCellMap + + + 0 + + + + true + + + diff --git a/tests/binary-parsing/import-global-const.wast b/tests/binary-parsing/import-global-const.wast new file mode 100644 index 000000000..9ec94f20e --- /dev/null +++ b/tests/binary-parsing/import-global-const.wast @@ -0,0 +1,3 @@ +(module $mymodule + (import "env" "myGlobal" (global $myGlobal i32)) +) diff --git a/tests/binary-parsing/import-global-const.wast.out b/tests/binary-parsing/import-global-const.wast.out new file mode 100644 index 000000000..361a5fa3b --- /dev/null +++ b/tests/binary-parsing/import-global-const.wast.out @@ -0,0 +1,65 @@ + + + #module (... types: .EmptyStmts , funcs: .EmptyStmts , tables: .EmptyStmts , mems: .EmptyStmts , globals: .EmptyStmts , elem: .EmptyStmts , data: .EmptyStmts , start: .EmptyStmts , importDefns: #import ( "env" , "myGlobal" , #globalDesc (... id: , type: const i32 ) ) .EmptyStmts , exports: .EmptyStmts , metadata: #meta (... id: , funcIds: .Map , filename: .String ) ) ~> .K + + + + .K + + + .ValStack + + + + .List + + + .Int + + + + .Map + + + .Map + + + .ModuleInstCellMap + + + 0 + + + + .FuncDefCellMap + + + 0 + + + .TabInstCellMap + + + 0 + + + .List + + + .GlobalInstCellMap + + + 0 + + + .ElemInstCellMap + + + 0 + + + + true + + + diff --git a/tests/binary-parsing/import-global-var.wast b/tests/binary-parsing/import-global-var.wast new file mode 100644 index 000000000..f4367ed41 --- /dev/null +++ b/tests/binary-parsing/import-global-var.wast @@ -0,0 +1,3 @@ +(module $mymodule + (import "env" "myGlobal" (global $myGlobal (mut i32))) +) diff --git a/tests/binary-parsing/import-global-var.wast.out b/tests/binary-parsing/import-global-var.wast.out new file mode 100644 index 000000000..9197b2f8f --- /dev/null +++ b/tests/binary-parsing/import-global-var.wast.out @@ -0,0 +1,65 @@ + + + #module (... types: .EmptyStmts , funcs: .EmptyStmts , tables: .EmptyStmts , mems: .EmptyStmts , globals: .EmptyStmts , elem: .EmptyStmts , data: .EmptyStmts , start: .EmptyStmts , importDefns: #import ( "env" , "myGlobal" , #globalDesc (... id: , type: var i32 ) ) .EmptyStmts , exports: .EmptyStmts , metadata: #meta (... id: , funcIds: .Map , filename: .String ) ) ~> .K + + + + .K + + + .ValStack + + + + .List + + + .Int + + + + .Map + + + .Map + + + .ModuleInstCellMap + + + 0 + + + + .FuncDefCellMap + + + 0 + + + .TabInstCellMap + + + 0 + + + .List + + + .GlobalInstCellMap + + + 0 + + + .ElemInstCellMap + + + 0 + + + + true + + + diff --git a/tests/binary-parsing/import-memory.wast b/tests/binary-parsing/import-memory.wast new file mode 100644 index 000000000..4e4204d07 --- /dev/null +++ b/tests/binary-parsing/import-memory.wast @@ -0,0 +1,3 @@ +(module $mymodule + (import "env" "myMem" (memory $myMem 10 20)) +) diff --git a/tests/binary-parsing/import-memory.wast.out b/tests/binary-parsing/import-memory.wast.out new file mode 100644 index 000000000..db7403081 --- /dev/null +++ b/tests/binary-parsing/import-memory.wast.out @@ -0,0 +1,65 @@ + + + #module (... types: .EmptyStmts , funcs: .EmptyStmts , tables: .EmptyStmts , mems: .EmptyStmts , globals: .EmptyStmts , elem: .EmptyStmts , data: .EmptyStmts , start: .EmptyStmts , importDefns: #import ( "env" , "myMem" , #memoryDesc (... id: , type: #limits ( 10 , 20 ) ) ) .EmptyStmts , exports: .EmptyStmts , metadata: #meta (... id: , funcIds: .Map , filename: .String ) ) ~> .K + + + + .K + + + .ValStack + + + + .List + + + .Int + + + + .Map + + + .Map + + + .ModuleInstCellMap + + + 0 + + + + .FuncDefCellMap + + + 0 + + + .TabInstCellMap + + + 0 + + + .List + + + .GlobalInstCellMap + + + 0 + + + .ElemInstCellMap + + + 0 + + + + true + + + diff --git a/tests/binary-parsing/import-table-lim.wast b/tests/binary-parsing/import-table-lim.wast new file mode 100644 index 000000000..b1b0d9e95 --- /dev/null +++ b/tests/binary-parsing/import-table-lim.wast @@ -0,0 +1,3 @@ +(module $mymodule + (import "env" "myTable" (table $myTable 10 20 funcref)) +) diff --git a/tests/binary-parsing/import-table-lim.wast.out b/tests/binary-parsing/import-table-lim.wast.out new file mode 100644 index 000000000..443c76c6f --- /dev/null +++ b/tests/binary-parsing/import-table-lim.wast.out @@ -0,0 +1,65 @@ + + + #module (... types: .EmptyStmts , funcs: .EmptyStmts , tables: .EmptyStmts , mems: .EmptyStmts , globals: .EmptyStmts , elem: .EmptyStmts , data: .EmptyStmts , start: .EmptyStmts , importDefns: #import ( "env" , "myTable" , #tableDesc (... id: , type: #limits ( 10 , 20 ) ) ) .EmptyStmts , exports: .EmptyStmts , metadata: #meta (... id: , funcIds: .Map , filename: .String ) ) ~> .K + + + + .K + + + .ValStack + + + + .List + + + .Int + + + + .Map + + + .Map + + + .ModuleInstCellMap + + + 0 + + + + .FuncDefCellMap + + + 0 + + + .TabInstCellMap + + + 0 + + + .List + + + .GlobalInstCellMap + + + 0 + + + .ElemInstCellMap + + + 0 + + + + true + + + diff --git a/tests/binary-parsing/import-table-minlim.wast b/tests/binary-parsing/import-table-minlim.wast new file mode 100644 index 000000000..3dfb2e2ea --- /dev/null +++ b/tests/binary-parsing/import-table-minlim.wast @@ -0,0 +1,3 @@ +(module $mymodule + (import "env" "myTable" (table $myTable 10 funcref)) +) diff --git a/tests/binary-parsing/import-table-minlim.wast.out b/tests/binary-parsing/import-table-minlim.wast.out new file mode 100644 index 000000000..b4becfd9a --- /dev/null +++ b/tests/binary-parsing/import-table-minlim.wast.out @@ -0,0 +1,65 @@ + + + #module (... types: .EmptyStmts , funcs: .EmptyStmts , tables: .EmptyStmts , mems: .EmptyStmts , globals: .EmptyStmts , elem: .EmptyStmts , data: .EmptyStmts , start: .EmptyStmts , importDefns: #import ( "env" , "myTable" , #tableDesc (... id: , type: #limitsMin ( 10 ) ) ) .EmptyStmts , exports: .EmptyStmts , metadata: #meta (... id: , funcIds: .Map , filename: .String ) ) ~> .K + + + + .K + + + .ValStack + + + + .List + + + .Int + + + + .Map + + + .Map + + + .ModuleInstCellMap + + + 0 + + + + .FuncDefCellMap + + + 0 + + + .TabInstCellMap + + + 0 + + + .List + + + .GlobalInstCellMap + + + 0 + + + .ElemInstCellMap + + + 0 + + + + true + + + diff --git a/tests/binary-parsing/imports.wast b/tests/binary-parsing/imports.wast new file mode 100644 index 000000000..ed064f67d --- /dev/null +++ b/tests/binary-parsing/imports.wast @@ -0,0 +1,5 @@ +(module $mymodule + (type (;0;) (func)) + (import "env" "managedSignalError" (func $managedSignalError (type 0))) + (import "env" "myFunc" (func $myFunc (type 0))) +) diff --git a/tests/binary-parsing/imports.wast.out b/tests/binary-parsing/imports.wast.out new file mode 100644 index 000000000..6fb94b8dc --- /dev/null +++ b/tests/binary-parsing/imports.wast.out @@ -0,0 +1,65 @@ + + + #module (... types: #type (... type: [ .ValTypes ] -> [ .ValTypes ] , metadata: ) .EmptyStmts , funcs: .EmptyStmts , tables: .EmptyStmts , mems: .EmptyStmts , globals: .EmptyStmts , elem: .EmptyStmts , data: .EmptyStmts , start: .EmptyStmts , importDefns: #import ( "env" , "managedSignalError" , #funcDesc (... id: , type: 0 ) ) #import ( "env" , "myFunc" , #funcDesc (... id: , type: 0 ) ) .EmptyStmts , exports: .EmptyStmts , metadata: #meta (... id: , funcIds: .Map , filename: .String ) ) ~> .K + + + + .K + + + .ValStack + + + + .List + + + .Int + + + + .Map + + + .Map + + + .ModuleInstCellMap + + + 0 + + + + .FuncDefCellMap + + + 0 + + + .TabInstCellMap + + + 0 + + + .List + + + .GlobalInstCellMap + + + 0 + + + .ElemInstCellMap + + + 0 + + + + true + + +