guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, ra0, updated. v2.1.0-680-g0c3cb9e


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, ra0, updated. v2.1.0-680-g0c3cb9e
Date: Thu, 06 Feb 2014 20:05:26 +0000

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=0c3cb9e94d02861a95ca4db8f0295e9b6f45d376

The branch, ra0 has been updated
  discards  4303fe9b6ef3bbd5e20b33a4167ff96ac70bc53e (commit)
  discards  df93c084c4e208aeaf6933b718d0a15263f1b8ff (commit)
  discards  550b8f12687c7a10933ce34e8cee375f5f99d85c (commit)
  discards  e96d98858039719928539f66691653abc2d1a0b4 (commit)
  discards  dd1045835cbff25e28e60f2f1b9e8c86c95e5939 (commit)
  discards  ce875c380379d3cdba9f22d5cc63eee9ce6360c5 (commit)
  discards  4ef0509d56b61256782c36baff16e7b2e0d55f50 (commit)
  discards  b67fb02fc8b3595257c6c043aa482e18b00b7796 (commit)
  discards  c3bb48ce5963b6259009ce1345d20f965644ff18 (commit)
  discards  79baf1236b5bf43fa5b4d7145d896f1c4f9948f0 (commit)
  discards  d9040b6d1b1b243299210bb0d8d760ee4ca0312c (commit)
  discards  8676e9f9e115215b4d822afa1dd3b49fdf90816d (commit)
  discards  588d09233d9f4c2a855ccc1e9b72d010a477d86b (commit)
  discards  9cea144904015b1d99bc8daecff5805826ccb1d5 (commit)
  discards  6f356aac9cf179c34a94140a34ac76be46efcbc7 (commit)
  discards  3470e303c0f758e01513a8ac1f032e45c18cc5b4 (commit)
  discards  4c0e6478fb20ef01f5d6df14d6739c7aefd1e86b (commit)
  discards  e38404f29c0c405354b8a245120ace70f76f7945 (commit)
  discards  3f3d8857cef41363729eebedb77e8fccfb7e5c36 (commit)
  discards  6954c60e986cfc183ae67f29458e7b025752df13 (commit)
  discards  be116f5bb55c3a090464826a836e3bd93ab46e02 (commit)
  discards  3fcb64c2f4d6dd4e62678f3bddeba38be8d01c0f (commit)
  discards  e3161d79e5ddd839103fd8fb973b50b1c87e2cd3 (commit)
  discards  b00bedff4bc5a5019aa76f215ebbc92a08d2107f (commit)
  discards  42546f1fc363a4296817237c88dd2e8bde6c2978 (commit)
  discards  372fe5b9cdd30c450877c72d464466dde2b9f151 (commit)
  discards  adbc86a287c40ecd8c59286fd0d208c854720800 (commit)
  discards  b998675146a831abf3df956035272f14c4bdaa4e (commit)
  discards  dd58f8a1ba73c57c44d6522250078bf6f1d3f918 (commit)
  discards  0f0c339ebb0c8c3dcb38c82be5f1fd51b853b6b9 (commit)
  discards  29e82976c8837071749848dd0382ae6f76a38c66 (commit)
  discards  29ff0f6dff4b88e29a2c58992266e5aa2dce1904 (commit)
  discards  fbac0d78b303cee9a3b6f3d62059b22b904f37fb (commit)
  discards  0624168ce903a94b214609f383116f14286da024 (commit)
  discards  fb90a1d666c47fc668cf138a167d095378d65a56 (commit)
  discards  aed1dc9c15543c4633aa40b209b4a87048791d3b (commit)
  discards  7fc0d90719314ada0c6600ae10e91f192c5faa13 (commit)
  discards  1ec758fcb9434fc73fe508319fe01a7c3cdfa75d (commit)
  discards  c2f159752c6e175685bca8649508aa5ad018d7da (commit)
  discards  f56c3736278d34b2aa8464dae0a9137803938963 (commit)
  discards  078c101966ddab049ed22e13eaf26b34c2ea94c3 (commit)
  discards  0a46d1ad7ec8e32a69800e973a536fc2f8d93c59 (commit)
  discards  995e0824a9b878c0309a1906b0c950159f065d5e (commit)
  discards  59b9def44515d9111c0d93388a4b68ca5db0bb41 (commit)
  discards  53f7c0ee9b70d373f8f20d7fe400079e3a14b468 (commit)
       via  0c3cb9e94d02861a95ca4db8f0295e9b6f45d376 (commit)
       via  686f1ec72fa62be41918b72be6a76d4128dfd91b (commit)
       via  e778f41f097e8aaebba1d8f26fce4d090895235c (commit)
       via  1cbfbe13d23d4cd0cc7916e811e9166bf86cfc87 (commit)
       via  a06c11d38d6416f4eb59c31f140e6a5e5967fd26 (commit)
       via  0f1ab2fe89292404d93df5c35b2c50073ab3b399 (commit)
       via  3cd3c2ae024124648b0538e116342233974ce94a (commit)
       via  4e633606fbae83cef965e4355fb53ebd868b9417 (commit)
       via  9f3800ade82f982305745e7e0ffbd5815b344546 (commit)
       via  95f487f6f11e43bfaeea9574f17107502b3f232a (commit)
       via  b0043ccd7b7a9c98015f8f34981eaee99fa174ff (commit)
       via  90facda995075b8c7725c04fe105da312a6016aa (commit)
       via  0f2cd9e61b65d2c12527692a9e1d9a93a22b8053 (commit)
       via  10d6c23e0f0324011329afb0966c517872c3ba77 (commit)
       via  a8c62675900281f1118d97eca6a093e79714f029 (commit)
       via  826504e9e82e57f9e2b646ed9694e5f3f9aecc3c (commit)
       via  127503d83c294066afbb62f5a715f7da15880b12 (commit)
       via  b184185e665e42832dcfbbb0b9bccc12e355543c (commit)
       via  c3efc8a693a5d38cdb6929efcd61837f6221448b (commit)
       via  e24e5704feafd2a4d257f36316cf77043087a6e0 (commit)
       via  b5d4a51514b4bde7ca6103419103b041f1c41133 (commit)
       via  250cb851b3f4d2857b8abb5794fa2088b6f90bee (commit)
       via  bcf809937e8a16f95d855f11fe4ed95b7743ee2d (commit)
       via  e744925bc5dab7aec3fa33a08d536255d4c1ecf3 (commit)
       via  3fc979d9353a50d8ac05886740693d1a7ba7f47c (commit)
       via  1317a4fdfcd354503b04ab5513cfb918e5e52a7d (commit)
       via  4e88252b9d8a8580080fc4a06a414373e079de43 (commit)
       via  681687315024db54021e195e4031624ccf80c08e (commit)
       via  2c7a9f98afedfa0a7ca574ad3ee44d1a6354299e (commit)
       via  f566fa19bee66fd5ea347ccec5fa6a9e5476564a (commit)
       via  d8c7b3e25e2313919e548a480dfdbd47f30d145c (commit)
       via  3b5ab67a6f1c10b89a12b7425db148d9ad854a97 (commit)
       via  7872960b449c525ba186e829097e14b68056cc95 (commit)
       via  de4475c19a3fabb1d66fc4195726fe2aa4aa6364 (commit)
       via  83e95d4e012823736673eb0d91818d6c2c078350 (commit)
       via  949bb639e3db26f043237bb334e27144c3ac28b8 (commit)
       via  fcba540d36c7418f80837fe323a2b2791d5f9840 (commit)
       via  c8d4d493099a93c7227a00fd3d5b3f3d4bdce9c9 (commit)
       via  a83035a868edc2dc293dcca4b02eaefe6d9b49b5 (commit)
       via  f49ed33caf2434cd1f40180780c04c1501778a08 (commit)
       via  9771725727e8a2fc03266a73ac3f784d3790aa49 (commit)
       via  c8f02bc1ea404d7692553fcc32165381dd43a2e1 (commit)
       via  0a2f1ab2745913a9d89e3ad19be1ea61d7fa95cf (commit)
       via  55a000111dab1651f7431c95be2147f5dd80cee5 (commit)
       via  f0521cdabcad69db03edb0db8772572bf539170b (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (4303fe9b6ef3bbd5e20b33a4167ff96ac70bc53e)
            \
             N -- N -- N (0c3cb9e94d02861a95ca4db8f0295e9b6f45d376)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0c3cb9e94d02861a95ca4db8f0295e9b6f45d376
Author: Daniel Llorens <address@hidden>
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 686f1ec72fa62be41918b72be6a76d4128dfd91b
Author: Daniel Llorens <address@hidden>
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 e778f41f097e8aaebba1d8f26fce4d090895235c
Author: Daniel Llorens <address@hidden>
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 1cbfbe13d23d4cd0cc7916e811e9166bf86cfc87
Author: Daniel Llorens <address@hidden>
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 a06c11d38d6416f4eb59c31f140e6a5e5967fd26
Author: Daniel Llorens <address@hidden>
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 0f1ab2fe89292404d93df5c35b2c50073ab3b399
Author: Daniel Llorens <address@hidden>
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 3cd3c2ae024124648b0538e116342233974ce94a
Author: Daniel Llorens <address@hidden>
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 4e633606fbae83cef965e4355fb53ebd868b9417
Author: Daniel Llorens <address@hidden>
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 9f3800ade82f982305745e7e0ffbd5815b344546
Author: Daniel Llorens <address@hidden>
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 95f487f6f11e43bfaeea9574f17107502b3f232a
Author: Daniel Llorens <address@hidden>
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 b0043ccd7b7a9c98015f8f34981eaee99fa174ff
Author: Daniel Llorens <address@hidden>
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 90facda995075b8c7725c04fe105da312a6016aa
Author: Daniel Llorens <address@hidden>
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 0f2cd9e61b65d2c12527692a9e1d9a93a22b8053
Author: Daniel Llorens <address@hidden>
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 10d6c23e0f0324011329afb0966c517872c3ba77
Author: Daniel Llorens <address@hidden>
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 a8c62675900281f1118d97eca6a093e79714f029
Author: Daniel Llorens <address@hidden>
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 826504e9e82e57f9e2b646ed9694e5f3f9aecc3c
Author: Daniel Llorens <address@hidden>
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 127503d83c294066afbb62f5a715f7da15880b12
Author: Daniel Llorens <address@hidden>
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 b184185e665e42832dcfbbb0b9bccc12e355543c
Author: Daniel Llorens <address@hidden>
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 c3efc8a693a5d38cdb6929efcd61837f6221448b
Author: Daniel Llorens <address@hidden>
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 e24e5704feafd2a4d257f36316cf77043087a6e0
Author: Daniel Llorens <address@hidden>
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 b5d4a51514b4bde7ca6103419103b041f1c41133
Author: Daniel Llorens <address@hidden>
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 250cb851b3f4d2857b8abb5794fa2088b6f90bee
Author: Daniel Llorens <address@hidden>
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 bcf809937e8a16f95d855f11fe4ed95b7743ee2d
Author: Daniel Llorens <address@hidden>
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 e744925bc5dab7aec3fa33a08d536255d4c1ecf3
Author: Daniel Llorens <address@hidden>
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 3fc979d9353a50d8ac05886740693d1a7ba7f47c
Author: Daniel Llorens <address@hidden>
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 1317a4fdfcd354503b04ab5513cfb918e5e52a7d
Author: Daniel Llorens <address@hidden>
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 4e88252b9d8a8580080fc4a06a414373e079de43
Author: Daniel Llorens <address@hidden>
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 681687315024db54021e195e4031624ccf80c08e
Author: Daniel Llorens <address@hidden>
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 2c7a9f98afedfa0a7ca574ad3ee44d1a6354299e
Author: Daniel Llorens <address@hidden>
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 f566fa19bee66fd5ea347ccec5fa6a9e5476564a
Author: Daniel Llorens <address@hidden>
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 d8c7b3e25e2313919e548a480dfdbd47f30d145c
Author: Daniel Llorens <address@hidden>
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 3b5ab67a6f1c10b89a12b7425db148d9ad854a97
Author: Daniel Llorens <address@hidden>
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 7872960b449c525ba186e829097e14b68056cc95
Author: Daniel Llorens <address@hidden>
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 de4475c19a3fabb1d66fc4195726fe2aa4aa6364
Author: Daniel Llorens <address@hidden>
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 83e95d4e012823736673eb0d91818d6c2c078350
Author: Daniel Llorens <address@hidden>
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 address@hidden(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 949bb639e3db26f043237bb334e27144c3ac28b8
Author: Daniel Llorens <address@hidden>
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 fcba540d36c7418f80837fe323a2b2791d5f9840
Author: Daniel Llorens <address@hidden>
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 c8d4d493099a93c7227a00fd3d5b3f3d4bdce9c9
Author: Daniel Llorens <address@hidden>
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 a83035a868edc2dc293dcca4b02eaefe6d9b49b5
Author: Daniel Llorens <address@hidden>
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 f49ed33caf2434cd1f40180780c04c1501778a08
Author: Daniel Llorens <address@hidden>
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 9771725727e8a2fc03266a73ac3f784d3790aa49
Author: Daniel Llorens <address@hidden>
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 c8f02bc1ea404d7692553fcc32165381dd43a2e1
Author: Daniel Llorens <address@hidden>
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 0a2f1ab2745913a9d89e3ad19be1ea61d7fa95cf
Author: Daniel Llorens <address@hidden>
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 55a000111dab1651f7431c95be2147f5dd80cee5
Author: Daniel Llorens <address@hidden>
Date:   Tue Apr 9 18:27:29 2013 +0200

    Remove generalized-vectors.h includes
    
    * libguile/srfi-4.c, libguile/uniform.h: ditto.

commit f0521cdabcad69db03edb0db8772572bf539170b
Author: Andy Wingo <address@hidden>
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_1, array_index_map_n)
      (scm_array_index_map_x): Internally refactor array-index-map! to use
      separate implementations for rank 1 versus rank >1 arrays.

-----------------------------------------------------------------------

Summary of changes:
 libguile/array-map.c |   50 +++++++++++++++++++++++++++-----------------------
 1 files changed, 27 insertions(+), 23 deletions(-)

diff --git a/libguile/array-map.c b/libguile/array-map.c
index 6279333..48ed149 100644
--- a/libguile/array-map.c
+++ b/libguile/array-map.c
@@ -686,6 +686,21 @@ SCM_DEFINE (scm_array_for_each, "array-for-each", 2, 0, 1,
 #undef FUNC_NAME
 
 static void
+array_index_map_1 (SCM ra, SCM proc)
+{
+  scm_t_array_handle h;
+  ssize_t i, inc;
+  size_t p;
+  scm_array_get_handle (ra, &h);
+  inc = h.dims[0].inc;
+  for (i = h.dims[0].lbnd, p = h.base; i <= h.dims[0].ubnd; ++i, p += inc)
+    h.impl->vset (h.root, p, scm_call_1 (proc, scm_from_ssize_t (i)));
+  scm_array_handle_release (&h);
+}
+
+/* Here we assume that the array is a scm_tc7_array, as that is the only
+   kind of array in Guile that supports rank > 1.  */
+static void
 array_index_map_n (SCM ra, SCM proc)
 {
   scm_t_array_handle h;
@@ -696,12 +711,6 @@ array_index_map_n (SCM ra, SCM proc)
   SCM args = SCM_EOL;
   SCM *p = &args;
 
-  if (kmax < 0)
-    {
-      scm_array_set_x (ra, scm_call_0 (proc), SCM_EOL);
-      return;
-    }
-
   vi = scm_gc_malloc_pointerless (sizeof(ssize_t) * (kmax + 1), vi_gc_hint);
   si = scm_gc_malloc_pointerless (sizeof(SCM *) * (kmax + 1), vi_gc_hint);
 
@@ -746,19 +755,6 @@ array_index_map_n (SCM ra, SCM proc)
   scm_array_handle_release (&h);
 }
 
-static void
-array_index_map_1 (SCM ra, SCM proc)
-{
-  scm_t_array_handle h;
-  ssize_t i, inc;
-  size_t p;
-  scm_array_get_handle (ra, &h);
-  inc = h.dims[0].inc;
-  for (i = h.dims[0].lbnd, p = h.base; i <= h.dims[0].ubnd; ++i, p += inc)
-    h.impl->vset (h.root, p, scm_call_1 (proc, scm_from_ssize_t (i)));
-  scm_array_handle_release (&h);
-}
-
 SCM_DEFINE (scm_array_index_map_x, "array-index-map!", 2, 0, 0,
            (SCM ra, SCM proc),
            "Apply @var{proc} to the indices of each element of @var{ra} in\n"
@@ -782,10 +778,18 @@ SCM_DEFINE (scm_array_index_map_x, "array-index-map!", 2, 
0, 0,
 {
   SCM_VALIDATE_PROC (2, proc);
 
-  if (scm_c_array_rank (ra) == 1)
-    array_index_map_1 (ra, proc);
-  else
-    array_index_map_n (ra, proc);
+  switch (scm_c_array_rank (ra))
+    {
+    case 0:
+      scm_array_set_x (ra, scm_call_0 (proc), SCM_EOL);
+      break;
+    case 1:
+      array_index_map_1 (ra, proc);
+      break;
+    default:
+      array_index_map_n (ra, proc);
+      break;
+    }
 
   return SCM_UNSPECIFIED;
 }


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]