(
&mut self,
instance: Instance,
callback: *mut VMFuncRef,
callee: NonNull<VMFuncRef>,
param_count: u32,
storage: *mut MaybeUninit<ValRaw>,
stor
| 4127 | } |
| 4128 | |
| 4129 | unsafe fn sync_start( |
| 4130 | &mut self, |
| 4131 | instance: Instance, |
| 4132 | callback: *mut VMFuncRef, |
| 4133 | callee: NonNull<VMFuncRef>, |
| 4134 | param_count: u32, |
| 4135 | storage: *mut MaybeUninit<ValRaw>, |
| 4136 | storage_len: usize, |
| 4137 | ) -> Result<()> { |
| 4138 | unsafe { |
| 4139 | instance |
| 4140 | .start_call( |
| 4141 | StoreContextMut(self), |
| 4142 | callback, |
| 4143 | ptr::null_mut(), |
| 4144 | callee, |
| 4145 | param_count, |
| 4146 | 1, |
| 4147 | START_FLAG_ASYNC_CALLEE, |
| 4148 | // SAFETY: The `wasmtime_cranelift`-generated code that calls |
| 4149 | // this method will have ensured that `storage` is a valid |
| 4150 | // pointer containing at least `storage_len` items. |
| 4151 | Some(core::slice::from_raw_parts_mut(storage, storage_len)), |
| 4152 | ) |
| 4153 | .map(drop) |
| 4154 | } |
| 4155 | } |
| 4156 | |
| 4157 | unsafe fn async_start( |
| 4158 | &mut self, |
no test coverage detected