* unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
authorMarius Vollmer <mvo@zagadka.de>
Sun, 9 Jan 2005 22:02:40 +0000 (22:02 +0000)
committerMarius Vollmer <mvo@zagadka.de>
Sun, 9 Jan 2005 22:02:40 +0000 (22:02 +0000)
commit9598a4060a558e70675ac3321597b68d914c6148
tree938ef05b6cd8adaae6ba246af3f3e4193e950be8
parent8c8491f56c25d3d385099b0b0f692b402783e2e8
* unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
New.
(scm_t_array_handle): Added ref, set, elements and
writable_elements for fast inline operation of
scm_array_handle_ref and scm_array_handle_set.
(scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
and replaced with inline code that simply calls the ref/set
members of the handle.
(enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
New.
(scm_array_handle_get): Initialize ref/set fields to memoize_ref
and memoize_set.
(scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
scm_bit_invert_x): Correctly multiply index with increment in the
general case.

* unif.c (scm_array_handle_set): Correctly execute only one
alternative.  D'Oh!
(scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
the array; this covers all cases with much simpler code.
libguile/inline.h
libguile/unif.c
libguile/unif.h