Invokes this function in an "unchecked" fashion, reading parameters and writing results to `params_and_returns`. This function is the same as [`Func::call`] except that the arguments and results both use a different representation. If possible it's recommended to use [`Func::call`] if safety isn't necessary or to use [`Func::typed`] in conjunction with [`TypedFunc::call`] since that's both safer
(
&self,
mut store: impl AsContextMut,
params_and_returns: *mut [ValRaw],
)
| 1008 | /// These invariants are all upheld for you with [`Func::call`] and |
| 1009 | /// [`TypedFunc::call`]. |
| 1010 | pub unsafe fn call_unchecked( |
| 1011 | &self, |
| 1012 | mut store: impl AsContextMut, |
| 1013 | params_and_returns: *mut [ValRaw], |
| 1014 | ) -> Result<()> { |
| 1015 | let mut store = store.as_context_mut(); |
| 1016 | let func_ref = self.vm_func_ref(store.0); |
| 1017 | let params_and_returns = NonNull::new(params_and_returns).unwrap_or(NonNull::from(&mut [])); |
| 1018 | |
| 1019 | // SAFETY: the safety of this function call is the same as the contract |
| 1020 | // of this function. |
| 1021 | unsafe { Self::call_unchecked_raw(&mut store, func_ref, params_and_returns) } |
| 1022 | } |
| 1023 | |
| 1024 | pub(crate) unsafe fn call_unchecked_raw<T>( |
| 1025 | store: &mut StoreContextMut<'_, T>, |