MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / push_defined_memory

Method push_defined_memory

crates/wizer/src/info.rs:79–84  ·  view source on GitHub ↗

Push a new defined memory into this module's memory index space.

(&mut self, memory_type: wasmparser::MemoryType)

Source from the content-addressed store, hash-verified

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) {

Callers 1

memory_sectionFunction · 0.80

Calls 4

is_noneMethod · 0.45
unwrapMethod · 0.45
lenMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected