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

Method call_sites

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

Get the list of call sites for this code, along with associated exception handlers. Each item yielded by the returned iterator is a struct with: - The call site metadata record, with a `ret_addr` field directly accessible and denoting the offset of the return address into this buffer's code. - The slice of pairs of exception tags and code offsets denoting exception-handler entry points associate

(&self)

Source from the content-addressed store, hash-verified

1970 /// denoting exception-handler entry points associated with this
1971 /// call site.
1972 pub fn call_sites(&self) -> impl Iterator<Item = FinalizedMachCallSite<'_>> + '_ {
1973 self.call_sites.iter().map(|call_site| {
1974 let handler_range = call_site.exception_handler_range.clone();
1975 let handler_range = usize::try_from(handler_range.start).unwrap()
1976 ..usize::try_from(handler_range.end).unwrap();
1977 FinalizedMachCallSite {
1978 ret_addr: call_site.ret_addr,
1979 frame_offset: call_site.frame_offset,
1980 exception_handlers: &self.exception_handlers[handler_range],
1981 }
1982 })
1983 }
1984
1985 /// Get the frame layout, if known.
1986 pub fn frame_layout(&self) -> Option<&MachBufferFrameLayout> {

Callers 3

metadata_recordsFunction · 0.80
append_codeMethod · 0.80

Calls 4

mapMethod · 0.45
iterMethod · 0.45
cloneMethod · 0.45
unwrapMethod · 0.45

Tested by 1

metadata_recordsFunction · 0.64