diff options
| author | Keith Packard <keithp@keithp.com> | 2016-11-15 09:55:22 -0800 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2017-02-20 11:16:51 -0800 | 
| commit | 974717eb9dad105c9897ee24f953d98d57eaec77 (patch) | |
| tree | ea77eec1b39f859353f17ad384950f6bd982c569 /src/lisp/ao_lisp.h | |
| parent | b3b5bd2c14cfcde6c551a87ee6da08a53f1e4bc6 (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 { | 
