wip(0.S2): migrate - a var nothing writes becomes a let; a state is keyed by its module, directory or program, so every program's plan agrees; paths normalized; program states named SceneDemoState / scene_demo_st; the LSP reads state, mut and entry/handler parameters

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-25 15:31:34 +03:00
parent 3eda72e8c2
commit 5ffe50ed02
463 changed files with 72045 additions and 67421 deletions

View file

@ -6,11 +6,13 @@ property UiInst {
ptr: pointer = null
seen: int = 0
}
function in_get(ui_st: mut UiState, key: string, k: UiClass) -> UiInst {
for i in 0 .. len(ui_st.in_list) {
let it = ui_st.in_list[i]
var in_list: []UiInst = new []UiInst
var in_build: int = 0
function in_get(key: string, k: UiClass) -> UiInst {
for i in 0 .. len(in_list) {
let it = in_list[i]
if it.key == key and it.cls.name == k.name {
it.seen = ui_st.in_build
it.seen = in_build
return it
}
}
@ -18,16 +20,16 @@ function in_get(ui_st: mut UiState, key: string, k: UiClass) -> UiInst {
it.key = key
it.cls = k
it.ptr = k.make()
it.seen = ui_st.in_build
push(ui_st.in_list, it)
it.seen = in_build
push(in_list, it)
return it
}
# after a build of `screen`: its instances the build did not reach are unmounted
function in_sweep(ui_st: mut UiState, screen: string) -> void {
function in_sweep(screen: string) -> void {
let keep = new []UiInst
for i in 0 .. len(ui_st.in_list) {
let it = ui_st.in_list[i]
if it.seen == ui_st.in_build or not lc_mine(it.key, screen) { push(keep, it) }
for i in 0 .. len(in_list) {
let it = in_list[i]
if it.seen == in_build or not lc_mine(it.key, screen) { push(keep, it) }
}
ui_st.in_list = keep
in_list = keep
}