Projektmodule und vollständiges TBC-Kompilat umsetzen und Change archivieren

This commit is contained in:
hugo committed 2026-09-05 23:06:56 +02:00
1 parent 58b1f620ea
commit 815825dde7
40 files changed
+4177 -555

No files matched your search

+7 -6
View File
@@ -35,12 +35,13 @@ fn generate_module(n_blocks: usize, seed: usize) -> String {
}
fn compile_all(sources: &[(String, String)]) -> usize {
let mut total = 0;
for (name, src) in sources {
let m = tb_vm::compile_source(name, src).expect("Benchmark-Quelle muss kompilieren");
total += m.procs.iter().map(|p| p.code.len()).sum::<usize>();
}
total
let units: Vec<_> = sources
.iter()
.map(|(name, src)| tb_frontend::source::SourceUnit::new(name, &format!("{name}.bas"), src))
.collect();
let project = tb_vm::compile_project("BENCH", &units, &Default::default(), &[])
.expect("Benchmark-Projekt muss kompilieren");
project.procs.iter().map(|p| p.code.len()).sum()
}
fn main() {