diff options
author | Keith Packard <keithp@keithp.com> | 2016-11-18 21:16:11 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2016-11-18 21:16:11 -0800 |
commit | 289719fae3daa118c664e65fac0ab3b40ecc923e (patch) | |
tree | 73ec0a50ac5e6a1d0f5c30fb14a350511d3a6446 /src/lisp/ao_lisp.h | |
parent | 3fec65a3921b3783b250031b2824b4689b8635f9 (diff) |
altos/lisp: bounds check in move_map plus binary search
This makes move_map faster by skipping all addresses which aren't
changing.
Also changed the interface from address to offset to avoid computing
the offset multiple times.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lisp/ao_lisp.h')
-rw-r--r-- | src/lisp/ao_lisp.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lisp/ao_lisp.h b/src/lisp/ao_lisp.h index e238d4fe..af6ff8bb 100644 --- a/src/lisp/ao_lisp.h +++ b/src/lisp/ao_lisp.h @@ -128,6 +128,7 @@ ao_lisp_is_const(ao_poly poly) { #define AO_LISP_IS_CONST(a) (ao_lisp_const <= ((uint8_t *) (a)) && ((uint8_t *) (a)) < ao_lisp_const + AO_LISP_POOL_CONST) #define AO_LISP_IS_POOL(a) (ao_lisp_pool <= ((uint8_t *) (a)) && ((uint8_t *) (a)) < ao_lisp_pool + AO_LISP_POOL) +#define AO_LISP_IS_INT(p) (ao_lisp_base_type(p) == AO_LISP_INT); void * ao_lisp_ref(ao_poly poly); |