Debian Codegraph @

crates/wit-component/tests/components/link-got-func/component.wat

raw
1 (component
2 (type (;0;)
3 (instance
4 (type (;0;) (func (param "v" s32) (result s32)))
5 (export (;0;) "foo" (func (type 0)))
6 )
7 )
8 (import "test:test/test" (instance (;0;) (type 0)))
9 (core module (;0;)
10 (type (;0;) (func (param i32) (result i32)))
11 (table (;0;) 2 funcref)
12 (memory (;0;) 17)
13 (global (;0;) (mut i32) i32.const 1048576)
14 (global (;1;) i32 i32.const 1048592)
15 (global (;2;) i32 i32.const 1)
16 (global (;3;) i32 i32.const 1048592)
17 (global (;4;) i32 i32.const 1)
18 (global (;5;) (mut i32) i32.const 1)
19 (global (;6;) (mut i32) i32.const 1048592)
20 (global (;7;) (mut i32) i32.const 1114112)
21 (export "__stack_pointer" (global 0))
22 (export "bar:memory_base" (global 1))
23 (export "bar:table_base" (global 2))
24 (export "foo:memory_base" (global 3))
25 (export "foo:table_base" (global 4))
26 (export "foo:foo" (global 5))
27 (export "__heap_base" (global 6))
28 (export "__heap_end" (global 7))
29 (export "foo" (func 0))
30 (export "__indirect_function_table" (table 0))
31 (export "memory" (memory 0))
32 (func (;0;) (type 0) (param i32) (result i32)
33 local.get 0
34 i32.const 1
35 call_indirect (type 0)
36 )
37 (@producers
38 (processed-by "wit-component" "$CARGO_PKG_VERSION")
39 )
40 )
41 (core module (;1;)
42 (@dylink.0
43 (mem-info (memory 0 4))
44 )
45 (type (;0;) (func (param i32) (result i32)))
46 (export "foo" (func $foo))
47 (func $foo (;0;) (type 0) (param i32) (result i32)
48 unreachable
49 )
50 )
51 (core module (;2;)
52 (@dylink.0
53 (mem-info (memory 0 4))
54 )
55 (type (;0;) (func (param i32) (result i32)))
56 (import "test:test/test" "foo" (func $import_foo (;0;) (type 0)))
57 (import "env" "foo" (func $import_foo2 (;1;) (type 0)))
58 (import "GOT.func" "foo" (global $import_foo2_address (;0;) (mut i32)))
59 (export "test:test/test#foo" (func $import_foo2))
60 )
61 (core module (;3;)
62 (type (;0;) (func))
63 (type (;1;) (func (param i32)))
64 (type (;2;) (func (param i32) (result i32)))
65 (import "env" "memory" (memory (;0;) 0))
66 (import "env" "__indirect_function_table" (table (;0;) 0 funcref))
67 (import "bar" "foo" (func (;0;) (type 2)))
68 (start 1)
69 (elem (;0;) (i32.const 1) func)
70 (elem (;1;) (i32.const 1) func 0)
71 (func (;1;) (type 0))
72 (data (;0;) (i32.const 1048576) "\00\00\00\00\00\00\10\00")
73 (@producers
74 (processed-by "wit-component" "$CARGO_PKG_VERSION")
75 )
76 )
77 (core instance (;0;) (instantiate 0))
78 (alias core export 0 "memory" (core memory (;0;)))
79 (core instance (;1;) (instantiate 1))
80 (alias export 0 "foo" (func (;0;)))
81 (core func (;0;) (canon lower (func 0)))
82 (core instance (;2;)
83 (export "foo" (func 0))
84 )
85 (alias core export 1 "foo" (core func (;1;)))
86 (core instance (;3;)
87 (export "foo" (func 1))
88 )
89 (alias core export 0 "foo:foo" (core global (;0;)))
90 (core instance (;4;)
91 (export "foo" (global 0))
92 )
93 (core instance (;5;) (instantiate 2
94 (with "test:test/test" (instance 2))
95 (with "env" (instance 3))
96 (with "GOT.func" (instance 4))
97 )
98 )
99 (core instance (;6;) (instantiate 3
100 (with "env" (instance 0))
101 (with "bar" (instance 1))
102 )
103 )
104 (type (;1;) (func (param "v" s32) (result s32)))
105 (alias core export 5 "test:test/test#foo" (core func (;2;)))
106 (func (;1;) (type 1) (canon lift (core func 2)))
107 (component (;0;)
108 (type (;0;) (func (param "v" s32) (result s32)))
109 (import "import-func-foo" (func (;0;) (type 0)))
110 (type (;1;) (func (param "v" s32) (result s32)))
111 (export (;1;) "foo" (func 0) (func (type 1)))
112 )
113 (instance (;1;) (instantiate 0
114 (with "import-func-foo" (func 1))
115 )
116 )
117 (export (;2;) "test:test/test" (instance 1))
118 (@producers
119 (processed-by "wit-component" "$CARGO_PKG_VERSION")
120 )
121 )