* mes.c (r0, r1, r2, r3, stack): New globals. (gc_loop): Handle MACRO and SCM. (gc_copy): Handle FUNCTION, allow for pre-allocated SCM and SYMBOL. (assq): Flag any BROKEN_HEARTs. (vm_call): New function. Enables moving C stack to GC stack. (evlis_env, apply_env, eval_env, expand_macro_env, begin_env, if_env): Use vm_call-indirection. (call_lambda): New function. (vm_apply_env): Rename from apply_env. Remove parameters, instead use r1, r2 and r0. (vm_evlis_env, vm_eval_env, vm_expand_macro_env, vm_begin_env, vm_if_env): Likewise. (acons): New function. (mes_environment) [!MES_FULL, MES_MINI]: Add cpp switches to create minimally filled environment, for debugging. (main): Print free value at exit. * define.c (define_env): Use vm_call-indirection. (vm_define_env): Rename from define_env. * quasiquote.c (eval_quasiquote): Use vm_call-indirection. (vm_eval_quasiquote): Rename from eval_quasiquote. * tests/gc-2.test: New test. tests/gc-2a.test: New test. tests/gc-3.test: New test. |
||
---|---|---|
build-aux | ||
doc/examples | ||
guile | ||
make | ||
module | ||
scripts | ||
tests | ||
.gitignore | ||
ANNOUNCE | ||
ANNOUNCE-2 | ||
AUTHORS | ||
COPYING | ||
GNUmakefile | ||
HACKING | ||
INSTALL | ||
NEWS | ||
README | ||
configure | ||
define.c | ||
guix.scm | ||
lib.c | ||
math.c | ||
mes.c | ||
posix.c | ||
quasiquote.c | ||
string.c | ||
type.c |
README
-*- org -*- Mes -- Maxwell Equations of Software Mes aims to create an entirely source-based bootstrapping path. The target is to [have GuixSD] boostrap from a minimal, easily inspectable binary --that should be readable as source-- into something close to R6RS Scheme. As bootstrapping is presumably easiest and probably most fun with Scheme, the next step for Mes is mescc: a C compiler/linker to boostrap into GNU Gcc and GNU Guile, possibly via Tiny-CC. Mes is inspired by The Maxwell Equations of Software: [[http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf][LISP-1.5]] -- John McCarthy page 13. Mes is free software, it is distributed unde the terms of the GNU General Public Licence version 3 or later. See the file COPYING. * Get it git clone https://gitlab.com/janneke/mes * Build it (see INSTALL for full instructions) ./configure make all make check * REPL it scripts/repl.mes * Mescc compiler scripts/mescc.mes doc/examples/main.c