1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-07-04 00:30:30 +02:00

Remove 'contiguous' flag in arrays

Was never used, so we save having to set it on various ops.

* libguile/arrays.h (SCM_I_ARRAY_FLAG_CONTIGUOUS,
  SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG,
  SCM_I_ARRAY_CONTP): Remove.
* libguile/arrays.c (scm_i_ra_set_contp): Remove. Elsewhere remove all
  uses of this and the other macros.
This commit is contained in:
Daniel Llorens 2020-02-07 15:43:24 +01:00
parent d88d4d5558
commit edf9abb4a0
3 changed files with 5 additions and 34 deletions

View file

@ -89,16 +89,8 @@ SCM_API SCM scm_array_rank (SCM ra);
/* internal. */
/* see scm_from_contiguous_array for these three */
#define SCM_I_ARRAY_FLAG_CONTIGUOUS (1 << 0)
#define SCM_SET_ARRAY_CONTIGUOUS_FLAG(x) \
(SCM_SET_CELL_WORD_0 ((x), SCM_CELL_WORD_0 (x) | (SCM_I_ARRAY_FLAG_CONTIGUOUS << 16)))
#define SCM_CLR_ARRAY_CONTIGUOUS_FLAG(x) \
(SCM_SET_CELL_WORD_0 ((x), SCM_CELL_WORD_0 (x) & ~(SCM_I_ARRAY_FLAG_CONTIGUOUS << 16)))
#define SCM_I_ARRAYP(a) SCM_TYP16_PREDICATE (scm_tc7_array, a)
#define SCM_I_ARRAY_NDIM(x) ((size_t) (SCM_CELL_WORD_0 (x)>>17))
#define SCM_I_ARRAY_CONTP(x) (SCM_CELL_WORD_0 (x) & (SCM_I_ARRAY_FLAG_CONTIGUOUS << 16))
#define SCM_I_ARRAY_V(a) SCM_CELL_OBJECT_1 (a)
#define SCM_I_ARRAY_BASE(a) ((size_t) SCM_CELL_WORD_2 (a))