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

Method reset_user_func_name

cranelift/codegen/src/ir/function.rs:128–134  ·  view source on GitHub ↗

Resets an already existing user function name to a new value.

(&mut self, index: UserExternalNameRef, name: UserExternalName)

Source from the content-addressed store, hash-verified

126
127 /// Resets an already existing user function name to a new value.
128 pub fn reset_user_func_name(&mut self, index: UserExternalNameRef, name: UserExternalName) {
129 if let Some(prev_name) = self.user_named_funcs.get_mut(index) {
130 self.user_ext_name_to_ref.remove(prev_name);
131 *prev_name = name.clone();
132 self.user_ext_name_to_ref.insert(name, index);
133 }
134 }
135
136 /// Returns the internal mapping of `UserExternalNameRef` to `UserExternalName`.
137 pub fn user_named_funcs(&self) -> &PrimaryMap<UserExternalNameRef, UserExternalName> {

Callers

nothing calls this directly

Calls 4

get_mutMethod · 0.45
removeMethod · 0.45
cloneMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected