diff options
author | Alon Zakai <alonzakai@gmail.com> | 2018-11-05 13:22:15 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-05 13:22:15 -0800 |
commit | fce199ca454fcac97237273062dd48032899018f (patch) | |
tree | 69247bc2f093e70fabc496a42520a5f1174efbe3 /test | |
parent | e20bd90c841a1cf227275055d4f213a74c7036a9 (diff) | |
download | binaryen-fce199ca454fcac97237273062dd48032899018f.tar.gz binaryen-fce199ca454fcac97237273062dd48032899018f.tar.bz2 binaryen-fce199ca454fcac97237273062dd48032899018f.zip |
add support for new call_indirect syntax ; fixes #1724 (#1725)
Diffstat (limited to 'test')
-rw-r--r-- | test/newsyntax.wast | 10 | ||||
-rw-r--r-- | test/newsyntax.wast.from-wast | 19 | ||||
-rw-r--r-- | test/newsyntax.wast.fromBinary | 20 | ||||
-rw-r--r-- | test/newsyntax.wast.fromBinary.noDebugInfo | 20 |
4 files changed, 69 insertions, 0 deletions
diff --git a/test/newsyntax.wast b/test/newsyntax.wast new file mode 100644 index 000000000..aba263d24 --- /dev/null +++ b/test/newsyntax.wast @@ -0,0 +1,10 @@ +(module + (import "env" "table" (table 9 9 anyfunc)) + (func "call_indirect" + (drop + (call_indirect (param i32) (param f64) (result i32) (i32.const 10) (f64.const 20) (i32.const 30)) + ) + (call_indirect (i32.const 1)) + ) +) + diff --git a/test/newsyntax.wast.from-wast b/test/newsyntax.wast.from-wast new file mode 100644 index 000000000..bf77b7e46 --- /dev/null +++ b/test/newsyntax.wast.from-wast @@ -0,0 +1,19 @@ +(module + (type $0 (func)) + (type $FUNCSIG$iid (func (param i32 f64) (result i32))) + (type $FUNCSIG$v (func)) + (import "env" "table" (table $0 9 9 anyfunc)) + (export "call_indirect" (func $0)) + (func $0 (; 0 ;) (type $0) + (drop + (call_indirect (type $FUNCSIG$iid) + (i32.const 10) + (f64.const 20) + (i32.const 30) + ) + ) + (call_indirect (type $FUNCSIG$v) + (i32.const 1) + ) + ) +) diff --git a/test/newsyntax.wast.fromBinary b/test/newsyntax.wast.fromBinary new file mode 100644 index 000000000..392e3eccd --- /dev/null +++ b/test/newsyntax.wast.fromBinary @@ -0,0 +1,20 @@ +(module + (type $0 (func)) + (type $1 (func (param i32 f64) (result i32))) + (type $2 (func)) + (import "env" "table" (table $timport$0 9 9 anyfunc)) + (export "call_indirect" (func $0)) + (func $0 (; 0 ;) (type $0) + (drop + (call_indirect (type $1) + (i32.const 10) + (f64.const 20) + (i32.const 30) + ) + ) + (call_indirect (type $2) + (i32.const 1) + ) + ) +) + diff --git a/test/newsyntax.wast.fromBinary.noDebugInfo b/test/newsyntax.wast.fromBinary.noDebugInfo new file mode 100644 index 000000000..392e3eccd --- /dev/null +++ b/test/newsyntax.wast.fromBinary.noDebugInfo @@ -0,0 +1,20 @@ +(module + (type $0 (func)) + (type $1 (func (param i32 f64) (result i32))) + (type $2 (func)) + (import "env" "table" (table $timport$0 9 9 anyfunc)) + (export "call_indirect" (func $0)) + (func $0 (; 0 ;) (type $0) + (drop + (call_indirect (type $1) + (i32.const 10) + (f64.const 20) + (i32.const 30) + ) + ) + (call_indirect (type $2) + (i32.const 1) + ) + ) +) + |