capacities (25.5a): @max(n) on a list field, and a full table is a failure
'@max(64) boxes: []Box' on a property's or a state's field is a promise: the grow path of a push to
that field (only the grow path, so nothing is paid until it doubles) checks it, and growing past n is
reported by the fence - 'PoolState.boxes grew past its @max(16) (it holds 16)' - counted under
count, said under warn, and under fail (a headless or dev build's default) the run ends with exit 87.
Mem.over("what") is the same for a package's own table: ludic.base's StrTable past its most
(sb_intern) and ludic.ui's memo past three quarters of MM_CAP no longer quietly copy per call. The
census counts overflows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
69d1db06a5
commit
6fb5118afd
8 changed files with 73094 additions and 71750 deletions
|
|
@ -75,7 +75,10 @@ function mm_find(m: UiMemo, tag: int, s: string) -> int {
|
|||
}
|
||||
# a new entry for (tag, s) with its results empty, or -1 when the table is full
|
||||
function mm_add(m: UiMemo, tag: int, s: string) -> int {
|
||||
if len(m.keys) * 4 >= MM_CAP * 3 { return -1 }
|
||||
if len(m.keys) * 4 >= MM_CAP * 3 {
|
||||
Mem.over("ludic.ui's memo, three quarters of MM_CAP") # 25.5a: past it every miss was made and lost
|
||||
return -1
|
||||
}
|
||||
var at = mm_hash(tag, s) & (MM_CAP - 1)
|
||||
while m.slots[at] != 0 { at = (at + 1) & (MM_CAP - 1) }
|
||||
push(m.keys, s)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue