Add tests calling function imports.

This commit is contained in:
Austin Wise
2019-12-13 18:50:57 -08:00
parent df0f0e3c44
commit 50d0aa939c
3 changed files with 91 additions and 0 deletions

Binary file not shown.

View File

@@ -0,0 +1,20 @@
(module
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$v (func))
(import "env" "add" (func $add (param i32 i32) (result i32)))
(import "env" "do_throw" (func $do_throw))
(table 0 anyfunc)
(memory $0 1)
(export "memory" (memory $0))
(export "add_wrapper" (func $add_wrapper))
(export "do_throw_wrapper" (func $do_throw_wrapper))
(func $add_wrapper (; 2 ;) (param $0 i32) (param $1 i32) (result i32)
(call $add
(get_local $0)
(get_local $1)
)
)
(func $do_throw_wrapper (; 3 ;)
(call $do_throw)
)
)