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

Method declare_anonymous_function

cranelift/object/src/backend.rs:350–371  ·  view source on GitHub ↗
(&mut self, signature: &ir::Signature)

Source from the content-addressed store, hash-verified

348 }
349
350 fn declare_anonymous_function(&mut self, signature: &ir::Signature) -> ModuleResult<FuncId> {
351 let id = self.declarations.declare_anonymous_function(signature)?;
352
353 let symbol_id = self.object.add_symbol(Symbol {
354 name: self
355 .declarations
356 .get_function_decl(id)
357 .linkage_name(id)
358 .into_owned()
359 .into_bytes(),
360 value: 0,
361 size: 0,
362 kind: SymbolKind::Text,
363 scope: SymbolScope::Compilation,
364 weak: false,
365 section: SymbolSection::Undefined,
366 flags: SymbolFlags::None,
367 });
368 self.functions[id] = Some((symbol_id, false));
369
370 Ok(id)
371 }
372
373 fn declare_data(
374 &mut self,

Callers

nothing calls this directly

Calls 5

OkFunction · 0.85
into_bytesMethod · 0.80
into_ownedMethod · 0.80
linkage_nameMethod · 0.80
get_function_declMethod · 0.80

Tested by

no test coverage detected