From 23cec3b69e7b75ea1103779db1e0c5556968ec54 Mon Sep 17 00:00:00 2001 From: gerd <gerd> Date: Sun, 20 Jul 2003 11:11:46 +0000 Subject: [PATCH] (compile nil '(lambda (s) (declare (optimize (space 0) (speed 3))) (the integer (read-byte s)))) results in ; Warning: This is not a (VALUES INTEGER &REST T): ; NIL From Alexey Dejneka on cmucl-imp. * src/code/sysmacs.lisp (stream-dispatch): Use etypecase. --- code/sysmacs.lisp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/code/sysmacs.lisp b/code/sysmacs.lisp index cc5155f0a..75fcb21ff 100644 --- a/code/sysmacs.lisp +++ b/code/sysmacs.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/sysmacs.lisp,v 1.26 2003/06/06 16:23:45 toy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/sysmacs.lisp,v 1.27 2003/07/20 11:11:46 gerd Exp $") ;;; ;;; ********************************************************************** ;;; @@ -115,11 +115,13 @@ ;;; Execute the appropriate code for each stream subtype (defmacro stream-dispatch (stream simple lisp &optional (gray nil gray-p)) `(locally (declare (type stream ,stream)) - (cond - ((lisp-stream-p ,stream) ,lisp) - ((typep ,stream 'stream:simple-stream) ,simple) - ((typep ,stream 'ext:fundamental-stream) - ,(if gray-p gray `(no-gray-streams ,stream)))))) + (etypecase ,stream + (lisp-stream + ,lisp) + (stream:simple-stream + ,simple) + (ext:fundamental-stream + ,(if gray-p gray `(no-gray-streams ,stream)))))) ;;;; These are hacks to make the reader win. -- GitLab