Add a call-site record at the current offset with exception handlers.
(
&mut self,
frame_offset: Option<u32>,
exception_handlers: impl Iterator<Item = MachExceptionHandler>,
)
| 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 |