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,32 @@
// MapStd — minimal standard map helpers (commonized API)
static box MapStd {
size(m) {
if m == null { return 0 }
if m.size { return m.size() }
return 0
}
has(m, key) {
if m == null { return 0 }
if m.has { return m.has(key) }
// fallback: compare get() to null
if m.get { return m.get(key) != null ? 1 : 0 }
return 0
}
get(m, key) {
if m == null { return null }
if m.get { return m.get(key) }
return null
}
set(m, key, val) {
if m == null { return 0 }
if m.set { m.set(key, val) return 0 }
return 0
}
toString(m) {
if m == null { return "{}" }
if m.toString { return m.toString() }
return "{}"
}
}