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

Method declare_function

cranelift/jit/src/backend.rs:424–434  ·  view source on GitHub ↗
(
        &mut self,
        name: &str,
        linkage: Linkage,
        signature: &ir::Signature,
    )

Source from the content-addressed store, hash-verified

422 }
423
424 fn declare_function(
425 &mut self,
426 name: &str,
427 linkage: Linkage,
428 signature: &ir::Signature,
429 ) -> ModuleResult<FuncId> {
430 let (id, _linkage) = self
431 .declarations
432 .declare_function(name, linkage, signature)?;
433 Ok(id)
434 }
435
436 fn declare_anonymous_function(&mut self, signature: &ir::Signature) -> ModuleResult<FuncId> {
437 let id = self.declarations.declare_anonymous_function(signature)?;

Callers 4

define_simple_functionFunction · 0.45
libcall_functionFunction · 0.45
mainFunction · 0.45

Calls 1

OkFunction · 0.85

Tested by 3

define_simple_functionFunction · 0.36
libcall_functionFunction · 0.36