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

Method lookup

cranelift/codegen/src/settings.rs:212–220  ·  view source on GitHub ↗

Look up a descriptor by name.

(&self, name: &str)

Source from the content-addressed store, hash-verified

210
211 /// Look up a descriptor by name.
212 fn lookup(&self, name: &str) -> SetResult<(usize, detail::Detail)> {
213 match probe(self.template, name, simple_hash(name)) {
214 Err(_) => Err(SetError::BadName(name.to_string())),
215 Ok(entry) => {
216 let d = &self.template.descriptors[self.template.hash_table[entry] as usize];
217 Ok((d.offset as usize, d.detail))
218 }
219 }
220 }
221}
222
223fn parse_bool_value(value: &str) -> SetResult<bool> {

Callers 2

enableMethod · 0.45
setMethod · 0.45

Calls 4

probeFunction · 0.85
simple_hashFunction · 0.85
OkFunction · 0.85
to_stringMethod · 0.45

Tested by

no test coverage detected