forked from bytecodealliance/wasm-tools
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcomponent.wat
286 lines (286 loc) · 11.1 KB
/
component.wat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
(component
(core module (;0;)
(type (;0;) (func (param i32 i32 i32 i32) (result i32)))
(type (;1;) (func))
(type (;2;) (func (param i32 i32)))
(type (;3;) (func (param i32 i32 i32)))
(type (;4;) (func (param i32)))
(type (;5;) (func (result i32)))
(memory (;0;) 1)
(export "memory" (memory 0))
(export "cabi_realloc" (func 0))
(export "foo:foo/my-default#a" (func 1))
(export "foo:foo/my-default#b" (func 2))
(export "foo:foo/my-default#c" (func 3))
(export "foo:foo/my-default#d" (func 4))
(export "foo:foo/my-default#e" (func 5))
(export "foo:foo/my-default#f" (func 6))
(export "foo:foo/my-default#g" (func 7))
(export "foo:foo/my-default#h" (func 8))
(export "foo:foo/my-default#i" (func 9))
(export "foo:foo/my-default#j" (func 10))
(export "foo:foo/my-default#k" (func 11))
(export "foo:foo/my-default#l" (func 12))
(export "cabi_post_foo:foo/my-default#l" (func 13))
(export "foo:foo/my-default#m" (func 14))
(export "cabi_post_foo:foo/my-default#m" (func 15))
(export "foo:foo/my-default#n" (func 16))
(export "foo:foo/my-default#o" (func 17))
(export "cabi_post_foo:foo/my-default#o" (func 18))
(export "foo:foo/my-default#p" (func 19))
(export "cabi_post_foo:foo/my-default#p" (func 20))
(func (;0;) (type 0) (param i32 i32 i32 i32) (result i32)
unreachable
)
(func (;1;) (type 1)
unreachable
)
(func (;2;) (type 2) (param i32 i32)
unreachable
)
(func (;3;) (type 2) (param i32 i32)
unreachable
)
(func (;4;) (type 3) (param i32 i32 i32)
unreachable
)
(func (;5;) (type 4) (param i32)
unreachable
)
(func (;6;) (type 2) (param i32 i32)
unreachable
)
(func (;7;) (type 2) (param i32 i32)
unreachable
)
(func (;8;) (type 2) (param i32 i32)
unreachable
)
(func (;9;) (type 2) (param i32 i32)
unreachable
)
(func (;10;) (type 4) (param i32)
unreachable
)
(func (;11;) (type 5) (result i32)
unreachable
)
(func (;12;) (type 5) (result i32)
unreachable
)
(func (;13;) (type 4) (param i32)
unreachable
)
(func (;14;) (type 5) (result i32)
unreachable
)
(func (;15;) (type 4) (param i32)
unreachable
)
(func (;16;) (type 5) (result i32)
unreachable
)
(func (;17;) (type 5) (result i32)
unreachable
)
(func (;18;) (type 4) (param i32)
unreachable
)
(func (;19;) (type 5) (result i32)
unreachable
)
(func (;20;) (type 4) (param i32)
unreachable
)
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
(processed-by "my-fake-bindgen" "123.45")
)
)
(type (;0;) (record (field "s" string)))
(type (;1;) (record (field "s" u32)))
(type (;2;) (variant (case "s" string)))
(type (;3;) (variant (case "s" u32)))
(core instance (;0;) (instantiate 0))
(alias core export 0 "memory" (core memory (;0;)))
(type (;4;) (func))
(alias core export 0 "foo:foo/my-default#a" (core func (;0;)))
(alias core export 0 "cabi_realloc" (core func (;1;)))
(func (;0;) (type 4) (canon lift (core func 0)))
(type (;5;) (list string))
(type (;6;) (func (param "x" 5)))
(alias core export 0 "foo:foo/my-default#b" (core func (;2;)))
(func (;1;) (type 6) (canon lift (core func 2) (memory 0) (realloc 1) string-encoding=utf8))
(type (;7;) (func (param "x" 0)))
(alias core export 0 "foo:foo/my-default#c" (core func (;3;)))
(func (;2;) (type 7) (canon lift (core func 3) (memory 0) (realloc 1) string-encoding=utf8))
(type (;8;) (func (param "x" 2)))
(alias core export 0 "foo:foo/my-default#d" (core func (;4;)))
(func (;3;) (type 8) (canon lift (core func 4) (memory 0) (realloc 1) string-encoding=utf8))
(type (;9;) (func (param "x" 1)))
(alias core export 0 "foo:foo/my-default#e" (core func (;5;)))
(func (;4;) (type 9) (canon lift (core func 5)))
(type (;10;) (func (param "x" 3)))
(alias core export 0 "foo:foo/my-default#f" (core func (;6;)))
(func (;5;) (type 10) (canon lift (core func 6)))
(type (;11;) (list 0))
(type (;12;) (func (param "x" 11)))
(alias core export 0 "foo:foo/my-default#g" (core func (;7;)))
(func (;6;) (type 12) (canon lift (core func 7) (memory 0) (realloc 1) string-encoding=utf8))
(type (;13;) (list 2))
(type (;14;) (func (param "x" 13)))
(alias core export 0 "foo:foo/my-default#h" (core func (;8;)))
(func (;7;) (type 14) (canon lift (core func 8) (memory 0) (realloc 1) string-encoding=utf8))
(type (;15;) (list u32))
(type (;16;) (func (param "x" 15)))
(alias core export 0 "foo:foo/my-default#i" (core func (;9;)))
(func (;8;) (type 16) (canon lift (core func 9) (memory 0) (realloc 1)))
(type (;17;) (func (param "x" u32)))
(alias core export 0 "foo:foo/my-default#j" (core func (;10;)))
(func (;9;) (type 17) (canon lift (core func 10)))
(type (;18;) (tuple u32 u32))
(type (;19;) (func (result 18)))
(alias core export 0 "foo:foo/my-default#k" (core func (;11;)))
(func (;10;) (type 19) (canon lift (core func 11) (memory 0)))
(type (;20;) (func (result string)))
(alias core export 0 "foo:foo/my-default#l" (core func (;12;)))
(alias core export 0 "cabi_post_foo:foo/my-default#l" (core func (;13;)))
(func (;11;) (type 20) (canon lift (core func 12) (memory 0) string-encoding=utf8 (post-return 13)))
(type (;21;) (func (result 15)))
(alias core export 0 "foo:foo/my-default#m" (core func (;14;)))
(alias core export 0 "cabi_post_foo:foo/my-default#m" (core func (;15;)))
(func (;12;) (type 21) (canon lift (core func 14) (memory 0) (post-return 15)))
(type (;22;) (func (result u32)))
(alias core export 0 "foo:foo/my-default#n" (core func (;16;)))
(func (;13;) (type 22) (canon lift (core func 16)))
(type (;23;) (func (result 2)))
(alias core export 0 "foo:foo/my-default#o" (core func (;17;)))
(alias core export 0 "cabi_post_foo:foo/my-default#o" (core func (;18;)))
(func (;14;) (type 23) (canon lift (core func 17) (memory 0) string-encoding=utf8 (post-return 18)))
(type (;24;) (list 3))
(type (;25;) (func (result 24)))
(alias core export 0 "foo:foo/my-default#p" (core func (;19;)))
(alias core export 0 "cabi_post_foo:foo/my-default#p" (core func (;20;)))
(func (;15;) (type 25) (canon lift (core func 19) (memory 0) (post-return 20)))
(component (;0;)
(type (;0;) (func))
(import "import-func-a" (func (;0;) (type 0)))
(type (;1;) (list string))
(type (;2;) (func (param "x" 1)))
(import "import-func-b" (func (;1;) (type 2)))
(type (;3;) (record (field "s" string)))
(import "import-type-r" (type (;4;) (eq 3)))
(type (;5;) (func (param "x" 4)))
(import "import-func-c" (func (;2;) (type 5)))
(type (;6;) (variant (case "s" string)))
(import "import-type-v" (type (;7;) (eq 6)))
(type (;8;) (func (param "x" 7)))
(import "import-func-d" (func (;3;) (type 8)))
(type (;9;) (record (field "s" u32)))
(import "import-type-r-no-string" (type (;10;) (eq 9)))
(type (;11;) (func (param "x" 10)))
(import "import-func-e" (func (;4;) (type 11)))
(type (;12;) (variant (case "s" u32)))
(import "import-type-v-no-string" (type (;13;) (eq 12)))
(type (;14;) (func (param "x" 13)))
(import "import-func-f" (func (;5;) (type 14)))
(type (;15;) (list 4))
(type (;16;) (func (param "x" 15)))
(import "import-func-g" (func (;6;) (type 16)))
(type (;17;) (list 7))
(type (;18;) (func (param "x" 17)))
(import "import-func-h" (func (;7;) (type 18)))
(type (;19;) (list u32))
(type (;20;) (func (param "x" 19)))
(import "import-func-i" (func (;8;) (type 20)))
(type (;21;) (func (param "x" u32)))
(import "import-func-j" (func (;9;) (type 21)))
(type (;22;) (tuple u32 u32))
(type (;23;) (func (result 22)))
(import "import-func-k" (func (;10;) (type 23)))
(type (;24;) (func (result string)))
(import "import-func-l" (func (;11;) (type 24)))
(type (;25;) (func (result 19)))
(import "import-func-m" (func (;12;) (type 25)))
(type (;26;) (func (result u32)))
(import "import-func-n" (func (;13;) (type 26)))
(type (;27;) (func (result 7)))
(import "import-func-o" (func (;14;) (type 27)))
(type (;28;) (list 13))
(type (;29;) (func (result 28)))
(import "import-func-p" (func (;15;) (type 29)))
(type (;30;) (record (field "s" string)))
(export (;31;) "r" (type 30))
(type (;32;) (record (field "s" u32)))
(export (;33;) "r-no-string" (type 32))
(type (;34;) (variant (case "s" string)))
(export (;35;) "v" (type 34))
(type (;36;) (variant (case "s" u32)))
(export (;37;) "v-no-string" (type 36))
(type (;38;) (func))
(export (;16;) "a" (func 0) (func (type 38)))
(type (;39;) (list string))
(type (;40;) (func (param "x" 39)))
(export (;17;) "b" (func 1) (func (type 40)))
(type (;41;) (func (param "x" 31)))
(export (;18;) "c" (func 2) (func (type 41)))
(type (;42;) (func (param "x" 35)))
(export (;19;) "d" (func 3) (func (type 42)))
(type (;43;) (func (param "x" 33)))
(export (;20;) "e" (func 4) (func (type 43)))
(type (;44;) (func (param "x" 37)))
(export (;21;) "f" (func 5) (func (type 44)))
(type (;45;) (list 31))
(type (;46;) (func (param "x" 45)))
(export (;22;) "g" (func 6) (func (type 46)))
(type (;47;) (list 35))
(type (;48;) (func (param "x" 47)))
(export (;23;) "h" (func 7) (func (type 48)))
(type (;49;) (list u32))
(type (;50;) (func (param "x" 49)))
(export (;24;) "i" (func 8) (func (type 50)))
(type (;51;) (func (param "x" u32)))
(export (;25;) "j" (func 9) (func (type 51)))
(type (;52;) (tuple u32 u32))
(type (;53;) (func (result 52)))
(export (;26;) "k" (func 10) (func (type 53)))
(type (;54;) (func (result string)))
(export (;27;) "l" (func 11) (func (type 54)))
(type (;55;) (func (result 49)))
(export (;28;) "m" (func 12) (func (type 55)))
(type (;56;) (func (result u32)))
(export (;29;) "n" (func 13) (func (type 56)))
(type (;57;) (func (result 35)))
(export (;30;) "o" (func 14) (func (type 57)))
(type (;58;) (list 37))
(type (;59;) (func (result 58)))
(export (;31;) "p" (func 15) (func (type 59)))
)
(instance (;0;) (instantiate 0
(with "import-func-a" (func 0))
(with "import-func-b" (func 1))
(with "import-func-c" (func 2))
(with "import-func-d" (func 3))
(with "import-func-e" (func 4))
(with "import-func-f" (func 5))
(with "import-func-g" (func 6))
(with "import-func-h" (func 7))
(with "import-func-i" (func 8))
(with "import-func-j" (func 9))
(with "import-func-k" (func 10))
(with "import-func-l" (func 11))
(with "import-func-m" (func 12))
(with "import-func-n" (func 13))
(with "import-func-o" (func 14))
(with "import-func-p" (func 15))
(with "import-type-r" (type 0))
(with "import-type-v" (type 2))
(with "import-type-r-no-string" (type 1))
(with "import-type-v-no-string" (type 3))
)
)
(export (;1;) "foo:foo/my-default" (instance 0))
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)