/src/wasm-tools/crates/wit-component/src/gc.rs
Line | Count | Source |
1 | | use self::bitvec::BitVec; |
2 | | use anyhow::{Result, bail}; |
3 | | use indexmap::{IndexMap, IndexSet}; |
4 | | use std::{ |
5 | | borrow::Cow, |
6 | | collections::{HashMap, HashSet}, |
7 | | convert::Infallible, |
8 | | mem, |
9 | | ops::Deref, |
10 | | }; |
11 | | use wasm_encoder::{Encode, EntityType, RawCustomSection, reencode::Reencode}; |
12 | | use wasmparser::*; |
13 | | |
14 | | const PAGE_SIZE: i32 = 64 * 1024; |
15 | | |
16 | | /// This function will reduce the input core `wasm` module to only the set of |
17 | | /// exports `required`. |
18 | | /// |
19 | | /// This internally performs a "gc" pass after removing exports to ensure that |
20 | | /// the resulting module imports the minimal set of functions necessary. |
21 | 0 | pub fn run( |
22 | 0 | wasm: &[u8], |
23 | 0 | required: &IndexSet<String>, |
24 | 0 | main_module_realloc: Option<&str>, |
25 | 0 | ) -> Result<Vec<u8>> { |
26 | 0 | assert!(!required.is_empty()); |
27 | | |
28 | 0 | let mut module = Module::default(); |
29 | 0 | module.parse(wasm)?; |
30 | | |
31 | | // Make sure that all required names are present in the module, and then |
32 | | // remove all names that are not required. |
33 | 0 | for name in required { |
34 | 0 | if !module.exports.contains_key(name.as_str()) { |
35 | 0 | bail!("adapter module does not have export `{name}`") |
36 | 0 | } |
37 | | } |
38 | 0 | let mut not_required = IndexSet::new(); |
39 | 0 | for name in module.exports.keys().copied() { |
40 | 0 | if !required.contains(name) { |
41 | 0 | not_required.insert(name); |
42 | 0 | } |
43 | | } |
44 | 0 | for name in not_required { |
45 | 0 | module.exports.swap_remove(name); |
46 | 0 | } |
47 | 0 | assert!(!module.exports.is_empty()); |
48 | 0 | module.liveness()?; |
49 | 0 | module.encode(main_module_realloc) |
50 | 0 | } |
51 | | |
52 | | /// This function generates a Wasm function body which implements `cabi_realloc` in terms of `memory.grow`. It |
53 | | /// only accepts new, page-sized allocations. |
54 | 0 | fn realloc_via_memory_grow() -> wasm_encoder::Function { |
55 | 0 | let mut func = wasm_encoder::Function::new([(1, wasm_encoder::ValType::I32)]); |
56 | | |
57 | | // Assert `old_ptr` is null. |
58 | 0 | func.instructions().i32_const(0); |
59 | 0 | func.instructions().local_get(0); |
60 | 0 | func.instructions().i32_ne(); |
61 | 0 | func.instructions().if_(wasm_encoder::BlockType::Empty); |
62 | 0 | func.instructions().unreachable(); |
63 | 0 | func.instructions().end(); |
64 | | |
65 | | // Assert `old_len` is zero. |
66 | 0 | func.instructions().i32_const(0); |
67 | 0 | func.instructions().local_get(1); |
68 | 0 | func.instructions().i32_ne(); |
69 | 0 | func.instructions().if_(wasm_encoder::BlockType::Empty); |
70 | 0 | func.instructions().unreachable(); |
71 | 0 | func.instructions().end(); |
72 | | |
73 | | // Assert `new_len` is equal to the page size (which is the only value we currently support) |
74 | | // Note: we could easily support arbitrary multiples of PAGE_SIZE here if the need arises. |
75 | 0 | func.instructions().i32_const(PAGE_SIZE); |
76 | 0 | func.instructions().local_get(3); |
77 | 0 | func.instructions().i32_ne(); |
78 | 0 | func.instructions().if_(wasm_encoder::BlockType::Empty); |
79 | 0 | func.instructions().unreachable(); |
80 | 0 | func.instructions().end(); |
81 | | |
82 | | // Grow the memory by 1 page. |
83 | 0 | func.instructions().i32_const(1); |
84 | 0 | func.instructions().memory_grow(0); |
85 | 0 | func.instructions().local_tee(4); |
86 | | |
87 | | // Test if the return value of the growth was -1 and, if so, trap due to a failed allocation. |
88 | 0 | func.instructions().i32_const(-1); |
89 | 0 | func.instructions().i32_eq(); |
90 | 0 | func.instructions().if_(wasm_encoder::BlockType::Empty); |
91 | 0 | func.instructions().unreachable(); |
92 | 0 | func.instructions().end(); |
93 | | |
94 | 0 | func.instructions().local_get(4); |
95 | 0 | func.instructions().i32_const(16); |
96 | 0 | func.instructions().i32_shl(); |
97 | 0 | func.instructions().end(); |
98 | | |
99 | 0 | func |
100 | 0 | } |
101 | | |
102 | | #[repr(i32)] |
103 | | #[non_exhaustive] |
104 | | enum StackAllocationState { |
105 | | Unallocated, |
106 | | Allocating, |
107 | | Allocated, |
108 | | } |
109 | | |
110 | 0 | fn allocate_stack_via_realloc( |
111 | 0 | realloc_index: u32, |
112 | 0 | sp: u32, |
113 | 0 | allocation_state: Option<u32>, |
114 | 0 | ) -> wasm_encoder::Function { |
115 | 0 | let mut func = wasm_encoder::Function::new([]); |
116 | | |
117 | 0 | if let Some(allocation_state) = allocation_state { |
118 | 0 | // This means we're lazily allocating the stack, keeping track of state via `$allocation_state` |
119 | 0 | func.instructions().global_get(allocation_state); |
120 | 0 | func.instructions() |
121 | 0 | .i32_const(StackAllocationState::Unallocated as _); |
122 | 0 | func.instructions().i32_eq(); |
123 | 0 | func.instructions().if_(wasm_encoder::BlockType::Empty); |
124 | 0 | func.instructions() |
125 | 0 | .i32_const(StackAllocationState::Allocating as _); |
126 | 0 | func.instructions().global_set(allocation_state); |
127 | 0 | // We could also set `sp` to zero here to ensure the yet-to-be-allocated stack is empty. However, we |
128 | 0 | // assume it defaults to zero anyway, in which case setting it would be redundant. |
129 | 0 | } |
130 | | |
131 | 0 | func.instructions().i32_const(0); |
132 | 0 | func.instructions().i32_const(0); |
133 | 0 | func.instructions().i32_const(8); |
134 | 0 | func.instructions().i32_const(PAGE_SIZE); |
135 | 0 | func.instructions().call(realloc_index); |
136 | 0 | func.instructions().i32_const(PAGE_SIZE); |
137 | 0 | func.instructions().i32_add(); |
138 | 0 | func.instructions().global_set(sp); |
139 | | |
140 | 0 | if let Some(allocation_state) = allocation_state { |
141 | 0 | func.instructions() |
142 | 0 | .i32_const(StackAllocationState::Allocated as _); |
143 | 0 | func.instructions().global_set(allocation_state); |
144 | 0 | func.instructions().end(); |
145 | 0 | } |
146 | | |
147 | 0 | func.instructions().end(); |
148 | | |
149 | 0 | func |
150 | 0 | } |
151 | | |
152 | | // Represents a function called while processing a module work list. |
153 | | type WorklistFunc<'a> = fn(&mut Module<'a>, u32) -> Result<()>; |
154 | | |
155 | | // Representation of a wasm module which is used to GC a module to its minimal |
156 | | // set of required items necessary to implement the `exports` |
157 | | // |
158 | | // Note that this is not a complete representation of a wasm module since it |
159 | | // doesn't represent everything such as data and element segments. This is only |
160 | | // used for adapter modules which otherwise have these restrictions and makes |
161 | | // this gc pass a bit easier to write. |
162 | | #[derive(Default)] |
163 | | struct Module<'a> { |
164 | | // Definitions found when parsing a module |
165 | | types: Vec<FuncType>, |
166 | | tables: Vec<Table<'a>>, |
167 | | globals: Vec<Global<'a>>, |
168 | | memories: Vec<Memory<'a>>, |
169 | | funcs: Vec<Func<'a>>, |
170 | | exports: IndexMap<&'a str, Export<'a>>, |
171 | | func_names: HashMap<u32, &'a str>, |
172 | | global_names: HashMap<u32, &'a str>, |
173 | | producers: Option<wasm_metadata::Producers>, |
174 | | |
175 | | // Known-live sets of indices after the `liveness` pass has run. |
176 | | live_types: BitVec, |
177 | | live_tables: BitVec, |
178 | | live_globals: BitVec, |
179 | | live_memories: BitVec, |
180 | | live_funcs: BitVec, |
181 | | |
182 | | // Helper data structure used during the `liveness` path to avoid recursion. |
183 | | // When calculating the liveness of an item this `worklist` is pushed to and |
184 | | // then processed until it's empty. An item pushed onto this list represents |
185 | | // a new index that has been discovered to be live and the function is what |
186 | | // walks the item's definition to find other items that it references. |
187 | | worklist: Vec<(u32, WorklistFunc<'a>)>, |
188 | | } |
189 | | |
190 | | struct Table<'a> { |
191 | | def: Definition<'a, ()>, |
192 | | ty: TableType, |
193 | | } |
194 | | |
195 | | struct Memory<'a> { |
196 | | def: Definition<'a, ()>, |
197 | | ty: MemoryType, |
198 | | } |
199 | | |
200 | | struct Global<'a> { |
201 | | def: Definition<'a, ConstExpr<'a>>, |
202 | | ty: GlobalType, |
203 | | } |
204 | | |
205 | | #[derive(Clone)] |
206 | | struct Func<'a> { |
207 | | def: Definition<'a, FunctionBody<'a>>, |
208 | | ty: u32, |
209 | | } |
210 | | |
211 | | #[derive(Clone)] |
212 | | enum Definition<'a, T> { |
213 | | Import(&'a str, &'a str), |
214 | | Local(T), |
215 | | } |
216 | | |
217 | | impl<'a> Module<'a> { |
218 | 0 | fn parse(&mut self, wasm: &'a [u8]) -> Result<()> { |
219 | 0 | let mut next_code_index = 0; |
220 | 0 | let mut validator = Validator::new(); |
221 | 0 | for payload in Parser::new(0).parse_all(wasm) { |
222 | 0 | let payload = payload?; |
223 | 0 | validator.payload(&payload)?; |
224 | 0 | match payload { |
225 | 0 | Payload::Version { encoding, .. } => { |
226 | 0 | if encoding != Encoding::Module { |
227 | 0 | bail!("adapter must be a core wasm module, not a component"); |
228 | 0 | } |
229 | | } |
230 | 0 | Payload::End(_) => {} |
231 | 0 | Payload::TypeSection(s) => { |
232 | 0 | for ty in s.into_iter_err_on_gc_types() { |
233 | 0 | self.types.push(ty?); |
234 | | } |
235 | | } |
236 | 0 | Payload::ImportSection(s) => { |
237 | 0 | for i in s { |
238 | 0 | let i = i?; |
239 | 0 | match i.ty { |
240 | 0 | TypeRef::Func(ty) => self.funcs.push(Func { |
241 | 0 | def: Definition::Import(i.module, i.name), |
242 | 0 | ty, |
243 | 0 | }), |
244 | 0 | TypeRef::Table(ty) => self.tables.push(Table { |
245 | 0 | def: Definition::Import(i.module, i.name), |
246 | 0 | ty, |
247 | 0 | }), |
248 | 0 | TypeRef::Global(ty) => self.globals.push(Global { |
249 | 0 | def: Definition::Import(i.module, i.name), |
250 | 0 | ty, |
251 | 0 | }), |
252 | 0 | TypeRef::Memory(ty) => self.memories.push(Memory { |
253 | 0 | def: Definition::Import(i.module, i.name), |
254 | 0 | ty, |
255 | 0 | }), |
256 | 0 | TypeRef::Tag(_) => bail!("unsupported `tag` type"), |
257 | | TypeRef::FuncExact(_) => { |
258 | 0 | bail!("unsupported `func_exact` type") |
259 | | } |
260 | | } |
261 | | } |
262 | | } |
263 | 0 | Payload::TableSection(s) => { |
264 | 0 | for table in s { |
265 | 0 | let table = table?; |
266 | 0 | self.tables.push(Table { |
267 | 0 | def: Definition::Local(()), |
268 | 0 | ty: table.ty, |
269 | 0 | }); |
270 | | } |
271 | | } |
272 | 0 | Payload::MemorySection(s) => { |
273 | 0 | for ty in s { |
274 | 0 | let ty = ty?; |
275 | 0 | self.memories.push(Memory { |
276 | 0 | def: Definition::Local(()), |
277 | 0 | ty, |
278 | 0 | }); |
279 | | } |
280 | | } |
281 | 0 | Payload::GlobalSection(s) => { |
282 | 0 | for g in s { |
283 | 0 | let g = g?; |
284 | 0 | self.globals.push(Global { |
285 | 0 | def: Definition::Local(g.init_expr), |
286 | 0 | ty: g.ty, |
287 | 0 | }); |
288 | | } |
289 | | } |
290 | | |
291 | 0 | Payload::ExportSection(s) => { |
292 | 0 | for e in s { |
293 | 0 | let e = e?; |
294 | 0 | self.exports.insert(e.name, e); |
295 | | } |
296 | | } |
297 | | |
298 | 0 | Payload::FunctionSection(s) => { |
299 | 0 | next_code_index = self.funcs.len(); |
300 | 0 | for ty in s { |
301 | 0 | let ty = ty?; |
302 | 0 | self.funcs.push(Func { |
303 | 0 | // Specify a dummy definition to get filled in later |
304 | 0 | // when parsing the code section. |
305 | 0 | def: Definition::Local(FunctionBody::new(BinaryReader::new(&[], 0))), |
306 | 0 | ty, |
307 | 0 | }); |
308 | | } |
309 | | } |
310 | | |
311 | 0 | Payload::CodeSectionStart { .. } => {} |
312 | 0 | Payload::CodeSectionEntry(body) => { |
313 | 0 | self.funcs[next_code_index].def = Definition::Local(body); |
314 | 0 | next_code_index += 1; |
315 | 0 | } |
316 | | |
317 | | // Ignore all custom sections except for the `name` and |
318 | | // `producers` sections which we parse, but ignore errors within. |
319 | 0 | Payload::CustomSection(s) => match s.as_known() { |
320 | 0 | KnownCustom::Name(s) => drop(self.parse_name_section(s)), |
321 | 0 | KnownCustom::Producers(_) => drop(self.parse_producers_section(&s)), |
322 | 0 | _ => {} |
323 | | }, |
324 | | |
325 | | // sections that shouldn't appear in the specially-crafted core |
326 | | // wasm adapter self we're processing |
327 | 0 | other => match other.as_section() { |
328 | 0 | Some((id, _)) => bail!("unsupported section `{}` in adapter", id), |
329 | 0 | None => bail!("unsupported payload in adapter"), |
330 | | }, |
331 | | } |
332 | | } |
333 | | |
334 | 0 | Ok(()) |
335 | 0 | } |
336 | | |
337 | 0 | fn parse_name_section(&mut self, section: NameSectionReader<'a>) -> Result<()> { |
338 | 0 | for s in section { |
339 | 0 | match s? { |
340 | 0 | Name::Function(map) => { |
341 | 0 | for naming in map { |
342 | 0 | let naming = naming?; |
343 | 0 | self.func_names.insert(naming.index, naming.name); |
344 | | } |
345 | | } |
346 | 0 | Name::Global(map) => { |
347 | 0 | for naming in map { |
348 | 0 | let naming = naming?; |
349 | 0 | self.global_names.insert(naming.index, naming.name); |
350 | | } |
351 | | } |
352 | 0 | _ => {} |
353 | | } |
354 | | } |
355 | 0 | Ok(()) |
356 | 0 | } |
357 | | |
358 | 0 | fn parse_producers_section(&mut self, section: &CustomSectionReader<'a>) -> Result<()> { |
359 | 0 | let producers = |
360 | 0 | wasm_metadata::Producers::from_bytes(section.data(), section.data_offset())?; |
361 | 0 | self.producers = Some(producers); |
362 | 0 | Ok(()) |
363 | 0 | } |
364 | | |
365 | | /// Iteratively calculates the set of live items within this module |
366 | | /// considering all exports as the root of live functions. |
367 | 0 | fn liveness(&mut self) -> Result<()> { |
368 | 0 | let exports = mem::take(&mut self.exports); |
369 | 0 | for (_, e) in exports.iter() { |
370 | 0 | match e.kind { |
371 | 0 | ExternalKind::Func | ExternalKind::FuncExact => self.func(e.index), |
372 | 0 | ExternalKind::Global => self.global(e.index), |
373 | 0 | ExternalKind::Table => self.table(e.index), |
374 | 0 | ExternalKind::Memory => self.memory(e.index), |
375 | 0 | ExternalKind::Tag => bail!("unsupported exported tag"), |
376 | | } |
377 | | } |
378 | 0 | self.exports = exports; |
379 | | |
380 | 0 | while let Some((idx, func)) = self.worklist.pop() { |
381 | 0 | func(self, idx)?; |
382 | | } |
383 | 0 | Ok(()) |
384 | 0 | } |
385 | | |
386 | 0 | fn func(&mut self, func: u32) { |
387 | 0 | if !self.live_funcs.insert(func) { |
388 | 0 | return; |
389 | 0 | } |
390 | 0 | self.worklist.push((func, |me, func| { |
391 | 0 | let func = me.funcs[func as usize].clone(); |
392 | 0 | me.ty(func.ty); |
393 | 0 | let mut body = match &func.def { |
394 | 0 | Definition::Import(..) => return Ok(()), |
395 | 0 | Definition::Local(e) => e.get_binary_reader(), |
396 | | }; |
397 | 0 | let local_count = body.read_var_u32()?; |
398 | 0 | for _ in 0..local_count { |
399 | 0 | body.read_var_u32()?; |
400 | 0 | body.read::<ValType>()?; |
401 | | } |
402 | 0 | me.operators(body) |
403 | 0 | })); |
404 | 0 | } |
405 | | |
406 | 0 | fn global(&mut self, global: u32) { |
407 | 0 | if !self.live_globals.insert(global) { |
408 | 0 | return; |
409 | 0 | } |
410 | 0 | self.worklist.push((global, |me, global| { |
411 | 0 | let init = match &me.globals[global as usize].def { |
412 | 0 | Definition::Import(..) => return Ok(()), |
413 | 0 | Definition::Local(e) => e, |
414 | | }; |
415 | 0 | me.operators(init.get_binary_reader()) |
416 | 0 | })); |
417 | 0 | } |
418 | | |
419 | 0 | fn table(&mut self, table: u32) { |
420 | 0 | if !self.live_tables.insert(table) { |
421 | 0 | return; |
422 | 0 | } |
423 | 0 | self.worklist.push((table, |me, table| { |
424 | 0 | let ty = me.tables[table as usize].ty.element_type; |
425 | 0 | me.valty(ty.into()); |
426 | 0 | Ok(()) |
427 | 0 | })); |
428 | 0 | } |
429 | | |
430 | 0 | fn memory(&mut self, memory: u32) { |
431 | 0 | self.live_memories.insert(memory); |
432 | 0 | } |
433 | | |
434 | 0 | fn blockty(&mut self, ty: BlockType) { |
435 | 0 | if let BlockType::FuncType(ty) = ty { |
436 | 0 | self.ty(ty); |
437 | 0 | } |
438 | 0 | } |
439 | | |
440 | 0 | fn valty(&mut self, ty: ValType) { |
441 | 0 | match ty { |
442 | 0 | ValType::Ref(r) => self.refty(r), |
443 | 0 | ValType::I32 | ValType::I64 | ValType::F32 | ValType::F64 | ValType::V128 => {} |
444 | | } |
445 | 0 | } |
446 | | |
447 | 0 | fn valtys(&mut self, tys: &[ValType]) { |
448 | 0 | for i in tys { |
449 | 0 | self.valty(*i); |
450 | 0 | } |
451 | 0 | } |
452 | | |
453 | 0 | fn refty(&mut self, ty: RefType) { |
454 | 0 | self.heapty(ty.heap_type()) |
455 | 0 | } |
456 | | |
457 | 0 | fn heapty(&mut self, ty: HeapType) { |
458 | 0 | match ty { |
459 | 0 | HeapType::Abstract { .. } => {} |
460 | 0 | HeapType::Concrete(i) | HeapType::Exact(i) => self.ty(i.as_module_index().unwrap()), |
461 | | } |
462 | 0 | } |
463 | | |
464 | 0 | fn ty(&mut self, ty: u32) { |
465 | 0 | if !self.live_types.insert(ty) { |
466 | 0 | return; |
467 | 0 | } |
468 | 0 | self.worklist.push((ty, |me, ty| { |
469 | 0 | let ty = me.types[ty as usize].clone(); |
470 | 0 | for param in ty.params().iter().chain(ty.results()) { |
471 | 0 | me.valty(*param); |
472 | 0 | } |
473 | 0 | Ok(()) |
474 | 0 | })); |
475 | 0 | } |
476 | | |
477 | 0 | fn operators(&mut self, reader: BinaryReader<'a>) -> Result<()> { |
478 | 0 | let mut ops = OperatorsReader::new(reader); |
479 | 0 | while !ops.eof() { |
480 | 0 | ops.visit_operator(self)?; |
481 | | } |
482 | 0 | ops.finish()?; |
483 | 0 | Ok(()) |
484 | 0 | } |
485 | | |
486 | 0 | fn live_types(&self) -> impl Iterator<Item = (u32, &FuncType)> + '_ { |
487 | 0 | live_iter(&self.live_types, self.types.iter()) |
488 | 0 | } |
489 | | |
490 | 0 | fn live_funcs(&self) -> impl Iterator<Item = (u32, &Func<'a>)> + '_ { |
491 | 0 | live_iter(&self.live_funcs, self.funcs.iter()) |
492 | 0 | } |
493 | | |
494 | 0 | fn live_memories(&self) -> impl Iterator<Item = (u32, &Memory<'a>)> + '_ { |
495 | 0 | live_iter(&self.live_memories, self.memories.iter()) |
496 | 0 | } |
497 | | |
498 | 0 | fn live_globals(&self) -> impl Iterator<Item = (u32, &Global<'a>)> + '_ { |
499 | 0 | live_iter(&self.live_globals, self.globals.iter()) |
500 | 0 | } |
501 | | |
502 | 0 | fn live_tables(&self) -> impl Iterator<Item = (u32, &Table<'a>)> + '_ { |
503 | 0 | live_iter(&self.live_tables, self.tables.iter()) |
504 | 0 | } |
505 | | |
506 | | /// Encodes this `Module` to a new wasm module which is gc'd and only |
507 | | /// contains the items that are live as calculated by the `liveness` pass. |
508 | 0 | fn encode(&mut self, main_module_realloc: Option<&str>) -> Result<Vec<u8>> { |
509 | | // Data structure used to track the mapping of old index to new index |
510 | | // for all live items. |
511 | 0 | let mut map = Encoder::default(); |
512 | | |
513 | | // Sections that will be assembled into the final module at the end of |
514 | | // this function. |
515 | 0 | let mut types = wasm_encoder::TypeSection::new(); |
516 | 0 | let mut imports = wasm_encoder::ImportSection::new(); |
517 | 0 | let mut funcs = wasm_encoder::FunctionSection::new(); |
518 | 0 | let mut tables = wasm_encoder::TableSection::new(); |
519 | 0 | let mut memories = wasm_encoder::MemorySection::new(); |
520 | 0 | let mut globals = wasm_encoder::GlobalSection::new(); |
521 | 0 | let mut code = wasm_encoder::CodeSection::new(); |
522 | | |
523 | 0 | let mut empty_type = None; |
524 | 0 | for (i, ty) in self.live_types() { |
525 | 0 | map.types.push(i); |
526 | | |
527 | 0 | let ty = map.func_type(ty.clone())?; |
528 | 0 | types.ty().func_type(&ty); |
529 | | |
530 | | // Keep track of the "empty type" to see if we can reuse an |
531 | | // existing one or one needs to be injected if a `start` |
532 | | // function is calculated at the end. |
533 | 0 | if ty.params().is_empty() && ty.results().is_empty() { |
534 | 0 | empty_type = Some(map.types.remap(i)); |
535 | 0 | } |
536 | | } |
537 | | |
538 | 0 | let mut num_memories = 0; |
539 | 0 | for (i, mem) in self.live_memories() { |
540 | 0 | map.memories.push(i); |
541 | 0 | let ty = map.memory_type(mem.ty); |
542 | 0 | match &mem.def { |
543 | 0 | Definition::Import(m, n) => { |
544 | 0 | imports.import(m, n, ty?); |
545 | | } |
546 | | Definition::Local(()) => { |
547 | 0 | memories.memory(ty?); |
548 | | } |
549 | | } |
550 | 0 | num_memories += 1; |
551 | | } |
552 | | |
553 | 0 | for (i, table) in self.live_tables() { |
554 | 0 | map.tables.push(i); |
555 | 0 | let ty = map.table_type(table.ty)?; |
556 | 0 | match &table.def { |
557 | 0 | Definition::Import(m, n) => { |
558 | 0 | imports.import(m, n, ty); |
559 | 0 | } |
560 | 0 | Definition::Local(()) => { |
561 | 0 | tables.table(ty); |
562 | 0 | } |
563 | | } |
564 | | } |
565 | | |
566 | 0 | for (i, global) in self.live_globals() { |
567 | 0 | map.globals.push(i); |
568 | 0 | let ty = map.global_type(global.ty)?; |
569 | 0 | match &global.def { |
570 | 0 | Definition::Import(m, n) => { |
571 | 0 | imports.import(m, n, ty); |
572 | 0 | } |
573 | 0 | Definition::Local(init) => { |
574 | 0 | let init = &map.const_expr(init.clone())?; |
575 | 0 | globals.global(ty, &init); |
576 | | } |
577 | | } |
578 | | } |
579 | | |
580 | 0 | let mut realloc_index = None; |
581 | 0 | let mut num_func_imports = 0; |
582 | | |
583 | | // For functions first assign a new index to all functions and then |
584 | | // afterwards actually map the body of all functions so the `map` of all |
585 | | // index mappings is fully populated before instructions are mapped. |
586 | | |
587 | 0 | let is_realloc = |
588 | 0 | |m, n| m == "__main_module__" && matches!(n, "canonical_abi_realloc" | "cabi_realloc"); |
589 | | |
590 | 0 | let (imported, local) = |
591 | 0 | self.live_funcs() |
592 | 0 | .partition::<Vec<_>, _>(|(_, func)| match &func.def { |
593 | 0 | Definition::Import(m, n) => { |
594 | 0 | !is_realloc(*m, *n) || main_module_realloc.is_some() |
595 | | } |
596 | 0 | Definition::Local(_) => false, |
597 | 0 | }); |
598 | | |
599 | 0 | for (i, func) in imported { |
600 | 0 | map.funcs.push(i); |
601 | 0 | let ty = map.types.remap(func.ty); |
602 | 0 | match &func.def { |
603 | 0 | Definition::Import(m, n) => { |
604 | 0 | let name = if is_realloc(*m, *n) { |
605 | | // The adapter is importing `cabi_realloc` from the main module, and the main module |
606 | | // exports that function, but possibly using a different name |
607 | | // (e.g. `canonical_abi_realloc`). Update the name to match if necessary. |
608 | 0 | realloc_index = Some(num_func_imports); |
609 | 0 | main_module_realloc.unwrap_or(n) |
610 | | } else { |
611 | 0 | n |
612 | | }; |
613 | 0 | imports.import(m, name, EntityType::Function(ty)); |
614 | 0 | num_func_imports += 1; |
615 | | } |
616 | 0 | Definition::Local(_) => unreachable!(), |
617 | | } |
618 | | } |
619 | | |
620 | 0 | let add_realloc_type = |types: &mut wasm_encoder::TypeSection| { |
621 | 0 | let type_index = types.len(); |
622 | 0 | types.ty().function( |
623 | 0 | [ |
624 | 0 | wasm_encoder::ValType::I32, |
625 | 0 | wasm_encoder::ValType::I32, |
626 | 0 | wasm_encoder::ValType::I32, |
627 | 0 | wasm_encoder::ValType::I32, |
628 | 0 | ], |
629 | 0 | [wasm_encoder::ValType::I32], |
630 | | ); |
631 | 0 | type_index |
632 | 0 | }; |
633 | | |
634 | 0 | let add_empty_type = |types: &mut wasm_encoder::TypeSection| { |
635 | 0 | let type_index = types.len(); |
636 | 0 | types.ty().function([], []); |
637 | 0 | type_index |
638 | 0 | }; |
639 | | |
640 | 0 | let sp = self.find_mut_i32_global("__stack_pointer")?; |
641 | 0 | let allocation_state = self.find_mut_i32_global("allocation_state")?; |
642 | | |
643 | 0 | let mut func_names = Vec::new(); |
644 | | |
645 | 0 | if let (Some(realloc), Some(_), None) = (main_module_realloc, sp, realloc_index) { |
646 | 0 | // The main module exports a realloc function, and although the adapter doesn't import it, we're going |
647 | 0 | // to add a function which calls it to allocate some stack space, so let's add an import now. |
648 | 0 |
|
649 | 0 | // Tell the function remapper we're reserving a slot for our extra import: |
650 | 0 | map.funcs.next += 1; |
651 | 0 |
|
652 | 0 | realloc_index = Some(num_func_imports); |
653 | 0 | imports.import( |
654 | 0 | "__main_module__", |
655 | 0 | realloc, |
656 | 0 | EntityType::Function(add_realloc_type(&mut types)), |
657 | 0 | ); |
658 | 0 | func_names.push((num_func_imports, realloc)); |
659 | 0 | num_func_imports += 1; |
660 | 0 | } |
661 | | |
662 | 0 | for (i, func) in local { |
663 | 0 | map.funcs.push(i); |
664 | 0 | let ty = map.types.remap(func.ty); |
665 | 0 | match &func.def { |
666 | 0 | Definition::Import(_, _) => { |
667 | 0 | // The adapter is importing `cabi_realloc` from the main module, but the main module isn't |
668 | 0 | // exporting it. In this case, we need to define a local function it can call instead. |
669 | 0 | realloc_index = Some(num_func_imports + funcs.len()); |
670 | 0 | funcs.function(ty); |
671 | 0 | code.function(&realloc_via_memory_grow()); |
672 | 0 | } |
673 | 0 | Definition::Local(_) => { |
674 | 0 | funcs.function(ty); |
675 | 0 | } |
676 | | } |
677 | | } |
678 | | |
679 | 0 | let lazy_stack_init_index = |
680 | 0 | if sp.is_some() && allocation_state.is_some() && main_module_realloc.is_some() { |
681 | | // We have a stack pointer, a `cabi_realloc` function from the main module, and a global variable for |
682 | | // keeping track of (and short-circuiting) reentrance. That means we can (and should) do lazy stack |
683 | | // allocation. |
684 | 0 | let index = num_func_imports + funcs.len(); |
685 | | |
686 | | // Tell the function remapper we're reserving a slot for our extra function: |
687 | 0 | map.funcs.next += 1; |
688 | | |
689 | 0 | funcs.function(add_empty_type(&mut types)); |
690 | | |
691 | 0 | Some(index) |
692 | | } else { |
693 | 0 | None |
694 | | }; |
695 | | |
696 | 0 | let exported_funcs = self |
697 | 0 | .exports |
698 | 0 | .values() |
699 | 0 | .filter_map(|export| match export.kind { |
700 | 0 | ExternalKind::Func => Some(export.index), |
701 | 0 | _ => None, |
702 | 0 | }) |
703 | 0 | .collect::<HashSet<_>>(); |
704 | | |
705 | 0 | for (i, func) in self.live_funcs() { |
706 | 0 | let body = match &func.def { |
707 | 0 | Definition::Import(..) => continue, |
708 | 0 | Definition::Local(body) => body, |
709 | | }; |
710 | | |
711 | 0 | match (lazy_stack_init_index, exported_funcs.contains(&i)) { |
712 | | // Prepend an `allocate_stack` call to all exports if we're |
713 | | // lazily allocating the stack. |
714 | 0 | (Some(lazy_stack_init_index), true) => { |
715 | 0 | let mut func = map.new_function_with_parsed_locals(&body)?; |
716 | 0 | func.instructions().call(lazy_stack_init_index); |
717 | 0 | let mut reader = body.get_operators_reader()?; |
718 | 0 | while !reader.eof() { |
719 | 0 | func.instruction(&map.parse_instruction(&mut reader)?); |
720 | | } |
721 | 0 | code.function(&func); |
722 | | } |
723 | | _ => { |
724 | 0 | map.parse_function_body(&mut code, body.clone())?; |
725 | | } |
726 | | } |
727 | | } |
728 | | |
729 | 0 | if lazy_stack_init_index.is_some() { |
730 | 0 | code.function(&allocate_stack_via_realloc( |
731 | 0 | realloc_index.unwrap(), |
732 | 0 | sp.unwrap(), |
733 | 0 | allocation_state, |
734 | 0 | )); |
735 | 0 | } |
736 | | |
737 | 0 | if sp.is_some() && (realloc_index.is_none() || allocation_state.is_none()) { |
738 | 0 | // Either the main module does _not_ export a realloc function, or it is not safe to use for stack |
739 | 0 | // allocation because we have no way to short-circuit reentrance, so we'll use `memory.grow` instead. |
740 | 0 | realloc_index = Some(num_func_imports + funcs.len()); |
741 | 0 | funcs.function(add_realloc_type(&mut types)); |
742 | 0 | code.function(&realloc_via_memory_grow()); |
743 | 0 | } |
744 | | |
745 | | // Inject a start function to initialize the stack pointer which will be local to this module. This only |
746 | | // happens if a memory is preserved, a stack pointer global is found, and we're not doing lazy stack |
747 | | // allocation. |
748 | 0 | let mut start = None; |
749 | 0 | if let (Some(sp), None) = (sp, lazy_stack_init_index) { |
750 | 0 | if num_memories > 0 { |
751 | | // If there are any memories or any mutable globals there must be |
752 | | // precisely one of each as otherwise we don't know how to filter |
753 | | // down to the right one. |
754 | 0 | if num_memories != 1 { |
755 | 0 | bail!("adapter modules don't support multi-memory"); |
756 | 0 | } |
757 | | |
758 | 0 | let sp = map.globals.remap(sp); |
759 | | |
760 | 0 | let function_index = num_func_imports + funcs.len(); |
761 | | |
762 | | // Generate a function type for this start function, adding a new |
763 | | // function type to the module if necessary. |
764 | 0 | let empty_type = empty_type.unwrap_or_else(|| { |
765 | 0 | types.ty().function([], []); |
766 | 0 | types.len() - 1 |
767 | 0 | }); |
768 | 0 | funcs.function(empty_type); |
769 | 0 | func_names.push((function_index, "allocate_stack")); |
770 | 0 | code.function(&allocate_stack_via_realloc( |
771 | 0 | realloc_index.unwrap(), |
772 | 0 | sp, |
773 | 0 | allocation_state, |
774 | 0 | )); |
775 | | |
776 | 0 | start = Some(wasm_encoder::StartSection { function_index }); |
777 | 0 | } |
778 | 0 | } |
779 | | |
780 | | // Sanity-check the shape of the module since some parts won't work if |
781 | | // this fails. Note that during parsing we've already validated there |
782 | | // are no data segments or element segments. |
783 | | |
784 | | // Shouldn't have any tables if there are no element segments since |
785 | | // otherwise there's no meaning to a defined or imported table. |
786 | 0 | if self.live_tables().count() != 0 { |
787 | 0 | bail!("tables should not be present in the final adapter module"); |
788 | 0 | } |
789 | | |
790 | | // multi-memory should not be enabled and if any memory it should be |
791 | | // imported. |
792 | 0 | if self.live_memories().count() > 1 { |
793 | 0 | bail!("the adapter module should not use multi-memory"); |
794 | 0 | } |
795 | 0 | if !memories.is_empty() { |
796 | 0 | bail!("locally-defined memories are not allowed define a local memory"); |
797 | 0 | } |
798 | | |
799 | 0 | let mut ret = wasm_encoder::Module::default(); |
800 | 0 | if !types.is_empty() { |
801 | 0 | ret.section(&types); |
802 | 0 | } |
803 | 0 | if !imports.is_empty() { |
804 | 0 | ret.section(&imports); |
805 | 0 | } |
806 | 0 | if !funcs.is_empty() { |
807 | 0 | ret.section(&funcs); |
808 | 0 | } |
809 | 0 | if !tables.is_empty() { |
810 | 0 | ret.section(&tables); |
811 | 0 | } |
812 | 0 | if !memories.is_empty() { |
813 | 0 | ret.section(&memories); |
814 | 0 | } |
815 | 0 | if !globals.is_empty() { |
816 | 0 | ret.section(&globals); |
817 | 0 | } |
818 | | |
819 | 0 | if !self.exports.is_empty() { |
820 | 0 | let mut exports = wasm_encoder::ExportSection::new(); |
821 | 0 | for (_, export) in self.exports.iter() { |
822 | 0 | let (kind, index) = match export.kind { |
823 | 0 | ExternalKind::Func => ( |
824 | 0 | wasm_encoder::ExportKind::Func, |
825 | 0 | map.funcs.remap(export.index), |
826 | 0 | ), |
827 | 0 | ExternalKind::Table => ( |
828 | 0 | wasm_encoder::ExportKind::Table, |
829 | 0 | map.tables.remap(export.index), |
830 | 0 | ), |
831 | 0 | ExternalKind::Memory => ( |
832 | 0 | wasm_encoder::ExportKind::Memory, |
833 | 0 | map.memories.remap(export.index), |
834 | 0 | ), |
835 | 0 | ExternalKind::Global => ( |
836 | 0 | wasm_encoder::ExportKind::Global, |
837 | 0 | map.globals.remap(export.index), |
838 | 0 | ), |
839 | 0 | kind => bail!("unsupported export kind {kind:?}"), |
840 | | }; |
841 | 0 | exports.export(export.name, kind, index); |
842 | | } |
843 | 0 | ret.section(&exports); |
844 | 0 | } |
845 | | |
846 | 0 | if let Some(start) = &start { |
847 | 0 | ret.section(start); |
848 | 0 | } |
849 | | |
850 | 0 | if !code.is_empty() { |
851 | 0 | ret.section(&code); |
852 | 0 | } |
853 | | |
854 | | // Append a custom `name` section using the names of the functions that |
855 | | // were found prior to the GC pass in the original module. |
856 | 0 | let mut global_names = Vec::new(); |
857 | 0 | for (i, _func) in self.live_funcs() { |
858 | 0 | let name = match self.func_names.get(&i) { |
859 | 0 | Some(name) => name, |
860 | 0 | None => continue, |
861 | | }; |
862 | 0 | func_names.push((map.funcs.remap(i), *name)); |
863 | | } |
864 | 0 | for (i, _global) in self.live_globals() { |
865 | 0 | let name = match self.global_names.get(&i) { |
866 | 0 | Some(name) => name, |
867 | 0 | None => continue, |
868 | | }; |
869 | 0 | global_names.push((map.globals.remap(i), *name)); |
870 | | } |
871 | 0 | let mut section = Vec::new(); |
872 | 0 | let mut encode_subsection = |code: u8, names: &[(u32, &str)]| { |
873 | 0 | if names.is_empty() { |
874 | 0 | return; |
875 | 0 | } |
876 | 0 | let mut subsection = Vec::new(); |
877 | 0 | names.len().encode(&mut subsection); |
878 | 0 | for (i, name) in names { |
879 | 0 | i.encode(&mut subsection); |
880 | 0 | name.encode(&mut subsection); |
881 | 0 | } |
882 | 0 | section.push(code); |
883 | 0 | subsection.encode(&mut section); |
884 | 0 | }; |
885 | 0 | if let (Some(realloc_index), true) = ( |
886 | 0 | realloc_index, |
887 | 0 | main_module_realloc.is_none() || allocation_state.is_none(), |
888 | 0 | ) { |
889 | 0 | func_names.push((realloc_index, "realloc_via_memory_grow")); |
890 | 0 | } |
891 | 0 | if let Some(lazy_stack_init_index) = lazy_stack_init_index { |
892 | 0 | func_names.push((lazy_stack_init_index, "allocate_stack")); |
893 | 0 | } |
894 | 0 | encode_subsection(0x01, &func_names); |
895 | 0 | encode_subsection(0x07, &global_names); |
896 | 0 | if !section.is_empty() { |
897 | 0 | ret.section(&wasm_encoder::CustomSection { |
898 | 0 | name: "name".into(), |
899 | 0 | data: Cow::Borrowed(§ion), |
900 | 0 | }); |
901 | 0 | } |
902 | 0 | if let Some(producers) = &self.producers { |
903 | 0 | ret.section(&RawCustomSection(&producers.raw_custom_section())); |
904 | 0 | } |
905 | | |
906 | 0 | Ok(ret.finish()) |
907 | 0 | } |
908 | | |
909 | 0 | fn find_mut_i32_global(&self, name: &str) -> Result<Option<u32>> { |
910 | 0 | let matches = &self |
911 | 0 | .live_globals() |
912 | 0 | .filter_map(|(i, g)| { |
913 | 0 | if g.ty.mutable |
914 | 0 | && g.ty.content_type == ValType::I32 |
915 | 0 | && *self.global_names.get(&i)? == name |
916 | | { |
917 | 0 | Some(i) |
918 | | } else { |
919 | 0 | None |
920 | | } |
921 | 0 | }) |
922 | 0 | .collect::<Vec<_>>(); |
923 | | |
924 | 0 | match matches.deref() { |
925 | 0 | [] => Ok(None), |
926 | 0 | [i] => Ok(Some(*i)), |
927 | 0 | _ => bail!( |
928 | 0 | "found {} mutable i32 globals with name {name}", |
929 | 0 | matches.len() |
930 | | ), |
931 | | } |
932 | 0 | } |
933 | | } |
934 | | |
935 | | // This helper macro is used to define a visitor of all instructions with |
936 | | // special handling for all payloads of instructions to mark any referenced |
937 | | // items live. |
938 | | // |
939 | | // Currently item identification happens through the field name of the payload. |
940 | | // While not exactly the most robust solution this should work well enough for |
941 | | // now. |
942 | | macro_rules! define_visit { |
943 | | ($(@$p:ident $op:ident $({ $($arg:ident: $argty:ty),* })? => $visit:ident ($($ann:tt)*))*) => { |
944 | | $( |
945 | | #[allow(unused_variables)] |
946 | 0 | fn $visit(&mut self $(, $($arg: $argty),*)?) { |
947 | | $( |
948 | | $( |
949 | 0 | define_visit!(mark_live self $arg $arg); Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_resume Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_try_table Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_resume_throw |
950 | | )* |
951 | | )? |
952 | 0 | } Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_or Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_eq Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_ge Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_gt Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_le Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_lt Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_ne Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_eq Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_ge Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_gt Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_le Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_lt Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_ne Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_eq Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_ne Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_eq Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_ne Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_eq Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_ne Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_eq Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_ne Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_and Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_not Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_xor Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_abs Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_add Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_div Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_max Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_min Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_mul Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_neg Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_sub Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_abs Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_add Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_div Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_max Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_min Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_mul Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_neg Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_sub Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_abs Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_add Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_mul Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_neg Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_shl Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_sub Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_abs Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_add Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_mul Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_neg Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_shl Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_sub Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_abs Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_add Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_mul Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_neg Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_shl Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_sub Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_abs Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_add Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_neg Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_shl Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_sub Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_load Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_ceil Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_pmax Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_pmin Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_sqrt Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_ceil Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_pmax Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_pmin Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_sqrt Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_ge_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_ge_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_gt_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_gt_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_le_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_le_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_lt_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_lt_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_ge_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_ge_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_gt_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_gt_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_le_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_le_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_lt_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_lt_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_ge_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_gt_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_le_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_lt_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_ge_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_ge_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_gt_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_gt_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_le_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_le_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_lt_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_lt_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_const Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_store Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_floor Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_splat Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_trunc Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_floor Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_splat Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_trunc Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_max_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_max_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_min_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_min_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_shr_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_shr_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_splat Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_max_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_max_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_min_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_min_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_shr_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_shr_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_splat Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_shr_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_shr_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_splat Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_max_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_max_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_min_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_min_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_shr_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_shr_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_splat Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_andnot Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_avgr_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_avgr_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_popcnt Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_nearest Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_nearest Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_bitmask Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_bitmask Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_bitmask Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_bitmask Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_shuffle Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_swizzle Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_any_true Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_all_true Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_all_true Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_all_true Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_all_true Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_bitselect Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_load8x8_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_load8x8_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_add_sat_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_add_sat_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_sub_sat_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_sub_sat_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_add_sat_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_add_sat_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_sub_sat_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_sub_sat_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_load16x4_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_load16x4_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_load32x2_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_load32x2_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_load8_lane Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_load16_lane Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_load32_lane Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_load32_zero Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_load64_lane Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_load64_zero Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_load8_splat Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_store8_lane Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_relaxed_max Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_relaxed_min Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_relaxed_max Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_relaxed_min Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_dot_i16x8_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_load16_splat Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_load32_splat Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_load64_splat Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_store16_lane Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_store32_lane Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_v128_store64_lane Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_extract_lane Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_relaxed_madd Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_replace_lane Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_extract_lane Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_relaxed_madd Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_replace_lane Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_replace_lane Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_extract_lane Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_replace_lane Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_extract_lane Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_replace_lane Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_replace_lane Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_relaxed_nmadd Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_relaxed_nmadd Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_q15mulr_sat_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_extract_lane_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_extract_lane_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_narrow_i32x4_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_narrow_i32x4_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_extract_lane_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_extract_lane_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_narrow_i16x8_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_narrow_i16x8_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_convert_i32x4_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_convert_i32x4_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_relaxed_swizzle Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f32x4_demote_f64x2_zero Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_promote_low_f32x4 Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_relaxed_q15mulr_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_trunc_sat_f32x4_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_trunc_sat_f32x4_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_extend_low_i8x16_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_extend_low_i8x16_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_extmul_low_i8x16_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_extmul_low_i8x16_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_relaxed_laneselect Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_extend_low_i16x8_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_extend_low_i16x8_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_extmul_low_i16x8_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_extmul_low_i16x8_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_relaxed_laneselect Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_extend_low_i32x4_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_extend_low_i32x4_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_extmul_low_i32x4_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_extmul_low_i32x4_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_relaxed_laneselect Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i8x16_relaxed_laneselect Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_convert_low_i32x4_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_f64x2_convert_low_i32x4_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_extend_high_i8x16_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_extend_high_i8x16_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_extmul_high_i8x16_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_extmul_high_i8x16_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_extend_high_i16x8_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_extend_high_i16x8_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_extmul_high_i16x8_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_extmul_high_i16x8_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_extend_high_i32x4_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_extend_high_i32x4_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_extmul_high_i32x4_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i64x2_extmul_high_i32x4_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_relaxed_trunc_f32x4_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_relaxed_trunc_f32x4_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_trunc_sat_f64x2_s_zero Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_trunc_sat_f64x2_u_zero Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_extadd_pairwise_i8x16_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_extadd_pairwise_i8x16_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_extadd_pairwise_i16x8_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_extadd_pairwise_i16x8_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i16x8_relaxed_dot_i8x16_i7x16_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_relaxed_trunc_f64x2_s_zero Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_relaxed_trunc_f64x2_u_zero Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitSimdOperator>::visit_i32x4_relaxed_dot_i8x16_i7x16_add_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_call Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_drop Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_else Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_loop Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_block Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_br_if Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_catch Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_throw Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_eq Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_ge Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_gt Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_le Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_lt Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_ne Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_eq Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_ge Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_gt Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_le Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_lt Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_ne Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_eq Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_ne Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_or Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_eq Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_ne Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_or Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_ref_eq Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_return Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_select Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_switch Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_abs Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_add Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_div Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_max Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_min Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_mul Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_neg Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_sub Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_abs Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_add Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_div Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_max Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_min Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_mul Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_neg Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_sub Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_add Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_and Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_clz Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_ctz Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_eqz Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_mul Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_shl Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_sub Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_xor Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_add Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_and Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_clz Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_ctz Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_eqz Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_mul Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_shl Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_sub Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_xor Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_ref_i31 Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_rethrow Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_suspend Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_br_table Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_call_ref Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_cont_new Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_delegate Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_ceil Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_load Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_sqrt Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_ceil Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_load Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_sqrt Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_ge_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_ge_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_gt_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_gt_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_le_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_le_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_load Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_lt_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_lt_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_rotl Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_rotr Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_ge_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_ge_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_gt_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_gt_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_le_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_le_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_load Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_lt_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_lt_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_rotl Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_rotr Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_ref_func Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_ref_null Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_array_get Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_array_len Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_array_new Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_array_set Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_catch_all Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_cont_bind Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_data_drop Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_elem_drop Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_const Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_floor Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_store Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_trunc Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_const Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_floor Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_store Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_trunc Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i31_get_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i31_get_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_const Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_div_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_div_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_rem_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_rem_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_shr_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_shr_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_store Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_const Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_div_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_div_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_rem_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_rem_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_shr_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_shr_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_store Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_local_get Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_local_set Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_local_tee Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_table_get Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_table_set Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_throw_ref Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_array_copy Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_array_fill Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_br_on_cast Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_br_on_null Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_global_get Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_global_set Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_popcnt Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_store8 Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_add128 Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_popcnt Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_store8 Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_sub128 Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_struct_get Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_struct_new Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_struct_set Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_table_copy Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_table_fill Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_table_grow Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_table_init Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_table_size Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_array_get_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_array_get_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_nearest Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_nearest Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_load8_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_load8_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_store16 Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_load8_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_load8_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_store16 Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_store32 Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_memory_copy Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_memory_fill Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_memory_grow Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_memory_init Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_memory_size Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_ref_is_null Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_return_call Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_unreachable Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_atomic_fence Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_copysign Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_copysign Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_load16_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_load16_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_wrap_i64 Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_load16_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_load16_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_load32_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_load32_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_ref_get_desc Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_struct_get_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_struct_get_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_typed_select Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_call_indirect Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_extend8_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_extend8_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_array_new_data Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_array_new_elem Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_br_on_non_null Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_demote_f64 Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_extend16_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_extend16_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_extend32_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_mul_wide_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_mul_wide_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_memory_discard Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_ref_i31_shared Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_array_init_data Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_array_init_elem Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_array_new_fixed Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_br_on_cast_desc Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_br_on_cast_fail Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_promote_f32 Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_load Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_trunc_f32_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_trunc_f32_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_trunc_f64_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_trunc_f64_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_load Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_trunc_f32_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_trunc_f32_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_trunc_f64_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_trunc_f64_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_ref_as_non_null Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_return_call_ref Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_struct_new_desc Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_array_atomic_get Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_array_atomic_set Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_store Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_store Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_extend_i32_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_extend_i32_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_table_atomic_get Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_table_atomic_set Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_array_new_default Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_convert_i32_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_convert_i32_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_convert_i64_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_convert_i64_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_convert_i32_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_convert_i32_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_convert_i64_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_convert_i64_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_global_atomic_get Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_global_atomic_set Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_rmw_or Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_store8 Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw_or Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_store8 Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_ref_cast_non_null Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_ref_cast_nullable Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_ref_test_non_null Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_ref_test_nullable Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_struct_atomic_get Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_struct_atomic_set Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_any_convert_extern Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_array_atomic_get_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_array_atomic_get_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_extern_convert_any Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_load8_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_rmw_add Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_rmw_and Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_rmw_sub Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_rmw_xor Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_store16 Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_load8_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw_add Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw_and Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw_sub Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw_xor Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_store16 Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_store32 Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_struct_new_default Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_typed_select_multi Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_array_atomic_rmw_or Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f32_reinterpret_i32 Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_f64_reinterpret_i64 Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_load16_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_rmw_xchg Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_reinterpret_f32 Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_trunc_sat_f32_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_trunc_sat_f32_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_trunc_sat_f64_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_trunc_sat_f64_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_load16_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_load32_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw_xchg Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_reinterpret_f64 Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_trunc_sat_f32_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_trunc_sat_f32_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_trunc_sat_f64_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_trunc_sat_f64_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_struct_atomic_get_s Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_struct_atomic_get_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_array_atomic_rmw_add Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_array_atomic_rmw_and Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_array_atomic_rmw_sub Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_array_atomic_rmw_xor Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_br_on_cast_desc_fail Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_global_atomic_rmw_or Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_rmw8_or_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw8_or_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_memory_atomic_notify Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_memory_atomic_wait32 Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_memory_atomic_wait64 Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_return_call_indirect Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_struct_atomic_rmw_or Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_array_atomic_rmw_xchg Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_global_atomic_rmw_add Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_global_atomic_rmw_and Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_global_atomic_rmw_sub Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_global_atomic_rmw_xor Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_rmw16_or_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_rmw8_add_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_rmw8_and_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_rmw8_sub_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_rmw8_xor_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw16_or_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw32_or_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw8_add_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw8_and_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw8_sub_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw8_xor_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_struct_atomic_rmw_add Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_struct_atomic_rmw_and Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_struct_atomic_rmw_sub Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_struct_atomic_rmw_xor Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_table_atomic_rmw_xchg Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_global_atomic_rmw_xchg Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_rmw16_add_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_rmw16_and_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_rmw16_sub_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_rmw16_xor_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_rmw8_xchg_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_rmw_cmpxchg Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw16_add_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw16_and_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw16_sub_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw16_xor_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw32_add_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw32_and_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw32_sub_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw32_xor_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw8_xchg_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw_cmpxchg Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_ref_cast_desc_non_null Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_ref_cast_desc_nullable Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_struct_atomic_rmw_xchg Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_rmw16_xchg_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw16_xchg_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw32_xchg_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_struct_new_default_desc Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_array_atomic_rmw_cmpxchg Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_table_atomic_rmw_cmpxchg Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_global_atomic_rmw_cmpxchg Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_rmw8_cmpxchg_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw8_cmpxchg_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_struct_atomic_rmw_cmpxchg Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i32_atomic_rmw16_cmpxchg_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw16_cmpxchg_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_i64_atomic_rmw32_cmpxchg_u Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_br Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_if Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_end Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_nop Unexecuted instantiation: <wit_component::gc::Module as wasmparser::readers::core::operators::VisitOperator>::visit_try |
953 | | )* |
954 | | }; |
955 | | |
956 | | (mark_live $self:ident $arg:ident type_index) => {$self.ty($arg);}; |
957 | | (mark_live $self:ident $arg:ident array_type_index) => {$self.ty($arg);}; |
958 | | (mark_live $self:ident $arg:ident array_type_index_dst) => {$self.ty($arg);}; |
959 | | (mark_live $self:ident $arg:ident array_type_index_src) => {$self.ty($arg);}; |
960 | | (mark_live $self:ident $arg:ident struct_type_index) => {$self.ty($arg);}; |
961 | | (mark_live $self:ident $arg:ident src_table) => {$self.table($arg);}; |
962 | | (mark_live $self:ident $arg:ident dst_table) => {$self.table($arg);}; |
963 | | (mark_live $self:ident $arg:ident table_index) => {$self.table($arg);}; |
964 | | (mark_live $self:ident $arg:ident table) => {$self.table($arg);}; |
965 | | (mark_live $self:ident $arg:ident global_index) => {$self.global($arg);}; |
966 | | (mark_live $self:ident $arg:ident function_index) => {$self.func($arg);}; |
967 | | (mark_live $self:ident $arg:ident mem) => {$self.memory($arg);}; |
968 | | (mark_live $self:ident $arg:ident src_mem) => {$self.memory($arg);}; |
969 | | (mark_live $self:ident $arg:ident dst_mem) => {$self.memory($arg);}; |
970 | | (mark_live $self:ident $arg:ident memarg) => {$self.memory($arg.memory);}; |
971 | | (mark_live $self:ident $arg:ident blockty) => {$self.blockty($arg);}; |
972 | | (mark_live $self:ident $arg:ident ty) => {$self.valty($arg)}; |
973 | | (mark_live $self:ident $arg:ident tys) => {$self.valtys(&$arg)}; |
974 | | (mark_live $self:ident $arg:ident hty) => {$self.heapty($arg)}; |
975 | | (mark_live $self:ident $arg:ident from_ref_type) => {$self.refty($arg);}; |
976 | | (mark_live $self:ident $arg:ident to_ref_type) => {$self.refty($arg);}; |
977 | | (mark_live $self:ident $arg:ident lane) => {}; |
978 | | (mark_live $self:ident $arg:ident lanes) => {}; |
979 | | (mark_live $self:ident $arg:ident value) => {}; |
980 | | (mark_live $self:ident $arg:ident local_index) => {}; |
981 | | (mark_live $self:ident $arg:ident relative_depth) => {}; |
982 | | (mark_live $self:ident $arg:ident tag_index) => {}; |
983 | | (mark_live $self:ident $arg:ident targets) => {}; |
984 | | (mark_live $self:ident $arg:ident data_index) => {}; |
985 | | (mark_live $self:ident $arg:ident array_data_index) => {}; |
986 | | (mark_live $self:ident $arg:ident elem_index) => {}; |
987 | | (mark_live $self:ident $arg:ident array_elem_index) => {}; |
988 | | (mark_live $self:ident $arg:ident array_size) => {}; |
989 | | (mark_live $self:ident $arg:ident field_index) => {}; |
990 | | (mark_live $self:ident $arg:ident ordering) => {}; |
991 | | (mark_live $self:ident $arg:ident try_table) => {unimplemented!();}; |
992 | | (mark_live $self:ident $arg:ident argument_index) => {}; |
993 | | (mark_live $self:ident $arg:ident result_index) => {}; |
994 | | (mark_live $self:ident $arg:ident cont_type_index) => {}; |
995 | | (mark_live $self:ident $arg:ident resume_table) => {unimplemented!();}; |
996 | | } |
997 | | |
998 | | impl<'a> VisitOperator<'a> for Module<'a> { |
999 | | type Output = (); |
1000 | | |
1001 | 0 | fn simd_visitor(&mut self) -> Option<&mut dyn VisitSimdOperator<'a, Output = Self::Output>> { |
1002 | 0 | Some(self) |
1003 | 0 | } |
1004 | | |
1005 | | wasmparser::for_each_visit_operator!(define_visit); |
1006 | | } |
1007 | | |
1008 | | impl<'a> VisitSimdOperator<'a> for Module<'a> { |
1009 | | wasmparser::for_each_visit_simd_operator!(define_visit); |
1010 | | } |
1011 | | |
1012 | | /// Helper function to filter `iter` based on the `live` set, yielding an |
1013 | | /// iterator over the index of the item that's live as well as the item itself. |
1014 | 0 | fn live_iter<'a, T>( |
1015 | 0 | live: &'a BitVec, |
1016 | 0 | iter: impl Iterator<Item = T> + 'a, |
1017 | 0 | ) -> impl Iterator<Item = (u32, T)> + 'a { |
1018 | 0 | iter.enumerate().filter_map(|(i, t)| { |
1019 | 0 | let i = i as u32; |
1020 | 0 | if live.contains(i) { Some((i, t)) } else { None } |
1021 | 0 | }) Unexecuted instantiation: wit_component::gc::live_iter::<&wit_component::gc::Func, core::slice::iter::Iter<wit_component::gc::Func>>::{closure#0}Unexecuted instantiation: wit_component::gc::live_iter::<&wit_component::gc::Table, core::slice::iter::Iter<wit_component::gc::Table>>::{closure#0}Unexecuted instantiation: wit_component::gc::live_iter::<&wit_component::gc::Global, core::slice::iter::Iter<wit_component::gc::Global>>::{closure#0}Unexecuted instantiation: wit_component::gc::live_iter::<&wit_component::gc::Memory, core::slice::iter::Iter<wit_component::gc::Memory>>::{closure#0}Unexecuted instantiation: wit_component::gc::live_iter::<&wasmparser::readers::core::types::FuncType, core::slice::iter::Iter<wasmparser::readers::core::types::FuncType>>::{closure#0} |
1022 | 0 | } Unexecuted instantiation: wit_component::gc::live_iter::<&wit_component::gc::Func, core::slice::iter::Iter<wit_component::gc::Func>> Unexecuted instantiation: wit_component::gc::live_iter::<&wit_component::gc::Table, core::slice::iter::Iter<wit_component::gc::Table>> Unexecuted instantiation: wit_component::gc::live_iter::<&wit_component::gc::Global, core::slice::iter::Iter<wit_component::gc::Global>> Unexecuted instantiation: wit_component::gc::live_iter::<&wit_component::gc::Memory, core::slice::iter::Iter<wit_component::gc::Memory>> Unexecuted instantiation: wit_component::gc::live_iter::<&wasmparser::readers::core::types::FuncType, core::slice::iter::Iter<wasmparser::readers::core::types::FuncType>> |
1023 | | |
1024 | | #[derive(Default)] |
1025 | | struct Encoder { |
1026 | | types: Remap, |
1027 | | funcs: Remap, |
1028 | | memories: Remap, |
1029 | | globals: Remap, |
1030 | | tables: Remap, |
1031 | | } |
1032 | | |
1033 | | type ReencodeResult<T> = Result<T, wasm_encoder::reencode::Error<Infallible>>; |
1034 | | |
1035 | | impl Reencode for Encoder { |
1036 | | type Error = Infallible; |
1037 | | |
1038 | 0 | fn type_index(&mut self, i: u32) -> ReencodeResult<u32> { |
1039 | 0 | Ok(self.types.remap(i)) |
1040 | 0 | } |
1041 | 0 | fn function_index(&mut self, i: u32) -> ReencodeResult<u32> { |
1042 | 0 | Ok(self.funcs.remap(i)) |
1043 | 0 | } |
1044 | 0 | fn memory_index(&mut self, i: u32) -> ReencodeResult<u32> { |
1045 | 0 | Ok(self.memories.remap(i)) |
1046 | 0 | } |
1047 | 0 | fn global_index(&mut self, i: u32) -> ReencodeResult<u32> { |
1048 | 0 | Ok(self.globals.remap(i)) |
1049 | 0 | } |
1050 | 0 | fn table_index(&mut self, i: u32) -> ReencodeResult<u32> { |
1051 | 0 | Ok(self.tables.remap(i)) |
1052 | 0 | } |
1053 | | } |
1054 | | |
1055 | | // Minimal definition of a bit vector necessary for the liveness calculations |
1056 | | // above. |
1057 | | mod bitvec { |
1058 | | use std::mem; |
1059 | | |
1060 | | type T = u64; |
1061 | | |
1062 | | #[derive(Default)] |
1063 | | pub struct BitVec { |
1064 | | bits: Vec<T>, |
1065 | | } |
1066 | | |
1067 | | impl BitVec { |
1068 | | /// Inserts `idx` into this bit vector, returning whether it was not |
1069 | | /// previously present. |
1070 | 0 | pub fn insert(&mut self, idx: u32) -> bool { |
1071 | 0 | let (idx, bit) = idx_bit(idx); |
1072 | 0 | match self.bits.get_mut(idx) { |
1073 | 0 | Some(bits) => { |
1074 | 0 | if *bits & bit != 0 { |
1075 | 0 | return false; |
1076 | 0 | } |
1077 | 0 | *bits |= bit; |
1078 | | } |
1079 | 0 | None => { |
1080 | 0 | self.bits.resize(idx + 1, 0); |
1081 | 0 | self.bits[idx] = bit; |
1082 | 0 | } |
1083 | | } |
1084 | 0 | true |
1085 | 0 | } |
1086 | | |
1087 | | /// Returns whether this bit vector contains the specified `idx`th bit. |
1088 | 0 | pub fn contains(&self, idx: u32) -> bool { |
1089 | 0 | let (idx, bit) = idx_bit(idx); |
1090 | 0 | match self.bits.get(idx) { |
1091 | 0 | Some(bits) => (*bits & bit) != 0, |
1092 | 0 | None => false, |
1093 | | } |
1094 | 0 | } |
1095 | | } |
1096 | | |
1097 | 0 | fn idx_bit(idx: u32) -> (usize, T) { |
1098 | 0 | let idx = idx as usize; |
1099 | 0 | let size = mem::size_of::<T>() * 8; |
1100 | 0 | let index = idx / size; |
1101 | 0 | let bit = 1 << (idx % size); |
1102 | 0 | (index, bit) |
1103 | 0 | } |
1104 | | } |
1105 | | |
1106 | | /// Small data structure used to track index mappings from an old index space to |
1107 | | /// a new. |
1108 | | #[derive(Default)] |
1109 | | struct Remap { |
1110 | | /// Map, indexed by the old index set, to the new index set. |
1111 | | map: HashMap<u32, u32>, |
1112 | | /// The next available index in the new index space. |
1113 | | next: u32, |
1114 | | } |
1115 | | |
1116 | | impl Remap { |
1117 | | /// Appends a new live "old index" into this remapping structure. |
1118 | | /// |
1119 | | /// This will assign a new index for the old index provided. |
1120 | 0 | fn push(&mut self, old: u32) { |
1121 | 0 | self.map.insert(old, self.next); |
1122 | 0 | self.next += 1; |
1123 | 0 | } |
1124 | | |
1125 | | /// Returns the new index corresponding to an old index. |
1126 | | /// |
1127 | | /// Panics if the `old` index was not added via `push` above. |
1128 | 0 | fn remap(&self, old: u32) -> u32 { |
1129 | 0 | *self |
1130 | 0 | .map |
1131 | 0 | .get(&old) |
1132 | 0 | .unwrap_or_else(|| panic!("can't map {old} to a new index")) |
1133 | 0 | } |
1134 | | } |