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

Method name_wasm

winch/codegen/src/codegen/env.rs:375–379  ·  view source on GitHub ↗

Creates a name to reference the wasm function `index` provided.

(&mut self, def_func: DefinedFuncIndex)

Source from the content-addressed store, hash-verified

373
374 /// Creates a name to reference the wasm function `index` provided.
375 pub fn name_wasm(&mut self, def_func: DefinedFuncIndex) -> UserExternalNameRef {
376 let key = FuncKey::DefinedWasmFunction(self.translation.module_index(), def_func);
377 let (namespace, index) = key.into_raw_parts();
378 self.intern_name(UserExternalName { namespace, index })
379 }
380
381 /// Interns `name` into a `UserExternalNameRef` and ensures that duplicate
382 /// instances of `name` are given a unique name ref index.

Callers 1

lower_localMethod · 0.80

Calls 3

intern_nameMethod · 0.80
module_indexMethod · 0.45
into_raw_partsMethod · 0.45

Tested by

no test coverage detected