(&mut self, item: &Extern, store: &mut StoreOpaque)
| 692 | } |
| 693 | |
| 694 | fn push(&mut self, item: &Extern, store: &mut StoreOpaque) -> Result<(), OutOfMemory> { |
| 695 | match item { |
| 696 | Extern::Func(i) => { |
| 697 | self.functions.push(i.vmimport(store))?; |
| 698 | } |
| 699 | Extern::Global(i) => { |
| 700 | self.globals.push(i.vmimport(store))?; |
| 701 | } |
| 702 | Extern::Table(i) => { |
| 703 | self.tables.push(i.vmimport(store))?; |
| 704 | } |
| 705 | Extern::Memory(i) => { |
| 706 | self.memories.push(i.vmimport(store))?; |
| 707 | } |
| 708 | Extern::SharedMemory(i) => { |
| 709 | self.memories.push(i.vmimport(store))?; |
| 710 | } |
| 711 | Extern::Tag(i) => { |
| 712 | self.tags.push(i.vmimport(store))?; |
| 713 | } |
| 714 | } |
| 715 | Ok(()) |
| 716 | } |
| 717 | |
| 718 | /// Note that this is unsafe as the validity of `item` is not verified and |
| 719 | /// it contains a bunch of raw pointers. |
no test coverage detected