Files: 4af0630e844fe5c816f308e0ce8210d97c227951 / tests / wast / callback.wast
754 bytesRaw
1 | (module |
2 | (type $FUNCSIG$vii (func (param i32 i32))) |
3 | (type $FUNCSIG$vi (func (param i32))) |
4 | (type $FUNCSIG$v (func)) |
5 | (import "env" "callback" (func $callback (param i32))) |
6 | (import "test" "equals" (func $equals (param i32 i32))) |
7 | (table (export "callbacks") 2 2 anyfunc ) |
8 | (elem (i32.const 0) $__wasm_nullptr $theCallback) |
9 | (memory $0 1) |
10 | (export "memory" (memory $0)) |
11 | (export "theCallback" (func $theCallback)) |
12 | (export "onCreation" (func $onMessage)) |
13 | (func $theCallback (type $FUNCSIG$v) |
14 | (call $equals |
15 | (i32.const 0) |
16 | (i32.const 0) |
17 | ) |
18 | ) |
19 | (func $onMessage (param $0 i32) (result i32) |
20 | (call $callback |
21 | (i32.const 1) |
22 | ) |
23 | (i32.const 1) |
24 | ) |
25 | (func $__wasm_nullptr (type $FUNCSIG$v) |
26 | (unreachable) |
27 | ) |
28 | ) |
29 |
Built with git-ssb-web