selfhost/runtime: Stage 0-1 runner + MIR JSON loader (summary) with trace; compiler: scopebox/loopform prepass wiring (flags, child args); libs: add P1 standard boxes (console/string/array/map) as thin wrappers; runner: pass --box-pref via env; ops_calls dispatcher skeleton; docs: selfhost executor roadmap + scopebox/loopform notes; smokes: selfhost runner + identity prepasses; CURRENT_TASK: update plan and box lib schedule

This commit is contained in:
Selfhosting Dev
2025-09-22 21:52:39 +09:00
parent b00dc4ec37
commit da78fc174b
72 changed files with 3163 additions and 2557 deletions

View File

@ -0,0 +1,33 @@
// ArrayStd — minimal standard array helpers (commonized API)
static box ArrayStd {
size(a) {
if a == null { return 0 }
// support both size/len
if a.size { return a.size() }
if a.len { return a.len() }
return 0
}
len(a) { return me.size(a) }
get(a, i) {
if a == null { return null }
if a.get { return a.get(i) }
return null
}
set(a, i, v) {
if a == null { return 0 }
if a.set { a.set(i, v) return 0 }
return 0
}
push(a, v) {
if a == null { return 0 }
if a.push { return a.push(v) }
return 0
}
toString(a) {
if a == null { return "[]" }
if a.toString { return a.toString() }
return "[]"
}
}