ludic/selfhost/backend
Orkuncakilkaya 12fdc0717e a program's states made on first injection, and the ECS stores started at 8 slots
Maroon Lake's launcher watcher - a process that only spawns the game and waits - held 58 MB, 48 MB of
it MALLOC_SMALL. Measured with malloc stack logging it was not the state defaults but L_grow: every
program sized every property type's per-entity store to MAX_ENT (1024) slots at start, 1,583 stores,
entities or none. And every state record was made with its defaults in L_init_globals before Boot.

- emit_lazy.ludic: a program's (not the runtime's) state global is left out of L_init_globals, and
  every read of it calls @S_<global>(), which makes it on first call from its own initializer - after
  every registry and plain global, so a default may read them (the init-order crash cannot come back
  through a state). What a getter makes is declared (@lp_fdecl): a state first touched in play is made
  once and not judged as a frame's keep. A function value's trampoline calls the getter too.
- L_grow starts the stores at ECS_FIRST (8) and doubles as entities come, as it always did past MAX_ENT.

The watcher (with the game's watch step moved before the systems' defs): 57 MB -> 11 MB; the only
state it makes is UiState (14 KB). What is left: AppKit's window, opened by rt_init before main for any
windowed program (~4 MB), and the runtime's font, image and 2D inits (~1.2 MB).

Goldens: the arena, fence, value and json goldens; the 36 ui examples; 30 of the 32 ECS test cases
(sprite_render and sprite_atlas time out under a plain runner with the toolchain before this too).
Package tests: ludic.base, save, settings, i18n.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 14:14:05 +03:00
..
game a program's states made on first injection, and the ECS stores started at 8 slots 2026-09-29 14:14:05 +03:00
stdlib arena (25.3b): LOCAL sites allocate from the frame's scratch; dispatch is not an allocation; @frame by property 2026-09-28 16:25:32 +03:00
emit_addr.ludic feat(lang): L11 views and templates - the UI is markup, not code 2026-09-24 15:58:47 +03:00
emit_call.ludic a program's states made on first injection, and the ECS stores started at 8 slots 2026-09-29 14:14:05 +03:00
emit_core.ludic Os.heap_bytes: the heap without the renderer; string_temps reads it 2026-09-28 12:31:42 +03:00
emit_decl.ludic frame allocs (25.2): @frame on a step list's field, @alloc_ok on a statement, and on an exported function 2026-09-28 15:56:32 +03:00
emit_deps.ludic frame allocs: a local shadowing a function is no edge, the drain's calls are no edges, HEAP keeps only a growth off the arena, and the arena starts at its first use 2026-09-28 20:23:28 +03:00
emit_escape.ludic escape (fix): kept memory is HEAP, so what is pushed through an alias of it is kept 2026-09-28 21:15:32 +03:00
emit_expr.ludic fence (25.1): every allocation goes through the fence - sites, frame judging, census, callers 2026-09-28 15:35:29 +03:00
emit_fence.ludic fence: every runtime call is its line's site, and site 0 comes back when it returns 2026-09-29 00:40:28 +03:00
emit_fence_ir.ludic intern: past its store or its table, the fence's overflow - said once 2026-09-29 00:37:56 +03:00
emit_float.ludic fence (25.1): every allocation goes through the fence - sites, frame judging, census, callers 2026-09-28 15:35:29 +03:00
emit_fnval.ludic a program's states made on first injection, and the ECS stores started at 8 slots 2026-09-29 14:14:05 +03:00
emit_frame.ludic frame allocs: a local shadowing a function is no edge, the drain's calls are no edges, HEAP keeps only a growth off the arena, and the arena starts at its first use 2026-09-28 20:23:28 +03:00
emit_head.ludic a program's states made on first injection, and the ECS stores started at 8 slots 2026-09-29 14:14:05 +03:00
emit_intrin.ludic fence: every runtime call is its line's site, and site 0 comes back when it returns 2026-09-29 00:40:28 +03:00
emit_intrin2.ludic fence (25.1): every allocation goes through the fence - sites, frame judging, census, callers 2026-09-28 15:35:29 +03:00
emit_lazy.ludic a program's states made on first injection, and the ECS stores started at 8 slots 2026-09-29 14:14:05 +03:00
emit_mem.ludic fence (25.1): every allocation goes through the fence - sites, frame judging, census, callers 2026-09-28 15:35:29 +03:00
emit_new.ludic capacities (25.5a): @max(n) on a list field, and a full table is a failure 2026-09-28 16:43:02 +03:00
emit_resource.ludic owned fields (25.5e): @owns(Kind) on a record's field, and owned_leaks 2026-09-28 17:01:28 +03:00
emit_stmt.ludic frame allocs (25.2): @frame on a step list's field, @alloc_ok on a statement, and on an exported function 2026-09-28 15:56:32 +03:00
emit_vis.ludic fix(lang): the action drain is the program's; --check runs every check a build makes; a registry key named count is refused; name lookups are tables 2026-09-25 23:34:43 +03:00