Push a new defined memory into this module's memory index space.
(&mut self, memory_type: wasmparser::MemoryType)
| 77 | |
| 78 | /// Push a new defined memory into this module's memory index space. |
| 79 | pub(crate) fn push_defined_memory(&mut self, memory_type: wasmparser::MemoryType) { |
| 80 | if self.defined_memories_index.is_none() { |
| 81 | self.defined_memories_index = Some(u32::try_from(self.memories.len()).unwrap()); |
| 82 | } |
| 83 | self.memories.push(memory_type); |
| 84 | } |
| 85 | |
| 86 | /// Push a new imported global into this module's global index space. |
| 87 | pub(crate) fn push_imported_global(&mut self, global_type: wasmparser::GlobalType) { |
no test coverage detected