~ chicken-core (chicken-5) 6b33edffd9ecac963466afda388a7c49ffba0108
commit 6b33edffd9ecac963466afda388a7c49ffba0108 Author: Peter Bex <peter@more-magic.net> AuthorDate: Wed Nov 18 19:14:16 2015 +0100 Commit: Evan Hanson <evhan@foldling.org> CommitDate: Sun Dec 20 17:38:51 2015 +1300 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. Signed-off-by: Evan Hanson <evhan@foldling.org> diff --git a/library.scm b/library.scm index 1502b6c3..4ef566c0 100644 --- a/library.scm +++ b/library.scm @@ -2278,7 +2278,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)Trap