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

@ -231,6 +231,15 @@ function ck_call_named(e: Node, name: pointer) -> pointer {
return "?"
}
if ck_raw_builtin(name) { ck_raw(e, `{name}()`) }
# a built-in no call always takes (not is_call_builtin) yields to a function the program declares,
# as codegen's does: the checker once typed a `buffer` helper as buffer(n) while codegen called it
if not is_call_builtin(name) {
let uf = ck_fn(name)
if uf != null {
ck_vis(uf, name, e)
return ck_call_fn(e, name, uf)
}
}
let bt = ck_builtin(e, name)
if bt != null { return bt }
let f = ck_fn(name)