runtime: restore the three builtins that made elc unrebuildable #125
Reference in New Issue
Block a user
Delete Branch "fix/elc-rebuildable-compiler-builtins"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The committed
elcbinary could not be refreshed from its own source. Rebuilding failed with three implicit-declaration errors:el_mem_check,stdout_to_file,stdout_restore. The compiler's own source calls all three (compiler.el:472,479,574,codegen.el:4248) and two are registered incodegen.el'sbuiltin_aritytable — but none were defined in this runtime.They were found intact in
ui/examples/native-hello-ios/NativeHello/el_runtime.c— a divergent private copy of this runtime that still carried them. Ported verbatim.Why it mattered: the canonical
elcwas frozen. Source gained@routedispatch codegen (emit_route_dispatch, codegen.el:3948) and the@managerboundary-beat seam, but no rebuilt binary could carry them — so neuron's soul, whoseroutes.elcalls the compiler-synthesizedel_route_dispatch, could not be built at all.Verified after the fix:
elcrebuilds from current source, cleanelcemitsel_route_dispatch(2 occurrences in the soul amalgam, previously 0) and injectsengram_boundary_beatat@managerboundaries — the decorator seam is live rather than inertNote:
el_mem_checkis itself the compiler's memory guard (ELC_MAX_MEM_MB, default 512MB, self-terminates before the OS OOM-killer). The runtime was missing the very guard that would have surfaced the compiler's memory blowup as a clean error instead of a 27GB host-killer.The committed elc binary could not be refreshed from its own source. Rebuilding failed with three implicit-declaration errors: el_mem_check, stdout_to_file, stdout_restore. The compiler's own source calls all three (compiler.el:472,479,574 and codegen.el:4248) and two are registered in codegen.el's builtin_arity table — but none were defined in this runtime. They were found intact in ui/examples/native-hello-ios/NativeHello/el_runtime.c, a divergent private copy of this runtime that still carried them. Ported verbatim. Consequence of them being missing: the canonical elc binary was frozen. Source gained @route dispatch codegen (emit_route_dispatch, codegen.el:3948) and the @manager boundary-beat seam, but no rebuilt binary could carry them, so neuron's soul — whose routes.el now calls the compiler-synthesized el_route_dispatch — could not be built at all. Verified after the fix: - elc rebuilds from current source, clean. - Self-hosting fixpoint byte-identical (stage3 == stage2). - The rebuilt elc emits el_route_dispatch (2 occurrences in the soul amalgam, previously 0) and injects engram_boundary_beat at @manager boundaries, i.e. the decorator seam is live rather than inert. el_mem_check is itself the compiler's memory guard (ELC_MAX_MEM_MB, default 512MB, self-terminates before the OS OOM-killer fires) — so the runtime was missing the very guard that would have surfaced the compiler's memory blowup as a clean error instead of a 27GB host-killer.