From 1a048682320b8a9e5a964f79cd0d670cb9ba3e94 Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Wed, 18 Nov 2015 19:28:21 +0100 Subject: [PATCH 2/3] Avoid CPS call in read-char to read-char/port. This should improve performance somewhat for those cases where the procedure is called indirectly, or with zero arguments. This fixes the remaining part of #1219. --- library.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library.scm b/library.scm index bb49d8b..8c7cec5 100644 --- a/library.scm +++ b/library.scm @@ -3061,7 +3061,8 @@ EOF ((##sys#slot (##sys#slot port 2) 6) port) ) ; char-ready? (define (read-char #!optional (port ##sys#standard-input)) - (##sys#read-char/port port) ) + (##sys#check-input-port port #t 'read-char) + (##sys#read-char-0 port) ) (define (##sys#read-char-0 p) (let ([c (if (##sys#slot p 6) -- 2.1.4