altos/lisp: Clean up OS integration bits, add defun
[fw/altos] / src / lisp / ao_lisp_mem.c
index c11ec25d96df982afa581549b5edc28d963b72b4..66e09db0612f9eb4ce3d58a60dd20c75c6729b93 100644 (file)
@@ -262,6 +262,7 @@ static const struct ao_lisp_type const *ao_lisp_types[AO_LISP_NUM_TYPE] = {
        [AO_LISP_ATOM] = &ao_lisp_atom_type,
        [AO_LISP_BUILTIN] = &ao_lisp_builtin_type,
        [AO_LISP_FRAME] = &ao_lisp_frame_type,
+       [AO_LISP_LAMBDA] = &ao_lisp_lambda_type,
 };
 
 
@@ -330,7 +331,7 @@ ao_lisp_collect(void)
                        move_object();
                        DBG("\tbusy size %d\n", move_size);
                        if (move_size == 0)
-                               abort();
+                               ao_lisp_abort();
                        clear_object(ao_lisp_busy, move_old, move_size);
                        mark_object(ao_lisp_busy, move_new, move_size);
                        if (busy_object(ao_lisp_cons, move_old)) {
@@ -430,7 +431,7 @@ ao_lisp_move(const struct ao_lisp_type *type, void **ref)
 #endif
        DBG_MOVE("object %d\n", DBG_OFFSET(addr));
        if (!AO_LISP_IS_POOL(a))
-               abort();
+               ao_lisp_abort();
        DBG_MOVE_IN();
        addr = check_move(addr, size);
        if (addr != *ref)
@@ -494,7 +495,7 @@ ao_lisp_poly_move(ao_poly *ref, uint8_t do_note_cons)
                        type = ao_lisp_other_type(ao_lisp_move_map(ao_lisp_poly_other(p)));
 
                if (type >= AO_LISP_NUM_TYPE)
-                       abort();
+                       ao_lisp_abort();
 
                lisp_type = ao_lisp_types[type];
                if (!lisp_type)
@@ -600,7 +601,7 @@ ao_lisp_root_add(const struct ao_lisp_type *type, void *addr)
                        return 1;
                }
        }
-       abort();
+       ao_lisp_abort();
        return 0;
 }