git ssb

0+

wanderer🌟 / js-primea-wasm-container



Tree: 885e05bd77e55f9846f83ccd30e285c5566e6f38

Files: 885e05bd77e55f9846f83ccd30e285c5566e6f38 / tests / wast / i64.wast

1218 bytesRaw
1(module
2 (import "test" "check" (func $check (param i32 i32)))
3 (import "test" "print" (func $print (param i32)))
4 (import "func" "internalize" (func $func.internalize (param i32 i32)))
5 (import "func" "set_gas_budget" (func $func.set_gas_budget (param i32 i32) (result i32)))
6 (import "module" "self" (func $self (result i32)))
7 (import "module" "export" (func $exports (param i32 i32) (result i32)))
8 (import "memory" "externalize" (func $mem.externalize (param i32 i32) (result i32)))
9 (memory (export "memory") 1)
10 (data (i32.const 0) "callback")
11 (table (export "table") 1 1 anyfunc)
12 (func $main
13 (local $export_name i32)
14 (call $func.internalize
15 (i32.const 0)
16 (call $func.set_gas_budget
17 (call $exports
18 (call $self)
19 (tee_local $export_name
20 (call $mem.externalize (i32.const 0) (i32.const 8))))
21 (i32.const 1000)))
22
23 (call_indirect (param i64 i32)
24 (i64.const 8)
25 (get_local $export_name)
26 (i32.const 0)))
27
28 (func $callback (param i64) (param i32)
29 (call $check
30 (i32.const 8)
31 (i32.wrap/i64 (get_local 0)))
32 (call $print (get_local 1)))
33 (export "main" (func $main))
34 (export "callback" (func $callback)))
35

Built with git-ssb-web