Debian Codegraph @

crates/wit-component/tests/components/link-weak-cabi-realloc/component.wat

raw
1 (component
2 (core module (;0;)
3 (type (;0;) (func (param i32 i32 i32 i32) (result i32)))
4 (table (;0;) 2 funcref)
5 (memory (;0;) 17)
6 (global (;0;) (mut i32) i32.const 1048576)
7 (global (;1;) i32 i32.const 1048592)
8 (global (;2;) i32 i32.const 1)
9 (global (;3;) (mut i32) i32.const 1048592)
10 (global (;4;) (mut i32) i32.const 1114112)
11 (export "__stack_pointer" (global 0))
12 (export "foo:memory_base" (global 1))
13 (export "foo:table_base" (global 2))
14 (export "__heap_base" (global 3))
15 (export "__heap_end" (global 4))
16 (export "cabi_realloc" (func 0))
17 (export "__indirect_function_table" (table 0))
18 (export "memory" (memory 0))
19 (func (;0;) (type 0) (param i32 i32 i32 i32) (result i32)
20 local.get 0
21 local.get 1
22 local.get 2
23 local.get 3
24 i32.const 1
25 call_indirect (type 0)
26 )
27 (@producers
28 (processed-by "wit-component" "$CARGO_PKG_VERSION")
29 )
30 )
31 (core module (;1;)
32 (@dylink.0
33 (mem-info (memory 0 4))
34 )
35 (type (;0;) (func (param i32 i32 i32 i32) (result i32)))
36 (type (;1;) (func (param i32)))
37 (type (;2;) (func (param i32 i32)))
38 (import "env" "cabi_realloc" (func $cabi_realloc.0 (;0;) (type 0)))
39 (export "cabi_realloc" (func $cabi_realloc.1))
40 (export "test:test/test#foo" (func $foo))
41 (func $cabi_realloc.1 (;1;) (type 0) (param i32 i32 i32 i32) (result i32)
42 i32.const -257976192
43 )
44 (func $foo (;2;) (type 2) (param i32 i32))
45 )
46 (core module (;2;)
47 (type (;0;) (func))
48 (type (;1;) (func (param i32)))
49 (type (;2;) (func (param i32 i32 i32 i32) (result i32)))
50 (import "env" "memory" (memory (;0;) 0))
51 (import "env" "__indirect_function_table" (table (;0;) 0 funcref))
52 (import "foo" "cabi_realloc" (func (;0;) (type 2)))
53 (start 1)
54 (elem (;0;) (i32.const 1) func)
55 (elem (;1;) (i32.const 1) func 0)
56 (func (;1;) (type 0))
57 (data (;0;) (i32.const 1048576) "\00\00\00\00\00\00\10\00")
58 (@producers
59 (processed-by "wit-component" "$CARGO_PKG_VERSION")
60 )
61 )
62 (core instance (;0;) (instantiate 0))
63 (alias core export 0 "memory" (core memory (;0;)))
64 (alias core export 0 "cabi_realloc" (core func (;0;)))
65 (core instance (;1;)
66 (export "cabi_realloc" (func 0))
67 )
68 (core instance (;2;) (instantiate 1
69 (with "env" (instance 1))
70 )
71 )
72 (core instance (;3;) (instantiate 2
73 (with "env" (instance 0))
74 (with "foo" (instance 2))
75 )
76 )
77 (type (;0;) (func (param "x" string)))
78 (alias core export 2 "test:test/test#foo" (core func (;1;)))
79 (alias core export 2 "cabi_realloc" (core func (;2;)))
80 (func (;0;) (type 0) (canon lift (core func 1) (memory 0) (realloc 2) string-encoding=utf8))
81 (component (;0;)
82 (type (;0;) (func (param "x" string)))
83 (import "import-func-foo" (func (;0;) (type 0)))
84 (type (;1;) (func (param "x" string)))
85 (export (;1;) "foo" (func 0) (func (type 1)))
86 )
87 (instance (;0;) (instantiate 0
88 (with "import-func-foo" (func 0))
89 )
90 )
91 (export (;1;) "test:test/test" (instance 0))
92 (@producers
93 (processed-by "wit-component" "$CARGO_PKG_VERSION")
94 )
95 )