~ chicken-core (chicken-5) a1a0ab93968ac26fb112c864398de73c2264b494
commit a1a0ab93968ac26fb112c864398de73c2264b494 Author: Peter Bex <peter@more-magic.net> AuthorDate: Wed Nov 18 19:28:21 2015 +0100 Commit: Evan Hanson <evhan@foldling.org> CommitDate: Sun Dec 20 18:12:07 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 27c3d285..9be436a4 100644 --- a/library.scm +++ b/library.scm @@ -3042,7 +3042,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