phase: 20.49 COMPLETE; 20.50 Flow+String minimal reps; 20.51 selfhost v0/v1 minimal (Option A/B); hv1-inline binop/unop/copy; docs + run_all + CURRENT_TASK -> 21.0

This commit is contained in:
nyash-codex
2025-11-06 15:41:52 +09:00
parent 2dc370223d
commit 77d4fd72b3
1658 changed files with 6288 additions and 2612 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 "{}"
}
}