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

Function hll_global_array_initializer

tests/integration/vm_execution.rs:582–597  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

580 let code_lines = user_tokens.iter().filter(|t| t.is_code()).count();
581 let user_obj = pipeline
582 .assemble(&user_tokens)
583 .expect("user assemble failed");
584
585 let assembled = pipeline
586 .link_assembled_objects(&link_with_stdlib(&user_obj))
587 .expect("link failed");
588 let mut vm = VirtualMachine::new(&assembled);
589 let run = vm.run(5_000_000);
590 (run.outcome, run.uart_output.clone(), code_lines)
591}
592
593// Constant-heavy program with a dead local: const folding collapses the
594// arithmetic and DCE drops the unused computation.
595const OPT_CONST_PROGRAM: &str = r#"
596main: () -> i32 {
597 a: i32 = 2 + 3 * 4
598 b: i32 = a * 10
599 unused: i32 = 100 + 200 + 300
600 return b as i32

Callers

nothing calls this directly

Calls 1

run_hllFunction · 0.70

Tested by

no test coverage detected