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

Method add_try_call_site

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

Add a call-site record at the current offset with exception handlers.

(
        &mut self,
        frame_offset: Option<u32>,
        exception_handlers: impl Iterator<Item = MachExceptionHandler>,
    )

Source from the content-addressed store, hash-verified

1757 /// Add a call-site record at the current offset with exception
1758 /// handlers.
1759 pub fn add_try_call_site(
1760 &mut self,
1761 frame_offset: Option<u32>,
1762 exception_handlers: impl Iterator<Item = MachExceptionHandler>,
1763 ) {
1764 let start = u32::try_from(self.exception_handlers.len()).unwrap();
1765 self.exception_handlers.extend(exception_handlers);
1766 let end = u32::try_from(self.exception_handlers.len()).unwrap();
1767 let exception_handler_range = start..end;
1768
1769 self.call_sites.push(MachCallSite {
1770 ret_addr: self.data.len() as CodeOffset,
1771 frame_offset,
1772 exception_handler_range,
1773 });
1774 }
1775
1776 /// Add a patchable call record at the current offset The actual
1777 /// call is expected to have been emitted; the VCodeInst trait

Callers 7

add_call_siteMethod · 0.80
metadata_recordsFunction · 0.80
emitFunction · 0.80
emit_uncompressedMethod · 0.80
emitMethod · 0.80
pulley_emitFunction · 0.80

Calls 4

unwrapMethod · 0.45
lenMethod · 0.45
extendMethod · 0.45
pushMethod · 0.45

Tested by 1

metadata_recordsFunction · 0.64