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

Function run_hll_omit_fp

tests/integration/vm_execution.rs:308–326  ·  view source on GitHub ↗

Compile and run a user program with the frame pointer omitted or kept, returning the VM run (exit outcome + UART) and the emitted instruction count.

(src: &str, omit_fp: bool)

Source from the content-addressed store, hash-verified

306 "export scale: (x: i32) -> i32 { return x * 3 }
307 export apply: <T>(value: i32) -> i32 { return scale(value) }
308"
309 .to_owned(),
310 ),
311 _ => None,
312 })));
313
314 let primary = r#"
315left := import("left")
316right := import("right")
317main: () -> i32 {
318 return left.apply<i32>(6) + right.apply<i32>(10)
319}
320"#;
321 let closure = pipeline
322 .compile_program_closure("user", primary)
323 .expect("closure compile failed");
324
325 let mut modules: Vec<(&str, &AssembledOutput)> = cached_stdlib_objs()
326 .iter()
327 .map(|(n, o)| (n.as_str(), o))
328 .collect();
329 for (name, obj) in &closure {

Callers 1

Calls 10

link_with_stdlibFunction · 0.85
set_write_artifactsMethod · 0.80
is_codeMethod · 0.80
compileMethod · 0.45
assembleMethod · 0.45
runMethod · 0.45
cloneMethod · 0.45

Tested by 1