MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / link_with_stdlib

Function link_with_stdlib

tests/integration/vm_execution.rs:31–38  ·  view source on GitHub ↗

The cached stdlib objects plus the user object, as a link module list.

(user: &'a AssembledOutput)

Source from the content-addressed store, hash-verified

29// The cached stdlib objects plus the user object, as a link module list.
30fn 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.
40fn run_hll_with_limit(src: &str, max_steps: u64) -> (VirtualMachine, StepOutcome, String) {
41 let mut pipeline = CompilationPipeline::new();

Callers 6

run_hll_with_limitFunction · 0.85
run_irFunction · 0.85
run_hll_peepholeFunction · 0.85
run_hll_omit_fpFunction · 0.85
run_hll_optimizeFunction · 0.85

Calls 3

collectMethod · 0.80
pushMethod · 0.80
cached_stdlib_objsFunction · 0.70