Resolves upcall metadata and builds an execution scope for invocation.
(
&'a mut self,
image: &'a Image,
index: u16,
first_reg: Register,
upcall_pc: usize,
)
| 148 | impl Vm { |
| 149 | /// Resolves upcall metadata and builds an execution scope for invocation. |
| 150 | fn prepare_upcall<'a>( |
| 151 | &'a mut self, |
| 152 | image: &'a Image, |
| 153 | index: u16, |
| 154 | first_reg: Register, |
| 155 | upcall_pc: usize, |
| 156 | ) -> (Rc<dyn Callable>, Scope<'a>) { |
| 157 | let upcall = self.upcalls[usize::from(index)].clone(); |
| 158 | let is_function = upcall.metadata().return_type().is_some(); |
| 159 | let scope = self.upcall_scope(image, first_reg, is_function, upcall_pc); |
| 160 | (upcall, scope) |
| 161 | } |
| 162 | |
| 163 | /// Handles the result of an upcall invocation. |
| 164 | /// |
no test coverage detected