Return a trampoline for calling. Returns None if [TestFileCompiler::create_trampoline_for_function] wasn't called for this function.
(&self, func: &Function)
| 377 | /// |
| 378 | /// Returns None if [TestFileCompiler::create_trampoline_for_function] wasn't called for this function. |
| 379 | pub fn get_trampoline(&self, func: &Function) -> Option<Trampoline<'_>> { |
| 380 | let defined_func = self.defined_functions.get(&func.name)?; |
| 381 | let trampoline_id = self |
| 382 | .trampolines |
| 383 | .get(&func.signature) |
| 384 | .and_then(|name| self.defined_functions.get(name)) |
| 385 | .map(|df| df.func_id)?; |
| 386 | Some(Trampoline { |
| 387 | module: self.module.as_ref()?, |
| 388 | func_id: defined_func.func_id, |
| 389 | func_signature: &defined_func.signature, |
| 390 | trampoline_id, |
| 391 | }) |
| 392 | } |
| 393 | } |
| 394 | |
| 395 | impl Drop for CompiledTestFile { |