Call the target function of this trampoline, passing in [DataValue]s using a compiled trampoline.
(&self, compiled: &CompiledTestFile, arguments: &[DataValue])
| 418 | impl<'a> Trampoline<'a> { |
| 419 | /// Call the target function of this trampoline, passing in [DataValue]s using a compiled trampoline. |
| 420 | pub fn call(&self, compiled: &CompiledTestFile, arguments: &[DataValue]) -> Vec<DataValue> { |
| 421 | let mut values = UnboxedValues::make_arguments(arguments, &self.func_signature); |
| 422 | let arguments_address = values.as_mut_ptr(); |
| 423 | |
| 424 | let function_ptr = self.module.get_finalized_function(self.func_id); |
| 425 | let trampoline_ptr = self.module.get_finalized_function(self.trampoline_id); |
| 426 | |
| 427 | COMPILED_TEST_FILE.set(compiled as *const _); |
| 428 | unsafe { |
| 429 | self.call_raw(trampoline_ptr, function_ptr, arguments_address); |
| 430 | } |
| 431 | COMPILED_TEST_FILE.set(std::ptr::null()); |
| 432 | |
| 433 | values.collect_returns(&self.func_signature) |
| 434 | } |
| 435 | |
| 436 | unsafe fn call_raw( |
| 437 | &self, |