[Wisp-cvs] wisp/src/builtin builtin.wisp,1.211,1.212 codegen.wisp,1.67,1.68 lists.wisp,1.105,1.106 o
Status: Alpha
Brought to you by:
digg
Update of /cvsroot/wisp/wisp/src/builtin In directory usw-pr-cvs1:/tmp/cvs-serv5887/src/builtin Modified Files: builtin.wisp codegen.wisp lists.wisp objects.wisp sys.wisp tostring.wisp vectors.wisp Log Message: Made the builtin library avoid |vector-length| in favour of |length|. Index: builtin.wisp =================================================================== RCS file: /cvsroot/wisp/wisp/src/builtin/builtin.wisp,v retrieving revision 1.211 retrieving revision 1.212 diff -u -d -r1.211 -r1.212 --- builtin.wisp 7 Sep 2002 21:55:58 -0000 1.211 +++ builtin.wisp 7 Sep 2002 21:59:26 -0000 1.212 @@ -379,8 +379,8 @@ ((and (string? a) (string? b)) (string=? a b)) ((and (vector? a) (vector? b)) - (and (= (vector-length a) (vector-length b)) - (binary-vector-contents-equal? a b 0 (vector-length a)))) + (and (= (length a) (length b)) + (binary-vector-contents-equal? a b 0 (length a)))) (else (eqv? a b)))) Index: codegen.wisp =================================================================== RCS file: /cvsroot/wisp/wisp/src/builtin/codegen.wisp,v retrieving revision 1.67 retrieving revision 1.68 diff -u -d -r1.67 -r1.68 --- codegen.wisp 7 Sep 2002 21:55:58 -0000 1.67 +++ codegen.wisp 7 Sep 2002 21:59:26 -0000 1.68 @@ -403,7 +403,7 @@ (* . ,(my vars vars (let ((i 0) (v (class->vector class))) - (my vl (vector-length v) + (my vl (length v) (while (< i vl) (my s v[i] (cond Index: lists.wisp =================================================================== RCS file: /cvsroot/wisp/wisp/src/builtin/lists.wisp,v retrieving revision 1.105 retrieving revision 1.106 diff -u -d -r1.105 -r1.106 --- lists.wisp 7 Sep 2002 21:55:58 -0000 1.105 +++ lists.wisp 7 Sep 2002 21:59:27 -0000 1.106 @@ -276,7 +276,7 @@ ; {{{ |vector->list| (define (vector->list vec) - (do ((i (- (vector-length vec) 1) (- i 1)) + (do ((i (- (length vec) 1) (- i 1)) (l '() (cons vec[i] l))) ((< i 0) l))) ; }}} Index: objects.wisp =================================================================== RCS file: /cvsroot/wisp/wisp/src/builtin/objects.wisp,v retrieving revision 1.157 retrieving revision 1.158 diff -u -d -r1.157 -r1.158 --- objects.wisp 7 Sep 2002 21:55:58 -0000 1.157 +++ objects.wisp 7 Sep 2002 21:59:27 -0000 1.158 @@ -22,7 +22,7 @@ superclass) (friend (lookup-slot c s) (type symbol s) - (let (loop (i (vector-length slots))) + (let (loop (i (length slots))) (and (not (zero? i)) (begin (decr! i) @@ -35,7 +35,7 @@ (loop i))))))) (friend (class-slots c) (let ((sl '()) - (i (vector-length slots))) + (i (length slots))) (while (not (zero? i)) (decr! i) (and slots[i] -> s @@ -82,7 +82,7 @@ (local (make-class slots (superclass #f)) (type vector slots) - (my i (vector-length slots) + (my i (length slots) (while (not (zero? i)) (decr! i) (type symbol slots[i]))) @@ -91,7 +91,7 @@ (vector-append (class->vector superclass) slots) (vector-copy slots))) (let ((d (make-dict)) - (i (vector-length slots))) + (i (length slots))) (while (not (zero? i)) (decr! i) (let* ((sl slots[i]) Index: sys.wisp =================================================================== RCS file: /cvsroot/wisp/wisp/src/builtin/sys.wisp,v retrieving revision 1.109 retrieving revision 1.110 diff -u -d -r1.109 -r1.110 --- sys.wisp 7 Sep 2002 21:51:50 -0000 1.109 +++ sys.wisp 7 Sep 2002 21:59:27 -0000 1.110 @@ -71,7 +71,7 @@ s))))))) (local (%wsv->0tv wsv) - (my i (vector-length wsv) + (my i (length wsv) (my ztv (make-vector (+ i 1)) (set! ztv[i] '()) (while (not (zero? i)) Index: tostring.wisp =================================================================== RCS file: /cvsroot/wisp/wisp/src/builtin/tostring.wisp,v retrieving revision 1.76 retrieving revision 1.77 diff -u -d -r1.76 -r1.77 --- tostring.wisp 4 Sep 2002 14:36:26 -0000 1.76 +++ tostring.wisp 7 Sep 2002 21:59:27 -0000 1.77 @@ -47,7 +47,7 @@ (set! (cdr n) (loop (cdr s))) n)) ((vector? s) - (my l (vector-length s) + (my l (length s) (my n (make-vector l) (acons! seen s n) (my i 0 Index: vectors.wisp =================================================================== RCS file: /cvsroot/wisp/wisp/src/builtin/vectors.wisp,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- vectors.wisp 26 Aug 2002 16:13:01 -0000 1.63 +++ vectors.wisp 7 Sep 2002 21:59:27 -0000 1.64 @@ -21,7 +21,7 @@ (list->vector data)) (define (vector-copy v) - (let* ((amount (vector-length v)) + (let* ((amount (length v)) (new-vector (make-vector amount))) (vector-move! new-vector 0 v 0 amount) new-vector)) @@ -34,13 +34,13 @@ (my total-length 0 (for-each (lambda (x) - (incr! total-length (vector-length x))) vectors) + (incr! total-length (length x))) vectors) (let ((result (make-vector total-length)) (p 0)) (for-each - (lambda (s) - (let ((l (vector-length s))) - (vector-move! result p s 0 l) + (lambda (v) + (my l (length v) + (vector-move! result p v 0 l) (incr! p l))) vectors) result))) |