* libguile/vectors.c
- (scm_vector_writable_elements): allow any non-uniform rank 1 array,
after the doc. Match the implementation with scm_uniform_vector_elements.
- (scm_vector_elements): after the above.
* libguile/uniform.c
- (scm_uniform_vector_writable_elements): ditto for uniform rank 1 arrays.
* libguile/sort.c
- revert the changes in 7a6fd9, except for the argument type test; allow
what scm_vector_(writable_)elements allows.
This fixes an inconsistency where uniform-vector? of a shared array could
be true but -ref operations failed to account correctly for lbnd.
* libguile/uniform.c
- scm_is_uniform_vector: SCM_I_ARRAYP disqualifies obj as uniform vector.
- scm_c_uniform_vector_length: lbnd is known 0, so don't use it.
- scm_c_uniform_vector_ref: lbnd/base/inc are known to be 0/0/1.
- scm_c_uniform_vector_set_x!: idem.
- scm_uniform_vector_writable_elements: check uvec's type.
* test-suite/tests/arrays.test
- group the exception types at the top.
- check that uniform-vector functions do not accept general arrays.
* libguile/uniform.h:
* libguile/uniform.c (scm_uniform_vector_element_type_code): New
interface, returns a type code as an integer.
* module/system/vm/assembler.scm (<uniform-vector-backing-store>)
(simple-vector?, uniform-array?, statically-allocatable?)
(intern-constant, link-data, link-constants): Support uniform arrays,
and punt on vectors aren't contiguous from 0. Support for general
arrays will come later.
* test-suite/tests/rtl.test ("load-constant"): Add tests.
* test-suite/Makefile.am:
* test-suite/tests/bitvectors.test: Add a new file to test bitvectors.
* libguile/uniform.c (scm_c_uniform_vector_length): Don't call
scm_uniform_vector_elements, as we don't need to be able to access the
elements with pointers to bytes. Fixes uniform-vector-length on
bitvectors.
* libguile/uniform.h (scm_array_handle_uniform_element_bit_size): New
public accessor.
* libguile/uniform.c (scm_array_handle_uniform_element_size): Better
errors in non-byte-aligned arrays.
(scm_uniform_vector_element_type, scm_uniform_vector_element_size)
(scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
(scm_uniform_vector_to_list): Don't require byte-aligned access.
* libguile/bytevectors.c (scm_uniform_array_to_bytevector):
* libguile/arrays.c (scm_from_contiguous_typed_array): Fix for
uniform arrays whose element size is not a multiple of the byte size.