MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / get

Method get

compiler/src/abi.rs:109–114  ·  view source on GitHub ↗

Look up a value by handle, or `None` if invalid / freed.

(&self, h: u32)

Source from the content-addressed store, hash-verified

107
108 // Look up a value by handle, or `None` if invalid / freed.
109 pub fn get(&self, h: u32) -> Option<u64> {
110 if h == 0 { return None; }
111 self.slots.get((h - 1) as usize)
112 .filter(|s| s.rc > 0)
113 .map(|s| s.val)
114 }
115
116 // Decrements rc; frees slot at 0. Safe against double-release.
117 pub fn release(&mut self, h: u32) {

Callers 15

allocFunction · 0.45
cleanSubtreeFunction · 0.45
idb.jsFile · 0.45
host.test.jsFile · 0.45
fetch_bytesMethod · 0.45
resolve_bareMethod · 0.45
resolve_canonicalMethod · 0.45
resolveFunction · 0.45
worker.jsFile · 0.45
loadHostModuleFunction · 0.45
createWorkerFunction · 0.45
fetchWithLockfileFunction · 0.45

Calls

no outgoing calls

Tested by 3

fetch_bytesMethod · 0.36
resolve_bareMethod · 0.36
resolve_canonicalMethod · 0.36