Rewrite scm_ramapc()
authorDaniel Llorens <daniel.llorens@bluewin.ch>
Wed, 24 Apr 2013 21:29:48 +0000 (23:29 +0200)
committerAndy Wingo <wingo@pobox.com>
Mon, 10 Feb 2014 20:26:55 +0000 (21:26 +0100)
commit4cde4f63ee3f7357e332ec93bef2010d63836a6d
tree2225b5e0f5a74484b4d302468e43c8aaef332f21
parent2a8688a9d19e5825109d4abe4530b48019d5926f
Rewrite scm_ramapc()

* libguile/array-map.c
  - (cind): replace by cindk, that operates only on the unrolled index set.
  - (klen): new function.
  - (make1array): take extra inc argument.
  - (scm_ramapc): rewrite to unroll as many axes as possible instead of just all
    or one.
  - (AREF): lbnd is known to be 0: remove.
  - (ASET): v is known to come from SCM_I_ARRAY_V; assume base, inc, lbnd.
  - (racp): use ssize_t instead of long for the indices.
  - (scm_array_index_map_x): build the index list at the last-but-one axis, then
    set the car of the last element, instead of building the list at the last axis.
* test-suite/tests/ramap.test
  - add array-map! test with offset arguments.
libguile/array-map.c
test-suite/tests/ramap.test