Places the `args` into `dst` and additionally reserves space in `dst` for `results_size` returns. The params/results slices are then returned separately.
(
dst: &'a mut Vec<Val>,
args: impl ExactSizeIterator<Item = Val>,
results_size: usize,
)
| 119 | /// Places the `args` into `dst` and additionally reserves space in `dst` for `results_size` |
| 120 | /// returns. The params/results slices are then returned separately. |
| 121 | pub(crate) fn translate_args<'a>( |
| 122 | dst: &'a mut Vec<Val>, |
| 123 | args: impl ExactSizeIterator<Item = Val>, |
| 124 | results_size: usize, |
| 125 | ) -> (&'a [Val], &'a mut [Val]) { |
| 126 | debug_assert!(dst.is_empty()); |
| 127 | let num_args = args.len(); |
| 128 | dst.reserve(args.len() + results_size); |
| 129 | dst.extend(args); |
| 130 | dst.extend((0..results_size).map(|_| Val::null_func_ref())); |
| 131 | let (a, b) = dst.split_at_mut(num_args); |
| 132 | (a, b) |
| 133 | } |
| 134 | |
| 135 | #[unsafe(no_mangle)] |
| 136 | pub unsafe extern "C" fn wasm_func_call( |
no test coverage detected