wip(0.S3): calls into the runtime get its states supplied; the emitter's own calls to runtime functions reach their thunks; the migration names the runtime's states per file

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-25 15:44:50 +03:00
parent a476ec7976
commit d70b00f30d
15 changed files with 54328 additions and 53309 deletions

View file

@ -56,7 +56,7 @@ function emit_machine(st: Node) -> void {
if (addr != null) { s = emit_bind(`load i32, ptr {addr}`) }
else {
let regv = emit_expr(st.a)
s = emit_bind(`call i32 @fn_rt_reg(i32 {regv.code})`)
s = emit_bind(`call i32 {fn_sym("rt_reg")}(i32 {regv.code})`)
}
if nmach < len(mach_stk) { mach_stk[nmach] = st } else { push(mach_stk, st) }
nmach += 1
@ -96,7 +96,7 @@ function emit_become(st: Node) -> void {
emit(` store i32 {sv}, ptr {addr}\n`)
} else {
let regv = emit_expr(m.a)
emit(" call void @fn_rt_set_reg(i32 "); emit(regv.code); emit(", i32 "); emit(sv); emit(")\n")
emit(" call void " + fn_sym("rt_set_reg") + "(i32 "); emit(regv.code); emit(", i32 "); emit(sv); emit(")\n")
}
return
}