diff options
author | Keith Packard <keithp@keithp.com> | 2017-12-01 15:40:23 -0600 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-12-01 15:40:23 -0600 |
commit | c31744299e5a4342bbe26d3735ee2d8f09192ae9 (patch) | |
tree | 108153f1d01c56800d6e4dc0c56dbcce979717be /src/lisp/ao_lisp_mem.c | |
parent | 98923ae1189f062b8b94120d47a56892db25493f (diff) |
altos/lisp: split set/def. Add def support to lambdas
In scheme, set can only re-define existing variables while def cannot
redefine existing variables in lambda context. Def within lambda
creates a new variable at the nearest enclosing scope.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lisp/ao_lisp_mem.c')
-rw-r--r-- | src/lisp/ao_lisp_mem.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lisp/ao_lisp_mem.c b/src/lisp/ao_lisp_mem.c index 890eba1b..3a704380 100644 --- a/src/lisp/ao_lisp_mem.c +++ b/src/lisp/ao_lisp_mem.c @@ -501,6 +501,7 @@ ao_lisp_collect(uint8_t style) MDBG_MOVE("collect %d\n", ao_lisp_collects[style]); #endif + MDBG_DO(ao_lisp_frame_write(ao_lisp_frame_poly(ao_lisp_frame_global))); /* The first time through, we're doing a full collect */ if (ao_lisp_last_top == 0) @@ -875,6 +876,7 @@ ao_lisp_alloc(int size) } addr = ao_lisp_pool + ao_lisp_top; ao_lisp_top += size; + MDBG_MOVE("alloc %d size %d\n", MDBG_OFFSET(addr), size); return addr; } |