Debian Codegraph @

vendor/wit-component/tests/components/adapt-import-only-used-in-adapter/component.wat

raw
1 (component
2 (type $ty-foo:foo/adapter-imports (;0;)
3 (instance
4 (type (;0;) (func (param "x" string)))
5 (export (;0;) "foo" (func (type 0)))
6 )
7 )
8 (import "foo:foo/adapter-imports" (instance $foo:foo/adapter-imports (;0;) (type $ty-foo:foo/adapter-imports)))
9 (type (;1;) (func (param "x" string)))
10 (import "foo" (func $foo (;0;) (type 1)))
11 (core module $main (;0;)
12 (type (;0;) (func (param i32 i32)))
13 (type (;1;) (func))
14 (import "$root" "foo" (func (;0;) (type 0)))
15 (memory (;0;) 1)
16 (export "bar" (func 1))
17 (export "memory" (memory 0))
18 (func (;1;) (type 1)
19 unreachable
20 )
21 (@producers
22 (processed-by "wit-component" "$CARGO_PKG_VERSION")
23 (processed-by "my-fake-bindgen" "123.45")
24 )
25 )
26 (core module $wit-component:adapter:unused (;1;)
27 (type (;0;) (func (param i32 i32)))
28 (type (;1;) (func (param i32 i32 i32 i32) (result i32)))
29 (import "foo:foo/adapter-imports" "foo" (func $foo (;0;) (type 0)))
30 (export "adapter-bar" (func 1))
31 (export "cabi_export_realloc" (func 2))
32 (func (;1;) (type 0) (param i32 i32)
33 i32.const 0
34 i32.const 0
35 call $foo
36 )
37 (func (;2;) (type 1) (param i32 i32 i32 i32) (result i32)
38 unreachable
39 )
40 )
41 (core module $wit-component-shim-module (;2;)
42 (type (;0;) (func (param i32 i32)))
43 (table (;0;) 2 2 funcref)
44 (export "0" (func $indirect-$root-foo))
45 (export "1" (func $indirect-foo:foo/adapter-imports-foo))
46 (export "$imports" (table 0))
47 (func $indirect-$root-foo (;0;) (type 0) (param i32 i32)
48 local.get 0
49 local.get 1
50 i32.const 0
51 call_indirect (type 0)
52 )
53 (func $indirect-foo:foo/adapter-imports-foo (;1;) (type 0) (param i32 i32)
54 local.get 0
55 local.get 1
56 i32.const 1
57 call_indirect (type 0)
58 )
59 (@producers
60 (processed-by "wit-component" "$CARGO_PKG_VERSION")
61 )
62 )
63 (core module $wit-component-fixup (;3;)
64 (type (;0;) (func (param i32 i32)))
65 (import "" "0" (func (;0;) (type 0)))
66 (import "" "1" (func (;1;) (type 0)))
67 (import "" "$imports" (table (;0;) 2 2 funcref))
68 (elem (;0;) (i32.const 0) func 0 1)
69 (@producers
70 (processed-by "wit-component" "$CARGO_PKG_VERSION")
71 )
72 )
73 (core instance $wit-component-shim-instance (;0;) (instantiate $wit-component-shim-module))
74 (alias core export $wit-component-shim-instance "0" (core func $indirect-$root-foo (;0;)))
75 (core instance $$root (;1;)
76 (export "foo" (func $indirect-$root-foo))
77 )
78 (core instance $main (;2;) (instantiate $main
79 (with "$root" (instance $$root))
80 )
81 )
82 (alias core export $main "memory" (core memory $memory (;0;)))
83 (alias core export $wit-component-shim-instance "1" (core func $indirect-foo:foo/adapter-imports-foo (;1;)))
84 (core instance $foo:foo/adapter-imports (;3;)
85 (export "foo" (func $indirect-foo:foo/adapter-imports-foo))
86 )
87 (core instance $unused (;4;) (instantiate $wit-component:adapter:unused
88 (with "foo:foo/adapter-imports" (instance $foo:foo/adapter-imports))
89 )
90 )
91 (alias core export $wit-component-shim-instance "$imports" (core table $"shim table" (;0;)))
92 (core func $"#core-func2 indirect-$root-foo" (@name "indirect-$root-foo") (;2;) (canon lower (func $foo) (memory $memory) string-encoding=utf8))
93 (alias export $foo:foo/adapter-imports "foo" (func $"#func1 foo" (@name "foo") (;1;)))
94 (core func $"#core-func3 indirect-foo:foo/adapter-imports-foo" (@name "indirect-foo:foo/adapter-imports-foo") (;3;) (canon lower (func $"#func1 foo") (memory $memory) string-encoding=utf8))
95 (core instance $fixup-args (;5;)
96 (export "$imports" (table $"shim table"))
97 (export "0" (func $"#core-func2 indirect-$root-foo"))
98 (export "1" (func $"#core-func3 indirect-foo:foo/adapter-imports-foo"))
99 )
100 (core instance $fixup (;6;) (instantiate $wit-component-fixup
101 (with "" (instance $fixup-args))
102 )
103 )
104 (type (;2;) (func))
105 (alias core export $main "bar" (core func $bar (;4;)))
106 (func $bar (;2;) (type 2) (canon lift (core func $bar)))
107 (export $"#func3 bar" (@name "bar") (;3;) "bar" (func $bar))
108 (alias core export $unused "adapter-bar" (core func $adapter-bar (;5;)))
109 (alias core export $unused "cabi_export_realloc" (core func $cabi_export_realloc (;6;)))
110 (func $adapter-bar (;4;) (type 1) (canon lift (core func $adapter-bar) (memory $memory) (realloc $cabi_export_realloc) string-encoding=utf8))
111 (export $"#func5 adapter-bar" (@name "adapter-bar") (;5;) "adapter-bar" (func $adapter-bar))
112 (@producers
113 (processed-by "wit-component" "$CARGO_PKG_VERSION")
114 )
115 )