mes: Single environment lookup for variables, SICP chapter 3.
authorJan Nieuwenhuizen <janneke@gnu.org>
Sat, 9 Dec 2017 07:33:50 +0000 (08:33 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sat, 9 Dec 2017 07:33:50 +0000 (08:33 +0100)
commit9fc27ee25a932b7bf9b9faeaa8e86ab15ea767d1
tree869e49d6b78950c299e0bde371a1c033289f00ae
parentd1444ead655bfb77b8b21a4ba2c83b9d66231b23
mes: Single environment lookup for variables, SICP chapter 3.

* src/mes.c (t): Add TVARIABLE.
  (scm_vm_eval_deref): New vm special.
  (make_vref_): New internal function.
  (eval_apply): WIP: replace symbols with their variable reference.
* src/gc.c (gc_loop): Handle TVARIABLE.
* src/lib.c (display_helper): Handle TVARIABLE.
* module/mes/type-0.mes (<cell:variable>): New variable.
  (cell:type-alist): Add it.
  (variable?): New function.
* module/mes/display.mes (display): Handle <variable>.
15 files changed:
make.scm
module/language/c99/compiler.mes
module/mes/boot-0.scm
module/mes/display.mes
module/mes/guile.scm
module/mes/module.mes
module/mes/pmatch.scm
module/mes/psyntax-1.mes
module/mes/type-0.mes
scaffold/boot/51-module.scm
src/gc.c
src/lib.c
src/mes.c
src/reader.c
tests/pmatch.test