Debian Codegraph @

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