projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/lisp: bounds check in move_map plus binary search
[fw/altos]
/
src
/
lisp
/
ao_lisp_lambda.c
diff --git
a/src/lisp/ao_lisp_lambda.c
b/src/lisp/ao_lisp_lambda.c
index e2053a6f3d4302e15e17c75c3dfe21cc8be90258..b164cd66421056662fc72f301c6f81efe3bd8b11 100644
(file)
--- a/
src/lisp/ao_lisp_lambda.c
+++ b/
src/lisp/ao_lisp_lambda.c
@@
-15,7
+15,6
@@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#define DBG_EVAL 0
#include "ao_lisp.h"
int
#include "ao_lisp.h"
int
@@
-78,9
+77,6
@@
ao_lisp_lambda_alloc(struct ao_lisp_cons *code, int args)
if (!lambda)
return AO_LISP_NIL;
if (!lambda)
return AO_LISP_NIL;
- if (!code->cdr)
- return ao_lisp_error(AO_LISP_INVALID, "missing parameters to lambda");
-
if (!ao_lisp_check_argt(_ao_lisp_atom_lambda, code, 0, AO_LISP_CONS, 1))
return AO_LISP_NIL;
f = 0;
if (!ao_lisp_check_argt(_ao_lisp_atom_lambda, code, 0, AO_LISP_CONS, 1))
return AO_LISP_NIL;
f = 0;
@@
-175,7
+171,8
@@
ao_lisp_lambda_eval(void)
args = ao_lisp_poly_cons(args->cdr);
vals = ao_lisp_poly_cons(vals->cdr);
}
args = ao_lisp_poly_cons(args->cdr);
vals = ao_lisp_poly_cons(vals->cdr);
}
- ao_lisp_cons_free(cons);
+ if (!ao_lisp_stack_marked(ao_lisp_stack))
+ ao_lisp_cons_free(cons);
cons = NULL;
break;
case AO_LISP_FUNC_LEXPR:
cons = NULL;
break;
case AO_LISP_FUNC_LEXPR: