static struct ao_lisp_cons *save_cons[2];
static char *save_string[2];
-static ao_poly save_poly[2];
+static ao_poly save_poly[3];
static const struct ao_lisp_root ao_lisp_root[] = {
{
},
{
.type = &ao_lisp_string_type,
- .addr = (void **) &save_string[0]
+ .addr = (void **) &save_string[0],
},
{
.type = &ao_lisp_string_type,
- .addr = (void **) &save_string[1]
+ .addr = (void **) &save_string[1],
},
{
.type = NULL,
.type = NULL,
.addr = (void **) &save_poly[1]
},
+ {
+ .type = NULL,
+ .addr = (void **) &save_poly[2]
+ },
{
.type = &ao_lisp_atom_type,
.addr = (void **) &ao_lisp_atoms
[AO_LISP_BUILTIN] = &ao_lisp_builtin_type,
[AO_LISP_FRAME] = &ao_lisp_frame_type,
[AO_LISP_LAMBDA] = &ao_lisp_lambda_type,
+ [AO_LISP_STACK] = &ao_lisp_stack_type,
};
static int
return cons;
}
+void
+ao_lisp_poly_stash(int id, ao_poly poly)
+{
+ save_poly[id] = poly;
+}
+
+ao_poly
+ao_lisp_poly_fetch(int id)
+{
+ ao_poly poly = save_poly[id];
+ save_poly[id] = AO_LISP_NIL;
+ return poly;
+}
+
void
ao_lisp_string_stash(int id, char *string)
{
save_string[id] = NULL;
return string;
}
-void
-ao_lisp_poly_stash(int id, ao_poly poly)
-{
- save_poly[id] = poly;
-}
-ao_poly
-ao_lisp_poly_fetch(int id)
-{
- ao_poly poly = save_poly[id];
- save_poly[id] = AO_LISP_NIL;
- return poly;
-}