+static struct ao_lisp_cons *save_cons[2];
+static char *save_string[2];
+static ao_poly save_poly[2];
+
+static const struct ao_lisp_root ao_lisp_root[] = {
+ {
+ .type = &ao_lisp_cons_type,
+ .addr = (void **) &save_cons[0],
+ },
+ {
+ .type = &ao_lisp_cons_type,
+ .addr = (void **) &save_cons[1],
+ },
+ {
+ .type = &ao_lisp_string_type,
+ .addr = (void **) &save_string[0]
+ },
+ {
+ .type = &ao_lisp_string_type,
+ .addr = (void **) &save_string[1]
+ },
+ {
+ .type = NULL,
+ .addr = (void **) &save_poly[0]
+ },
+ {
+ .type = NULL,
+ .addr = (void **) &save_poly[1]
+ },
+ {
+ .type = &ao_lisp_atom_type,
+ .addr = (void **) &ao_lisp_atoms
+ },
+ {
+ .type = &ao_lisp_frame_type,
+ .addr = (void **) &ao_lisp_frame_global,
+ },
+ {
+ .type = &ao_lisp_frame_type,
+ .addr = (void **) &ao_lisp_frame_current,
+ },
+ {
+ .type = &ao_lisp_stack_type,
+ .addr = (void **) &ao_lisp_stack,
+ },
+ {
+ .type = NULL,
+ .addr = (void **) &ao_lisp_v,
+ },
+ {
+ .type = &ao_lisp_cons_type,
+ .addr = (void **) &ao_lisp_read_cons,
+ },
+ {
+ .type = &ao_lisp_cons_type,
+ .addr = (void **) &ao_lisp_read_cons_tail,
+ },
+ {
+ .type = &ao_lisp_cons_type,
+ .addr = (void **) &ao_lisp_read_stack,
+ },
+};
+
+#define AO_LISP_ROOT (sizeof (ao_lisp_root) / sizeof (ao_lisp_root[0]))
+
+static const void ** const ao_lisp_cache[] = {
+ (const void **) &ao_lisp_cons_free_list,
+ (const void **) &ao_lisp_stack_free_list,
+ (const void **) &ao_lisp_frame_free_list[0],
+ (const void **) &ao_lisp_frame_free_list[1],
+ (const void **) &ao_lisp_frame_free_list[2],
+ (const void **) &ao_lisp_frame_free_list[3],
+};
+
+#if AO_LISP_FRAME_FREE != 4
+#error Unexpected AO_LISP_FRAME_FREE value
+#endif
+
+#define AO_LISP_CACHE (sizeof (ao_lisp_cache) / sizeof (ao_lisp_cache[0]))
+
+#define AO_LISP_BUSY_SIZE ((AO_LISP_POOL + 31) / 32)
+
+static uint8_t ao_lisp_busy[AO_LISP_BUSY_SIZE];
+static uint8_t ao_lisp_cons_note[AO_LISP_BUSY_SIZE];
+static uint8_t ao_lisp_cons_last[AO_LISP_BUSY_SIZE];
+static uint8_t ao_lisp_cons_noted;
+
+uint16_t ao_lisp_top;
+
+struct ao_lisp_chunk {
+ uint16_t old_addr;
+ union {
+ uint16_t size;
+ uint16_t new_addr;
+ };
+};