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

Method module_id

crates/gdbstub-component/src/addr.rs:43–54  ·  view source on GitHub ↗
(&mut self, m: &Module)

Source from the content-addressed store, hash-verified

41 }
42
43 fn module_id(&mut self, m: &Module) -> u32 {
44 match self.module_ids.entry(m.unique_id()) {
45 Entry::Occupied(o) => *o.get(),
46 Entry::Vacant(v) => {
47 let id = u32::try_from(self.modules.len()).unwrap();
48 let bytecode = m.bytecode().unwrap_or(vec![]);
49 self.module_bytecode.push(bytecode);
50 self.modules.push(m.clone());
51 *v.insert(id)
52 }
53 }
54 }
55
56 fn memory_id(&mut self, m: &Memory) -> u32 {
57 match self.memory_ids.entry(m.unique_id()) {

Callers 1

updateMethod · 0.80

Calls 9

entryMethod · 0.45
unique_idMethod · 0.45
getMethod · 0.45
unwrapMethod · 0.45
lenMethod · 0.45
bytecodeMethod · 0.45
pushMethod · 0.45
cloneMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected