checker: a function named like a built-in a call always takes is refused at its declaration - function words(st, k) compiled and every call became words(n) with a pointer for n (invalid IR, far from the cause); the table is selfhost/check/check_builtins.ludic, emit_call's built-ins no find_fn guard lets a declared function take, and ludic-dev syntax --check holds it to emit_call both ways; every other built-in (buffer, floats, double, ...) yields to a declared function in the checker as it already did in codegen. string_temps' keep and cross_heap_test's keep renamed (hand, keep_cell); rejected/builtin_call_name and functions/builtin_yield with their cases (added, not run); reseeded, bootstrap-cfree fixpoint holds

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-30 01:10:24 +03:00
parent 26b986de5b
commit d4df925b8f
13 changed files with 14830 additions and 13043 deletions

View file

@ -0,0 +1,8 @@
# builtin_call_name.ludic - a function named like a built-in a call always takes is refused at its
# declaration: every call to `words` is words(n), n zeroed ints, so this helper would never run (a
# pointer became its size). (Rejected on purpose: tools/ludic-cli/test.ludic.)
program BuiltinCallName {
function words(n: int, k: string) -> string { return k }
function keep(s: string) -> string { return s }
entry { print(words(1, keep("x"))) }
}