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

Function create_user_external_name_refs

cranelift/codegen/src/inline.rs:1502–1511  ·  view source on GitHub ↗
(
    allocs: &mut InliningAllocs,
    func: &mut ir::Function,
    callee: &ir::Function,
)

Source from the content-addressed store, hash-verified

1500}
1501
1502fn create_user_external_name_refs(
1503 allocs: &mut InliningAllocs,
1504 func: &mut ir::Function,
1505 callee: &ir::Function,
1506) {
1507 for (callee_named_func_ref, name) in callee.params.user_named_funcs().iter() {
1508 let caller_named_func_ref = func.declare_imported_user_function(name.clone());
1509 allocs.user_external_name_refs[callee_named_func_ref] = Some(caller_named_func_ref).into();
1510 }
1511}
1512
1513/// Translate `ir::FuncRef`s from the callee into the caller.
1514fn create_func_refs(

Callers 1

create_entitiesFunction · 0.85

Calls 4

user_named_funcsMethod · 0.80
iterMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected