ludic/selfhost/check
Orkuncakilkaya a0b030290b region rule (25.3c): keep() and intern(), frame_keeps, and --arena-strict
keep(x) copies a string, a slice (header and elements) or a record (shallow) onto the heap; intern(s)
hands back one heap string per distinct text from a fixed table in the runtime (FNV-1a, 65536 slots,
copied the first time; past 49152 only copied). Both are how frame code keeps what it made on purpose:
the escape analysis takes the copy as the heap's and leaves the argument LOCAL.

The analysis now records why a class escapes (the store, the event, the global it reached) and
ludic deps lists every allocation frame code makes and keeps - fkeep lines, 'ludic deps --keeps',
the frame_keeps number --check ratchets - leaving out what is under @alloc_ok and a push's growth
(25.5's capacities). --arena-strict (or 'arena strict') makes each an error naming the store, before
anything is emitted. A test: a template stored into a state is the one error; keep and intern of the
next two, an @alloc_ok push and a scratch temporary are not; 195 frames of arena resets under
R3D_ARENA_CHECK=1 later the kept and interned texts read as made, and intern gives the same string.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 16:33:53 +03:00
..
check_call.ludic region rule (25.3c): keep() and intern(), frame_keeps, and --arena-strict 2026-09-28 16:33:53 +03:00
check_env.ludic wip(0.S1, 0.S2): state records, mut and read-only state parameters, entry injection, module var refused; ludic migrate state 2026-09-25 13:45:09 +03:00
check_expr.ludic feat(base): 0.R4 - a queue keeps its own count, so every package verb takes only its own state; ludic migrate state --prune 2026-09-26 04:19:56 +03:00
check_gen.ludic wip(0.S1, 0.S2): state records, mut and read-only state parameters, entry injection, module var refused; ludic migrate state 2026-09-25 13:45:09 +03:00
check_gen_call.ludic wip(0.S1, 0.S2): state records, mut and read-only state parameters, entry injection, module var refused; ludic migrate state 2026-09-25 13:45:09 +03:00
check_index.ludic feat(lang): L5 generic records and functions 2026-09-24 02:21:15 +03:00
check_ops.ludic feat(lang): L4 type checker between parse and emit 2026-09-24 01:34:49 +03:00
check_state.ludic fix(migrate): 0.R5 - a state an argument to a C function comes out of keeps the mutability it was declared with, so --tighten leaves the mut on a wrapper writing through a native handle (phys_force) and does not add one to a query that reads through one 2026-09-27 04:23:11 +03:00
check_stmt.ludic fix(check): 0.R4 - a misspelled type in a parameter, a result or a field is refused where it is written 2026-09-26 05:58:35 +03:00
check_tynames.ludic fix(check): 0.R4 - a misspelled type in a parameter, a result or a field is refused where it is written 2026-09-26 05:58:35 +03:00
check_types.ludic feat(lang): L7 memory is safe unless it says unsafe 2026-09-24 12:53:27 +03:00
check_unsafe.ludic feat(lang): L7 memory is safe unless it says unsafe 2026-09-24 12:53:27 +03:00