altos/lisp: Make ao_lisp_ref and ao_lisp_poly non-inline
[fw/altos] / src / lisp / ao_lisp_atom.c
index 5f1bcda02ac372b0bff2ba72c91d1bd9b7177de6..efa4f6214705d78623e27ad01ba686c9bf1f0e9f 100644 (file)
@@ -48,7 +48,7 @@ static void atom_move(void *addr)
        struct ao_lisp_atom     *atom = addr;
 
        for (;;) {
-               if (ao_lisp_poly_move(&atom->next))
+               if (ao_lisp_poly_move(&atom->next, 0))
                        break;
                atom = ao_lisp_poly_atom(atom->next);
        }
@@ -89,8 +89,8 @@ ao_lisp_atom_intern(char *name)
        return atom;
 }
 
-static struct ao_lisp_frame    *ao_lisp_frame_global;
-struct ao_lisp_frame           *ao_lisp_frame_current;
+struct ao_lisp_frame   *ao_lisp_frame_global;
+struct ao_lisp_frame   *ao_lisp_frame_current;
 
 static void
 ao_lisp_atom_init(void)
@@ -134,7 +134,7 @@ ao_lisp_atom_get(ao_poly atom)
 #endif
        if (ref)
                return *ref;
-       return AO_LISP_NIL;
+       return ao_lisp_error(AO_LISP_UNDEFINED, "undefined atom %s", ao_lisp_poly_atom(atom)->name);
 }
 
 ao_poly
@@ -147,7 +147,7 @@ ao_lisp_atom_set(ao_poly atom, ao_poly val)
        if (ref)
                *ref = val;
        else
-               ao_lisp_frame_global = ao_lisp_frame_add(ao_lisp_frame_global, atom, val);
+               ao_lisp_frame_add(&ao_lisp_frame_global, atom, val);
        return val;
 }