diff options
author | Keith Packard <keithp@keithp.com> | 2016-11-18 21:16:11 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-02-20 11:16:52 -0800 |
commit | 35424031747b41b1125e715a975f1679b89fc27a (patch) | |
tree | d8990f145fcd2c8c891ec23ecc95e51f260d9081 /src/lisp/ao_lisp.h | |
parent | 85db6d68a273859482e036b60fec7e2b84e9c262 (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); |