wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-25 16:02:12 +03:00
parent 7b17b4a1b9
commit 02448e176c
38 changed files with 53877 additions and 53251 deletions

View file

@ -500,6 +500,10 @@ function emit_ns_call(ns: pointer, meth: pointer, e: Node) -> Val {
if (vdecl != null) {
let vnames = param_labels(vdecl)
var vi = 0
if vdecl.kind == N_FN {
nsfn = vdecl # 0.S: its states are the runtime's to give
vi = state_lead(vdecl)
}
while vi < len(vnames) { push(labels, vnames[vi]); vi += 1 }
}
}
@ -510,6 +514,10 @@ function emit_ns_call(ns: pointer, meth: pointer, e: Node) -> Val {
if (gdecl != null) {
let gnames = param_labels(gdecl)
var gi = 0
if gdecl.kind == N_FN {
nsfn = gdecl # 0.S: its states are the runtime's to give
gi = state_lead(gdecl)
}
while gi < len(gnames) { push(labels, gnames[gi]); gi += 1 }
}
}