Reduce (<= a b ...) to (and (<= a b) ...) in genio column tracking.
authorTaylor R Campbell <campbell@mumble.net>
Thu, 10 Dec 2009 23:29:17 +0000 (18:29 -0500)
committerTaylor R Campbell <campbell@mumble.net>
Thu, 10 Dec 2009 23:29:17 +0000 (18:29 -0500)
Neither SF nor LIAR currently performs that reduction, so every
character written to a generic I/O port was causing a rest list to be
consed up and control to go through a generic microcode primitive
trampoline to do the reduction at run-time.

Also use FIX:<= rather than <=, since the numbers in question are all
fixnums.

src/runtime/genio.scm

index 7d8e3e2ebfde00570f8c2e3e29c42d5d3564570d..a9dda40851be995cfa4ce556964debf485e031c1 100644 (file)
@@ -1031,7 +1031,8 @@ USA.
                    ob
                    (cond ((char=? char #\tab)
                           (fix:+ column (fix:- 8 (fix:remainder column 8))))
-                         ((<= #x20 (char->integer char) #x7E)
+                         ((and (fix:<= #x20 (char->integer char))
+                               (fix:<= (char->integer char) #x7E))
                           (fix:+ column 1))
                          (else #f))))))
         #t)))