Debian Codegraph @

vendor/wit-component/tests/components/merge-import-versions-with-adapter/component.wat

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