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,23 @@
# check_builtins.ludic — the names a call always takes as the compiler's own, whatever the program
# declares: emit_call's built-ins that no `find_fn` guard lets a declared function take. A function
# so named is refused (ck_runtime_shadows) - a call would never reach it: a `words(st, k)` helper
# once compiled as words(n) with a pointer for its size. Every other built-in yields to a declared
# function, in the checker as in codegen; `ludic-dev syntax --check` holds this table to emit_call.
function is_call_builtin(name: pointer) -> bool {
if (name == "apply") or (name == "assert") or (name == "bytes") or (name == "data_of") { return true }
if (name == "expect") or (name == "expect_eq") or (name == "expect_near") or (name == "fixed") { return true }
if (name == "floor") or (name == "intern") or (name == "is_owner") or (name == "is_server") { return true }
if (name == "keep") or (name == "key") or (name == "len") or (name == "load") { return true }
if (name == "local_id") or (name == "net_poll") or (name == "net_pump") or (name == "net_send") { return true }
if (name == "owner") or (name == "panic") or (name == "print") or (name == "push") { return true }
if (name == "quit") or (name == "save") or (name == "self") or (name == "serialize") { return true }
if (name == "set_local_id") or (name == "set_owner") or (name == "set_role") or (name == "string") { return true }
if (name == "sync_size") or (name == "tick_fixed") or (name == "tick_render") or (name == "view") { return true }
if (name == "words") or (name == "world_attach_dyn") or (name == "world_count") or (name == "world_detach_dyn") { return true }
if (name == "world_field_count") or (name == "world_field_id") or (name == "world_field_name") or (name == "world_field_type") { return true }
if (name == "world_get") or (name == "world_has") or (name == "world_kind") or (name == "world_load") { return true }
if (name == "world_model_id") or (name == "world_prop_count") or (name == "world_prop_id") or (name == "world_prop_name") { return true }
if (name == "world_query_next") or (name == "world_register_prop") or (name == "world_save") or (name == "world_set") { return true }
if (name == "world_size") or (name == "world_spawn") { return true }
return false
}