# The table of the program's own functions, by their descriptors, which
# the runtime searches for --memo-every and --memo-all.
def function_data(:defs) =
:rows = loop :next(:r = defs, :acc = []) (
| [] = r; acc
| [Def { :fname, _, _, _ }, ...:more] = r;
next(more, [acc, " .quad d_", fname, "\n"])
);
[" .balign 8\n .globl rt_functions, rt_nfunctions\n",
"rt_nfunctions: .quad ", show(length(defs)), "\n",
"rt_functions:\n", rows]
There's a lot of code in 5emel I haven't read; there's something like 15000 lines of TypeScript and JavaScript and 3000 lines of C. I've read almost none of any of that. I haven't even read all of the compiler, which is only about 1600 lines of code.Despite that, I think I've been putting my extensive past reading of programming books to pretty good use in this process. 5emel is directed at finding a workable, though not optimal, general solution to one of the famously most difficult problems in computer science, and if it is successful, I think it'll be a real advance — and one that LLMs can use as well as humans. Better, maybe.