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

Method get

cranelift/codegen/src/ir/constant.rs:228–231  ·  view source on GitHub ↗

Retrieve the constant data given a handle.

(&self, constant_handle: Constant)

Source from the content-addressed store, hash-verified

226
227 /// Retrieve the constant data given a handle.
228 pub fn get(&self, constant_handle: Constant) -> &ConstantData {
229 assert!(self.handles_to_values.contains_key(&constant_handle));
230 self.handles_to_values.get(&constant_handle).unwrap()
231 }
232
233 /// Link a constant handle to its value. This does not de-duplicate data but does avoid
234 /// replacing any existing constant values. use `set` to tie a specific `const42` to its value;

Callers 2

insertMethod · 0.45
get_nonexistent_constantFunction · 0.45

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected