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

@ -60,6 +60,7 @@ function emit_main(d: Node) -> void {
# game that renders (drives tick_render, draws, uses the engine light pass) has
# its framebuffer allocated. Headless it only allocates — no window, no output —
# so a non-rendering entry game is unchanged.
emit(" call void @L_init_runtime()\n")
if (find_fn("rt_init") != null) { emit(" call void " + fn_sym("rt_init") + "()\n") }
emit(" call void @L_init_globals()\n")
emit_block(d.a)
@ -146,6 +147,7 @@ function emit_test_runner() -> void {
}
emit(" ret i32 0\n")
emit(`{lrun0}:\n`)
emit(" call void @L_init_runtime()\n")
if has_ecs() { emit(" call void @rt_init()\n") }
emit(" call void @L_init_globals()\n")
i = 0