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:
parent
26b986de5b
commit
d4df925b8f
13 changed files with 14830 additions and 13043 deletions
11
examples/functions/builtin_yield.ludic
Normal file
11
examples/functions/builtin_yield.ludic
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# builtin_yield.ludic - a built-in that a declared function may take (buffer, floats, double, ...)
|
||||
# yields to it in the checker as in codegen: this `buffer` is the program's own, returning text.
|
||||
#
|
||||
# Prints: ab 4
|
||||
program BuiltinYield {
|
||||
function buffer(a: string, b: string) -> string { return a + b }
|
||||
entry {
|
||||
let s = buffer("a", "b")
|
||||
print(`{s} {len(floats(4))}`)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue