core: Remove struct definitions for builtins, drop snarfing.
authorJan Nieuwenhuizen <janneke@gnu.org>
Fri, 4 Jan 2019 08:55:16 +0000 (09:55 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Fri, 4 Jan 2019 08:55:16 +0000 (09:55 +0100)
commit99ac7b59c4b98cb922d1115e61818a51390cf9fe
tree5d3806e4a28f927fe9f08342022f40998e69594e
parent04556c5636f5c72fa7e4fe79682f896a6fca44ef
core: Remove struct definitions for builtins, drop snarfing.

After making a change to the list of builtin functions, run

    cat src/*.i

and move the into

    src/mes.c:mes_builtins ()

and, or also after changing the list of fixed symbols in src/mes.c:mes_symbols (), do

    cat src/*.h > src/builtins.h

* build-aux/build.sh.in: Remove snarfing.
* build-aux/bootstrap.sh.in: Likewise.
* mes/module/mes/display.mes (display):
* mes/module/mes/type-0.mes (cell:type-alist): Remove <cell:function>.
(function?, builtin?): Remove.
* src/builtins.h: New file.
* src/mes.c (TFUNCTION): Remove.
(struct function): Remove.
(apply_builtin): Rewrite from call.
(mes_builtins): Rewrite.
(init_builtin, make_builtin_type, make_builtin, builtin_name,
builtin_arity, builtin, builtin_p, builtin_printer): New function.
13 files changed:
.gitignore
build-aux/bootstrap.sh.in
build-aux/build.sh.in
build-aux/snarf.sh
mes/module/mes/display.mes
mes/module/mes/type-0.mes
src/builtins.h [new file with mode: 0644]
src/gc.c
src/hash.c
src/lib.c
src/mes.c
src/module.c
src/struct.c