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

Method add_reloc

cranelift/codegen/src/machinst/buffer.rs:1735–1742  ·  view source on GitHub ↗

Add an external relocation at the current offset.

(
        &mut self,
        kind: Reloc,
        target: &T,
        addend: Addend,
    )

Source from the content-addressed store, hash-verified

1733
1734 /// Add an external relocation at the current offset.
1735 pub fn add_reloc<T: Into<RelocTarget> + Clone>(
1736 &mut self,
1737 kind: Reloc,
1738 target: &T,
1739 addend: Addend,
1740 ) {
1741 self.add_reloc_at_offset(self.data.len() as CodeOffset, kind, target, addend);
1742 }
1743
1744 /// Add a trap record at the current offset.
1745 pub fn add_trap(&mut self, code: TrapCode) {

Callers 6

metadata_recordsFunction · 0.80
emit_relocFunction · 0.80
emit_uncompressedMethod · 0.80
emitMethod · 0.80
pulley_emitFunction · 0.80

Calls 2

add_reloc_at_offsetMethod · 0.80
lenMethod · 0.45

Tested by 1

metadata_recordsFunction · 0.64