diff options
author | Keith Packard <keithp@keithp.com> | 2016-11-15 09:55:22 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2016-11-17 22:18:39 -0800 |
commit | acfc29f2400cc3c06745edb5ec0c82b82998d3cc (patch) | |
tree | 87d7a10500c9576afb563e315b0855134ce66b47 /src/lisp/ao_lisp.h | |
parent | 3d837e52b29da16088fb5ca7921d8bcb99941759 (diff) |
altos/lisp: Evaluate macros once, then smash them into place
This assumes that macros are all pure functions, which should be true
for syntactic macros.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lisp/ao_lisp.h')
-rw-r--r-- | src/lisp/ao_lisp.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/lisp/ao_lisp.h b/src/lisp/ao_lisp.h index efd13cf5..2db4914f 100644 --- a/src/lisp/ao_lisp.h +++ b/src/lisp/ao_lisp.h @@ -173,14 +173,15 @@ ao_lisp_frame_poly(struct ao_lisp_frame *frame) { enum eval_state { eval_sexpr, /* Evaluate an sexpr */ - eval_val, - eval_formal, - eval_exec, - eval_cond, - eval_cond_test, - eval_progn, - eval_while, - eval_while_test, + eval_val, /* Value computed */ + eval_formal, /* Formal computed */ + eval_exec, /* Start a lambda evaluation */ + eval_cond, /* Start next cond clause */ + eval_cond_test, /* Check cond condition */ + eval_progn, /* Start next progn entry */ + eval_while, /* Start while condition */ + eval_while_test, /* Check while condition */ + eval_macro, /* Finished with macro generation */ }; struct ao_lisp_stack { |