Debian Codegraph @

crates/wit-component/tests/components/link-stub-wasip2/lib-c.wat

raw
1 (module
2 (@dylink.0
3 (mem-info (memory 0 4))
4 )
5 (type (func))
6 (type (func (param i32) (result i32)))
7 (type (func (param i32)))
8 (import "wasi:cli/[email protected]" "get-environment" (func $get-environment (type 2)))
9 (import "GOT.mem" "__heap_base" (global $__heap_base (mut i32)))
10 (import "GOT.mem" "__heap_end" (global $__heap_end (mut i32)))
11 (global $heap (mut i32) i32.const 0)
12 (func $start (type 0)
13 global.get $__heap_base
14 global.set $heap
15 )
16 (func $malloc (type 1) (param i32) (result i32)
17 global.get $heap
18 global.get $heap
19 local.get 0
20 i32.add
21 global.set $heap
22 )
23 (func $abort (type 0)
24 unreachable
25 )
26 (export "malloc" (func $malloc))
27 (export "abort" (func $abort))
28 (start $start)
29 )