(
&self,
wasm_slice: WasmSlice,
store: &'a mut impl AsContextMut,
)
| 56 | /// Safety, the returned array is uninitialized |
| 57 | #[allow(clippy::mut_from_ref)] |
| 58 | pub unsafe fn as_mut<'a>( |
| 59 | &self, |
| 60 | wasm_slice: WasmSlice, |
| 61 | store: &'a mut impl AsContextMut, |
| 62 | ) -> &'a mut [u8] { |
| 63 | debug!("data ptr: {}", wasm_slice.ptr()); |
| 64 | |
| 65 | &mut self.memory.data_mut(store.as_context_mut())[wasm_slice.ptr() as usize..] |
| 66 | [..wasm_slice.len() as usize] |
| 67 | } |
| 68 | |
| 69 | /// Allocates size bytes in the Wasm Memory context, returns the offset into the Memory region |
| 70 | pub unsafe fn alloc_size( |
no test coverage detected