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

Method write_address

crates/cranelift/src/debug/write_debuginfo.rs:94–108  ·  view source on GitHub ↗
(&mut self, address: Address, size: u8)

Source from the content-addressed store, hash-verified

92 }
93
94 fn write_address(&mut self, address: Address, size: u8) -> WriteResult<()> {
95 match address {
96 Address::Constant(val) => self.write_udata(val, size),
97 Address::Symbol { symbol, addend } => {
98 let offset = self.len() as u32;
99 self.relocs.push(DwarfSectionReloc {
100 target: DwarfSectionRelocTarget::Func(symbol),
101 offset,
102 size,
103 addend: addend as i32,
104 });
105 self.write_udata(addend as u64, size)
106 }
107 }
108 }
109
110 fn write_offset(&mut self, val: usize, section: SectionId, size: u8) -> WriteResult<()> {
111 let offset = self.len() as u32;

Callers

nothing calls this directly

Calls 3

FuncClass · 0.50
lenMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected