summaryrefslogtreecommitdiff
path: root/src/lisp/ao_lisp.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-11-18 22:41:46 -0800
committerKeith Packard <keithp@keithp.com>2017-02-20 11:16:52 -0800
commitc3a4d7721f0f5d082336b8cc9c9d765ad2f7d17e (patch)
tree6a9d93d8450e290c57a03db3e9c1025c4a75dcd1 /src/lisp/ao_lisp.h
parent8f833f31f625526a5f1e9a1bd561733b5bb2bcaa (diff)
altos/lisp: Sort frames by atom
Fortunately, the collector always retains the relative order between addresses, so we can sort based on the atom address itself. This reduces the time spent looking for names in larger (e.g. global) frames. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lisp/ao_lisp.h')
-rw-r--r--src/lisp/ao_lisp.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lisp/ao_lisp.h b/src/lisp/ao_lisp.h
index af6ff8bb..1f7c85e1 100644
--- a/src/lisp/ao_lisp.h
+++ b/src/lisp/ao_lisp.h
@@ -621,7 +621,7 @@ ao_lisp_read_eval_print(void);
/* frame */
extern const struct ao_lisp_type ao_lisp_frame_type;
-#define AO_LISP_FRAME_FREE 4
+#define AO_LISP_FRAME_FREE 6
extern struct ao_lisp_frame *ao_lisp_frame_free_list[AO_LISP_FRAME_FREE];
@@ -637,6 +637,9 @@ ao_lisp_frame_new(int num);
void
ao_lisp_frame_free(struct ao_lisp_frame *frame);
+void
+ao_lisp_frame_bind(struct ao_lisp_frame *frame, int num, ao_poly atom, ao_poly val);
+
int
ao_lisp_frame_add(struct ao_lisp_frame **frame, ao_poly atom, ao_poly val);