The cached stdlib objects plus the user object, as a link module list.
(user: &'a AssembledOutput)
| 29 | // The cached stdlib objects plus the user object, as a link module list. |
| 30 | fn link_with_stdlib<'a>(user: &'a AssembledOutput) -> Vec<(&'a str, &'a AssembledOutput)> { |
| 31 | let mut modules: Vec<(&str, &AssembledOutput)> = cached_stdlib_objs() |
| 32 | .iter() |
| 33 | .map(|(n, o)| (n.as_str(), o)) |
| 34 | .collect(); |
| 35 | modules.push(("user", user)); |
| 36 | modules |
| 37 | } |
| 38 | |
| 39 | // Compile user HLL, link it against the cached stdlib object, and run in the VM. |
| 40 | fn run_hll_with_limit(src: &str, max_steps: u64) -> (VirtualMachine, StepOutcome, String) { |
| 41 | let mut pipeline = CompilationPipeline::new(); |