This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=4303fe9b6ef3bbd5e20b33a4167ff96ac70bc53e The branch, ra0 has been created at 4303fe9b6ef3bbd5e20b33a4167ff96ac70bc53e (commit) - Log ----------------------------------------------------------------- commit 4303fe9b6ef3bbd5e20b33a4167ff96ac70bc53e Author: Daniel Llorens <[email protected]> Date: Wed May 22 13:36:24 2013 +0200 Arrays are not an array implementation * libguile/bitvectors.c: match other uses of SCM_ARRAY_IMPLEMENTATION. * libguile/generalized-arrays.c (scm_is_array): don't use scm_i_array_implementation_for_obj on arrays. (scm_is_typed_array): idem. Use impl->get_handle instead of scm_array_get_handle to avoid calling scm_i_array_implementation_for_obj twice. * libguile/arrays.c: remove SCM_ARRAY_IMPLEMENTATION on scm_tc7_array type. commit df93c084c4e208aeaf6933b718d0a15263f1b8ff Author: Daniel Llorens <[email protected]> Date: Wed May 8 16:06:40 2013 +0200 array-contents returns root for empty arrays with empty root This fixes a compiler issue where (uniform-array->bytevector #2f64()) failed because of the stricter definition of uniform-vector? on this branch. Perhaps it would be better if uniform-array->bytevector didn't require a contiguous argument. * libguile/arrays.c: (scm_array_contents): return the root regardless of the value of SCM_I_ARRAY_DIMS (ra)->inc. * test-suite/tests/arrays.test: check. commit 550b8f12687c7a10933ce34e8cee375f5f99d85c Author: Daniel Llorens <[email protected]> Date: Thu May 2 11:43:31 2013 +0200 Fix compilation bugs with some kinds of typed arrays * module/language/glil/compile-assembly.scm: pass (array-contents x) to uniform-array->bytevector instead of x, when x is a typed array. * test-suite/tests/arrays.test: test an instance of the above that failed in Guile 2.0.9. commit e96d98858039719928539f66691653abc2d1a0b4 Author: Daniel Llorens <[email protected]> Date: Tue Apr 30 16:11:07 2013 +0200 Preallocate index list in scm_array_index_map_x * libguile/array-map.c - (scm_array_index_map_x): preallocate the index list instead of constructing it on each rank-1 iteration. - (ramap, rafe): use SCM_I_ARRAY_V just once. commit dd1045835cbff25e28e60f2f1b9e8c86c95e5939 Author: Daniel Llorens <[email protected]> Date: Mon Apr 29 15:37:52 2013 +0200 Rename scm_t_array_handle.array to .root Globally rename this field (after shared-array-root), since it's not an array. commit ce875c380379d3cdba9f22d5cc63eee9ce6360c5 Author: Daniel Llorens <[email protected]> Date: Mon Apr 29 14:19:52 2013 +0200 Match types used in arrays.c to struct field types * libguile/arrays.c - scm_shared_array_root: check for SCM_I_ARRAYP first. - scm_i_shap2ra: * check valid bounds in the '(lbnd ubnd) case. This makes (make-array 0 '(4 -3)) fail with a 'bad dimension' instead of with a 'wrong index' error. * use ssize_t for lbnd/ubnd/inc, not long. - scm_make_shared_array: use ssize_t for indices, not long. - scm_transpose_array: use size_t for ndim, not ulong. - scm_i_print_array: idem. commit 4ef0509d56b61256782c36baff16e7b2e0d55f50 Author: Daniel Llorens <[email protected]> Date: Fri Apr 26 17:59:45 2013 +0200 Bounds error in vector_handle_ref/set is implementation error * libguile/vectors.c: bounds are already checked unless impl is called directly, so don't check again. * libguile/strings.c, libguile/bitvectors.c: fix comments. commit b67fb02fc8b3595257c6c043aa482e18b00b7796 Author: Daniel Llorens <[email protected]> Date: Fri Apr 26 13:02:38 2013 +0200 Don't use ASET in scm_array_index_map_x * libguile/array-map.c: (scm_array_index_map_x): replace ASET by direct use of handle->impl. commit c3bb48ce5963b6259009ce1345d20f965644ff18 Author: Daniel Llorens <[email protected]> Date: Fri Apr 26 02:05:22 2013 +0200 In scm_ramapc, only check unrolled axes for emptiness * libguile/array-map.c: (scm_ramapc) - Don't check emptiness while preparing ra0, but only after kroll is known, and only before kroll. len = 0 will be caught by the unrolled loop. - Use ra0 axis length in unroll check depth for rest args, not ra1's. - Recover early exit feature when cproc returns 0. commit 79baf1236b5bf43fa5b4d7145d896f1c4f9948f0 Author: Daniel Llorens <[email protected]> Date: Thu Apr 25 18:49:14 2013 +0200 Fix scm_ramapc bugs with 0-inc arrays * libguile/array-map.c: (scm_ramapc): Cannot flag empty on the product inc * dim * dim ... Check every dim. * test-suite/tests/ramap.test: Tests the 0-inc, non empty case for both array-map! and array-copy!. commit d9040b6d1b1b243299210bb0d8d760ee4ca0312c Author: Daniel Llorens <[email protected]> Date: Thu Apr 25 15:18:05 2013 +0200 Fix corner cases of scm_ramapc * libguile/array-map.c - (scm_ramapc): mismatched axes limit unrollk (kroll). Reorganize the function to do all checking as we go. - (scm_ra_matchp): unused; remove. - (find_unrollk): inlined in scm_ramapc; remove. - (klen): inlined in scm_ramapc; remove. - (rafill): n is size_t. - (racp): n is size_t. Use n and not i0end to bound the loop. - (ramap): Use n and not i0end to bound the loop. This is needed for the rank 0 case to work with the new scm_ramapc, as inc may be set to 0 in that case. - (rafe): idem. * test-suite/tests/ramap.test - check that size mismatch prevents unrolling (matching behavior III) with both array-copy! and array-map!. - check that non-contiguous stride in non-ref args prevents unrolling (rank 2, discontinuous) with both array-copy! and array-map!. - check rank 0 cases with array-for-each, array-map!. commit 8676e9f9e115215b4d822afa1dd3b49fdf90816d Author: Daniel Llorens <[email protected]> Date: Wed Apr 24 23:29:48 2013 +0200 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. commit 588d09233d9f4c2a855ccc1e9b72d010a477d86b Author: Daniel Llorens <[email protected]> Date: Wed Apr 24 17:13:56 2013 +0200 Check more cases of array-contents * libguile/arrays.c: (scm_array_contents): fix comment. * test-suite/tests/arrays.test: add cases that depend on correct setting of CONTIGUOUS_FLAG. commit 9cea144904015b1d99bc8daecff5805826ccb1d5 Author: Daniel Llorens <[email protected]> Date: Wed Apr 24 16:34:31 2013 +0200 Check the documented matching behavior of array-map!/copy! * test-suite/tests/arrays.test: move array-copy! tests to ramap.test. * test-suite/tests/ramap.test: check the dissimilar matching behavior of array-copy! and array-map! with arguments of different size. commit 6f356aac9cf179c34a94140a34ac76be46efcbc7 Author: Daniel Llorens <[email protected]> Date: Wed Apr 24 16:00:06 2013 +0200 Simplify ASET in array-map.c * libguile/array-map.c: (ASET): this is only ever used with a true vector type, so remove use of inc/base/lbnd. commit 3470e303c0f758e01513a8ac1f032e45c18cc5b4 Author: Daniel Llorens <[email protected]> Date: Mon Apr 22 09:02:32 2013 +0200 Inline ASET in array-index-map! for rank 1 arguments * libguile/array-map.c: (scm_array_index_map_x): branch to special case on rank 1, instead of !SCM_I_ARRAYP (ra). Inline ASET in this case. commit 4c0e6478fb20ef01f5d6df14d6739c7aefd1e86b Author: Daniel Llorens <[email protected]> Date: Sat Apr 20 01:27:42 2013 +0200 Fix compilation errors when reading arrays at the repl * compile-assembly.scm - vector-fold2: handle rank 1 arrays, since this is called with the result of array-contents which need not be a vector. - dump-constants: fix uses of vector-fold2. Replace vector-length on result of array-contents by array-length. * libguile/arrays.c - scm_array_contents: branch cases not on scm_is_generalized_vector but on SCM_I_ARRAYP. Thus lbnd!=0, which could happen with scm_is_generalized_vector, never appears in the output. * test-suite/tests/arrays.test - tests for array-contents. commit e38404f29c0c405354b8a245120ace70f76f7945 Author: Daniel Llorens <[email protected]> Date: Fri Apr 19 16:44:48 2013 +0200 Factor out make1array() in scm_ramapc() * libguile/array-map.c: (scm_ramapc): factor out vector->array conversion to aux function make1array. commit 3f3d8857cef41363729eebedb77e8fccfb7e5c36 Author: Daniel Llorens <[email protected]> Date: Fri Apr 19 14:53:34 2013 +0200 Raw pointer loop in array-copy! for vector/vector case This special case improves (define a (make-array 1. 1000000 10)) (define b (make-array *unspecified* 1000000 10)) (define c (transpose-array (make-array *unspecified* 10 1000000) 1 0)) ,time (array-copy! a b) ,time (array-copy! a c) from 0.041598s / 0.072561 to 0.012164s / 0.041886s on a i7-3930K. * libguile/array-map.c: (racp): if both src and dst are on vectors, use the element pointers to do the copy. commit 6954c60e986cfc183ae67f29458e7b025752df13 Author: Daniel Llorens <[email protected]> Date: Fri Apr 19 13:43:30 2013 +0200 Have array impl->vref, vset take SCM, not handles * libguile/array-handle.h - scm_i_t_array_ref, scm_i_t_array_set take SCM. - scm_array_handle_ref, scm_array_handle_set: pass h->array. * libguile/array-map.c - AREF, ASET, rafill, racp, ramap, rafe: pass storage vector SCM instead of handle. * libguile/bitvector.c - bitvector_handle_ref, bitvector_handle_set_x: take bitvector arg. * libguile/bytevectors.c - bv_handle_ref, bv_handle_set_x: take bytevector arg. - scm_i_print_bytevectors: don't use array handles. * libguile/deprecated.c - scm_generalized_vector_to_list: pass h.array. * libguile/strings.c - string_handle_ref, string_handle_set: take string arg. * libguile/uniform.c - scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x: pass h.array. * libguile/vectors.c - vector_handle_ref, vector_handle_set: take vector arg. commit be116f5bb55c3a090464826a836e3bd93ab46e02 Author: Daniel Llorens <[email protected]> Date: Fri Apr 19 12:57:13 2013 +0200 Fix array map functions with empty arguments * libguile/array-map.c - scm_ra_matchp: look for empty axes and return new case 5 if so. Use array handles to remove the SCM_I_ARRAYP / not branch. - scm_ramapc: Heed case 5. * test-suite/tests/ramap.test - test empty arguments for array-copy! and array-for-each. Note those that failed in 2.0.9. commit 3fcb64c2f4d6dd4e62678f3bddeba38be8d01c0f Author: Daniel Llorens <[email protected]> Date: Fri Apr 19 10:42:40 2013 +0200 Fix empty array bug in array-index-map! * libguile/array-map.c: (scm_array_index_map_x): bail out if any one of the axes is empty. * test-suite/tests/ramap.test: add tests for empty array-case of array-index-map!. The 'f64 case with not-last emtpy axis is broken in 2.0.9. commit e3161d79e5ddd839103fd8fb973b50b1c87e2cd3 Author: Daniel Llorens <[email protected]> Date: Wed Apr 17 17:29:36 2013 +0200 Avoid using array_handle fields in impl->vref/vset * libguile/bytevectors.c: (bv_handle_set_x, bv_handle_ref): get length and element type fields from the bytevector, not from the handle. * libguile/vectors.c: (vector_handle_set, vector_handle_ref): get length from the vector, not from the handle. commit b00bedff4bc5a5019aa76f215ebbc92a08d2107f Author: Daniel Llorens <[email protected]> Date: Wed Apr 17 15:12:15 2013 +0200 Remove undocumented casting behavior in srfi4 vector_elements * libguile/srfi-4.c: scm_##tag##vector_writable_elements: if the argument's type doesn't match the tag, throw type error. commit 42546f1fc363a4296817237c88dd2e8bde6c2978 Author: Daniel Llorens <[email protected]> Date: Wed Apr 17 14:33:40 2013 +0200 Test that typed-array? returns #f with non-array argument * test-suite/tests/arrays.test: ditto. commit 372fe5b9cdd30c450877c72d464466dde2b9f151 Author: Daniel Llorens <[email protected]> Date: Wed Apr 17 14:01:54 2013 +0200 Avoid array API in make-srfi-4-vector * libguile/bytevector.h: publish SCM_BYTEVECTOR_TYPE_SIZE, bytevector_ref_fns and bytevector_set_fns from libguile/bytevector.c. * libguile/bytevector.c: bv_handle_ref, bv_handle_set: prefer SCM_BYTEVECTOR_TYPE_SIZE to scm_array_handle_uniform_element_size. * libguile/srfi-4.c: scm_make_srfi_4_vector: don't use array handles. commit adbc86a287c40ecd8c59286fd0d208c854720800 Author: Daniel Llorens <[email protected]> Date: Wed Apr 17 10:19:26 2013 +0200 Replace SCM_IMP in array-map.c * libguile/array-map.c - scm_ramapc: check scm_array_contents with scm_is_false. commit b998675146a831abf3df956035272f14c4bdaa4e Author: Daniel Llorens <[email protected]> Date: Tue Apr 16 18:19:57 2013 +0200 Fix comment in scm_array_get_handle libguile/array-handle.c: (scm_array_get_handle): comment applies to either branch. commit dd58f8a1ba73c57c44d6522250078bf6f1d3f918 Author: Daniel Llorens <[email protected]> Date: Mon Apr 15 13:44:10 2013 +0200 Don't bother with array handle in scm_c_array_rank * libguile/generalized-arrays.c: (scm_c_array_rank): compute rank directly from object. commit 0f0c339ebb0c8c3dcb38c82be5f1fd51b853b6b9 Author: Daniel Llorens <[email protected]> Date: Fri Apr 12 17:50:09 2013 +0200 Use underlying vector implementation directly in array handles * libguile/array-handle.c - scm_array_get_handle: if the object is an array, point impl to the underlying vector instead of array impl, then fix the axes. Avoid calling scm_i_array_implementation_for_obj twice. * libguile/arrays.c - array_handle_ref, array_handle_set, array_get_handle: remove. * libguile/bitvectors.c, libguile/bytevectors.c, libguile/strings.c, libguile/vectors.c: fix base = 0 in the array handle. * libguile/vectors.c: (vector_handle_set, vector_handle_ref): do not use h->dims. commit 29e82976c8837071749848dd0382ae6f76a38c66 Author: Daniel Llorens <[email protected]> Date: Fri Apr 12 15:04:52 2013 +0200 Match uniform_vector_elements with vector_elements * 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. commit 29ff0f6dff4b88e29a2c58992266e5aa2dce1904 Author: Daniel Llorens <[email protected]> Date: Thu Apr 11 19:38:19 2013 +0200 Online documentation for vector-ref, vector-set! * libguile/vectors.c: (scm_vector_ref, scm_vector_set!): embed the comments as documentation. commit fbac0d78b303cee9a3b6f3d62059b22b904f37fb Author: Daniel Llorens <[email protected]> Date: Thu Apr 11 19:32:23 2013 +0200 vector-length rejects non vector? arg * libguile/vectors.c - scm_c_vector_length: error if SCM_I_IS_VECTOR (v) fails. - scm_vector_length: Documentation for vector-length. commit 0624168ce903a94b214609f383116f14286da024 Author: Daniel Llorens <[email protected]> Date: Thu Apr 11 18:28:19 2013 +0200 vector-ref, vector-set! reject non vector? args * libguile/vectors.c: (scm_c_vector_ref, scm_c_vector_set_x): throw type error if v is not vector?. commit fb90a1d666c47fc668cf138a167d095378d65a56 Author: Daniel Llorens <[email protected]> Date: Thu Apr 11 18:11:35 2013 +0200 Identify scm_is_vector with scm_is_simple_vector This patch fixes the bug (vector-ref #1@1(1 2 3) 1) => 2. * libguile/vectors.c: (scm_is_vector): just as scm_is_simple_vector. * libguile/filesys.c, libguile/random.c, libguile/stime.c, libguile/trees.c, libguile/validate.h: use scm_is_vector instead of scm_is_simple_vector. * libguile/sort.c - scm_restricted_vector_sort_x: use scm_array_handle_writable_elements instead of scm_vector_writable_elements, to work with non-vector rank-1 array objects. - scm_sort_x: check for scm_is_array instead of scm_is_vector. Rank check is in restricted_vector_sort_x. - scm_sort: ditto. - scm_stable_sort_x: like scm_restricted_vector_sort_x. - scm_stable_sort: like scm_sort. * test-suite/tests/arrays.test: fix header. * test-suite/tests/random.test: new coverage test covering random:normal-vector! * test-suite/Makefile.am: include random.test in make check. commit aed1dc9c15543c4633aa40b209b4a87048791d3b Author: Daniel Llorens <[email protected]> Date: Thu Apr 11 13:10:08 2013 +0200 For uniform vectors SCM_I_ARRAYP can't be true 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. commit 7fc0d90719314ada0c6600ae10e91f192c5faa13 Author: Daniel Llorens <[email protected]> Date: Thu Apr 11 13:03:45 2013 +0200 Fix bad uses of base and lbnd on rank 1 arrays * libguile/array-map.c - rafill, ramap, rafe, racp: object from SCM_I_ARRAY_V always has base 0, lbnd 0 and inc 1; make use of this. * libguile/arrays.c - array_handle_ref, array_handle_set: idem. - array_get_handle: sanity check. * libguile/generalized-vectors.c - scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x: pos should be base when idx is lbnd. Furthermore, pos should be signed and have its overflow checked; do this by handling the job to scm_c_array_ref_1, scm_c_array_set_1_x. * libguile/generalized-vectors.h - fix prototypes. commit 1ec758fcb9434fc73fe508319fe01a7c3cdfa75d Author: Daniel Llorens <[email protected]> Date: Wed Apr 10 15:28:52 2013 +0200 Reorder arrays.test * test-suite/tests/arrays.test: dependence reordering: first sanity, then make-array, then array-equal?, then make-shared-array, shared-array-root, then the rest, many of which use make-shared-array. commit c2f159752c6e175685bca8649508aa5ad018d7da Author: Daniel Llorens <[email protected]> Date: Wed Apr 10 15:11:33 2013 +0200 Don't use scm_is_generalized_vector in transpose-array * libguile/arrays.c (scm_transpose_array) - Use scm_c_array_rank(), which contains an implicit is_array test. - Handle the rank 0 case. * test-suite/tests/arrays.test - Add test for rank 0 case. - Add failure test for non array argument. commit f56c3736278d34b2aa8464dae0a9137803938963 Author: Daniel Llorens <[email protected]> Date: Wed Apr 10 14:53:10 2013 +0200 Tests for transpose-array * test-suite/tests/arrays.test: test transpose-array for ranks 1, 2, 3. commit 078c101966ddab049ed22e13eaf26b34c2ea94c3 Author: Daniel Llorens <[email protected]> Date: Wed Apr 10 13:48:13 2013 +0200 Don't use scm_is_generalized_vector in shared-array-root * libguile/arrays.c: (scm_shared_array_root): replace check for scm_is_generalized_vector. commit 0a46d1ad7ec8e32a69800e973a536fc2f8d93c59 Author: Daniel Llorens <[email protected]> Date: Wed Apr 10 13:45:05 2013 +0200 Tests for shared-array-root * test-suite/tests/arrays.test: check shared-array-root against make-shared-array, array-contents. commit 995e0824a9b878c0309a1906b0c950159f065d5e Author: Daniel Llorens <[email protected]> Date: Wed Apr 10 01:07:02 2013 +0200 Remove unnecessary conditions in array constructors * libguile/arrays.c: (scm_make_type_array, scm_from_contigous_typed_array, scm_from_contigous_array): Remove conditions known to be true. commit 59b9def44515d9111c0d93388a4b68ca5db0bb41 Author: Daniel Llorens <[email protected]> Date: Tue Apr 9 18:27:29 2013 +0200 Remove generalized-vectors.h includes * libguile/srfi-4.c, libguile/uniform.h: ditto. commit 53f7c0ee9b70d373f8f20d7fe400079e3a14b468 Author: Andy Wingo <[email protected]> Date: Thu Feb 6 11:43:39 2014 +0100 Array-map refactors * libguile/array-map.c (scm_ra_matchp): Refactor logic a bit. (array_index_map_array, array_index_map_generic) (scm_array_index_map_x): Internally refactor array-index-map! to use separate implementations for true arrays versus generic arrays. ----------------------------------------------------------------------- hooks/post-receive -- GNU Guile
