[Wisp-cvs] wisp/src boot.wisp,1.256,1.257
Status: Alpha
Brought to you by:
digg
From: <di...@us...> - 2002-09-07 22:00:50
|
Update of /cvsroot/wisp/wisp/src In directory usw-pr-cvs1:/tmp/cvs-serv6464/src Modified Files: boot.wisp Log Message: Made boot.wisp avoid |string-length| and |vector-length| in favour of |length|. Index: boot.wisp =================================================================== RCS file: /cvsroot/wisp/wisp/src/boot.wisp,v retrieving revision 1.256 retrieving revision 1.257 diff -u -d -r1.256 -r1.257 --- boot.wisp 31 Aug 2002 14:28:26 -0000 1.256 +++ boot.wisp 7 Sep 2002 22:00:48 -0000 1.257 @@ -262,8 +262,8 @@ (my arrow-re (regex-parse "->") (define (wordify symbol) (set! symbol (symbol->string symbol)) - (my l (string-length symbol) - (if (and (> (string-length symbol) 1) + (my l (length symbol) + (if (and (> (length symbol) 1) (char=? symbol[0] #\* symbol[-1])) (begin (set! symbol[0] #\X) @@ -360,13 +360,13 @@ (my i 0 (print csf "\n/* The classes */\n") (my *class-vec* (collector->vector *class-vec*) - (while (< i (vector-length *class-vec*)) + (while (< i (length *class-vec*)) (my (() () sc slots initial) *class-vec*[i] (print csf "void*BCL$[i]\[]__attribute__((aligned(16)))=CLS($,(if (or (eq? sc #\F) (eq? sc #\Q)) #\F (pointer sc)),($(length slots),$,(string-join (map pointer slots) #\,)),$,(pointer initial));\n")) (incr! i))))) (my *cvec* (collector->vector *cvec*) - (my l (vector-length *cvec*) + (my l (length *cvec*) (phase "writing EVM bodies" (my i 0 (print csf "\n// The EVM bodies.\n") @@ -379,7 +379,7 @@ (print csf "void*Y$[i]\[]={$,[body]};\n")))) (my output "$[i]" (print output) - (print (make-string (string-length output) #\backspace))) + (print (make-string (length output) #\backspace))) (incr! i)))) (phase "writing grand array" (my i 0 @@ -390,7 +390,7 @@ (case (car block) ((STRING) (my s (second block) - (print csf "S($(string-length s),\"$,(string->c s)\")"))) + (print csf "S($(length s),\"$,(string->c s)\")"))) ((PROCEDURE) (print csf "P($[i])")) ((VECTOR) @@ -404,7 +404,7 @@ (phase "writing cons array" (my *cons-vec* (collector->vector *cons-vec*) (let ((i 0) - (l (vector-length *cons-vec*))) + (l (length *cons-vec*))) (print csf "\nstruct cons conses [] = {\n") (while (< i l) (my block *cons-vec*[i] |