wip(0.S1, 0.S2): state records, mut and read-only state parameters, entry injection, module var refused; ludic migrate state

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-25 13:45:09 +03:00
parent 63a1fa1378
commit 1e8b5b0523
35 changed files with 1227 additions and 30 deletions

View file

@ -166,6 +166,8 @@ function emit_test_runner() -> void {
let rn1 = emit_bind(`add i32 {rn}, 1`)
emit(` store i32 {rn1}, ptr %ran\n`)
emit(" store i32 0, ptr @L_test_fail\n")
# 0.S: every state fresh for each test - the states are what changes, and they are made here
if i > 0 { emit(" call void @L_init_globals()\n") }
emit(` call void @fn__test_{itoa(i)}()\n`)
let f = emit_bind("load i32, ptr @L_test_fail")
let isbad = emit_bind(`icmp ne i32 {f}, 0`)