iter 22b.3.1: mono pass skeleton — identity for class-free workspaces

This commit is contained in:
2026-05-09 20:12:36 +02:00
parent f7791e6cbd
commit 209074ee5d
4 changed files with 127 additions and 0 deletions
+7
View File
@@ -2032,6 +2032,13 @@ fn build_to(
// load-time remains valid.
registry: ws.registry.clone(),
};
// Iter 22b.3: monomorphisation pass. After `lift_letrecs` and
// before codegen, every (class-method, concrete-type) call-site
// pair becomes a synthesised top-level fn; user call sites are
// rewritten to target those names. Class-free workspaces flow
// through bit-identically; see `ailang_check::monomorphise_workspace`.
let ws = ailang_check::monomorphise_workspace(&ws)
.map_err(|e| anyhow::anyhow!("monomorphise_workspace: {e}"))?;
let ir = ailang_codegen::lower_workspace_with_alloc(&ws, alloc)?;
let tmpdir = std::env::temp_dir().join(format!("ailang-{}", std::process::id()));
std::fs::create_dir_all(&tmpdir)?;