Add tests calling function imports.
This commit is contained in:
20
crates/misc/dotnet/tests/Modules/FunctionThunking.wat
Normal file
20
crates/misc/dotnet/tests/Modules/FunctionThunking.wat
Normal 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)
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user