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

Method define_function_bytes

cranelift/object/src/backend.rs:481–493  ·  view source on GitHub ↗
(
        &mut self,
        func_id: FuncId,
        alignment: u64,
        bytes: &[u8],
        relocs: &[ModuleReloc],
    )

Source from the content-addressed store, hash-verified

479 }
480
481 fn define_function_bytes(
482 &mut self,
483 func_id: FuncId,
484 alignment: u64,
485 bytes: &[u8],
486 relocs: &[ModuleReloc],
487 ) -> ModuleResult<()> {
488 let relocs = relocs
489 .iter()
490 .map(|reloc| self.process_reloc(reloc))
491 .collect();
492 self.define_function_inner(func_id, alignment, bytes, relocs)
493 }
494
495 fn define_data(&mut self, data_id: DataId, data: &DataDescription) -> ModuleResult<()> {
496 let decl = self.declarations.get_data_decl(data_id);

Callers

nothing calls this directly

Calls 5

collectMethod · 0.80
process_relocMethod · 0.80
define_function_innerMethod · 0.80
mapMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected