@@ -51,7 +51,7 @@ OTHER DEALINGS IN THE SOFTWARE.
5151
5252(cond-expand
5353 (gambit-c
54-
54+
5555 (define (vector-copy! dst-vect dst-start src-vect src-start src-end )
5656 (subvector-move! src-vect src-start src-end dst-vect dst-start))
5757
@@ -213,7 +213,7 @@ OTHER DEALINGS IN THE SOFTWARE.
213213
214214(define (%%finish-interval lower-bounds upper-bounds)
215215 (make-%%interval (vector-length upper-bounds)
216- #f
216+ #f
217217 (vector-copy lower-bounds)
218218 (vector-copy upper-bounds)))
219219
@@ -1860,7 +1860,7 @@ OTHER DEALINGS IN THE SOFTWARE.
18601860; ;; We consolidate all moving of array elements to the following procedure.
18611861
18621862(define (%%move-array-elements destination source caller)
1863-
1863+
18641864 ; ; Here's the logic:
18651865 ; ; We require the source and destination to have the same number of elements.
18661866 ; ; If destination is a specialized array
@@ -1900,12 +1900,12 @@ OTHER DEALINGS IN THE SOFTWARE.
19001900
19011901 ; ; We check that the elements we move to the destination are OK for the
19021902 ; ; destination because if we don't catch errors here they can be very tricky to find.
1903-
1903+
19041904 (if (not (= (%%interval-volume (%%array-domain source))
19051905 (%%interval-volume (%%array-domain destination))))
19061906 (error (string-append caller " Arrays must have the same volume: " )
19071907 destination source))
1908-
1908+
19091909 (if (specialized-array? destination)
19101910 (if (%%array-elements-in-order? destination)
19111911 ; ; Now we do not assume that the domains are the same
@@ -2069,7 +2069,7 @@ OTHER DEALINGS IN THE SOFTWARE.
20692069 " Not all elements of the source can be stored in destination: " )
20702070 destination source i j k l item))))))
20712071 (else
2072- (let ((index 0 ))
2072+ (let ((index initial-offset ))
20732073 (lambda multi-index
20742074 (let ((item (apply getter multi-index)))
20752075 (if (checker item)
@@ -2664,7 +2664,7 @@ OTHER DEALINGS IN THE SOFTWARE.
26642664(define-macro (setup-permuted-getters-and-setters)
26652665
26662666 (include " modules/generalized-arrays/generalized-arrays-include.scm" )
2667-
2667+
26682668 (define (list-remove l i )
26692669 ; ; new list that removes (list-ref l i) from l
26702670 (if (zero? i)
@@ -2740,11 +2740,11 @@ OTHER DEALINGS IN THE SOFTWARE.
27402740 (%%array-permute array permutation))))
27412741
27422742(define (%%rotation->permutation k size)
2743-
2743+
27442744 ; ; Generates a permutation that rotates
27452745 ; ; 0 1 ... size-1
27462746 ; ; left by k units.
2747-
2747+
27482748 (let ((result (make-vector size)))
27492749 (let left-loop ((i 0 )
27502750 (j k))
@@ -2783,7 +2783,7 @@ OTHER DEALINGS IN THE SOFTWARE.
27832783(define-macro (setup-reversed-getters-and-setters)
27842784
27852785 (include " modules/generalized-arrays/generalized-arrays-include.scm" )
2786-
2786+
27872787 (define (make-symbol . args )
27882788 (string->symbol
27892789 (apply string-append
@@ -2900,7 +2900,7 @@ OTHER DEALINGS IN THE SOFTWARE.
29002900(define-macro (macro-generate-sample)
29012901
29022902 (include " modules/generalized-arrays/generalized-arrays-include.scm" )
2903-
2903+
29042904 (define (make-symbol . args )
29052905 (string->symbol
29062906 (apply string-append
@@ -3741,7 +3741,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37413741
37423742 ; ; Decides whether to include v(k) in the result vector
37433743 ; ; by testing p(k), not p(v(k)).
3744-
3744+
37453745 (let ((n (vector-length v)))
37463746 (define (helper k i )
37473747 (cond ((fx= k n)
@@ -3753,7 +3753,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37533753 (else
37543754 (helper (fx+ k 1 ) i))))
37553755 (helper 0 0 )))
3756-
3756+
37573757 (cond ((not (specialized-array? array))
37583758 (error " specialized-array-reshape: The first argument is not a specialized array: " array new-domain))
37593759 ((not (interval? new-domain))
0 commit comments