Such code will compile without complaint and work correctly either
on SBCL or on a completely compliant Common Lisp system.
-4:
- It should cause a note, not a WARNING, when the system ignores
- an FTYPE proclamation for a slot accessor.
-
-5:
- Error reporting on various stream-requiring operations is not
- very good when the stream argument has the wrong type, because
- the operation tries to fall through to Gray stream code, and then
- dies because it's undefined. E.g.
- (PRINT-UNREADABLE-OBJECT (*STANDARD-OUTPUT* 1)) ..)
- gives the error message
- error in SB-KERNEL::UNDEFINED-SYMBOL-ERROR-HANDLER:
- The function SB-IMPL::STREAM-WRITE-STRING is undefined.
- It would be more useful and correct to signal a TYPE-ERROR:
- not a STREAM: 1
- (It wouldn't be terribly difficult to write stubs for all the
- Gray stream functions that the old CMU CL code expects, with
- each stub just raising the appropriate TYPE-ERROR.)
-
6:
bogus warnings about undefined functions for magic functions like
SB!C::%%DEFUN and SB!C::%DEFCONSTANT when cross-compiling files
- like src/code/float.lisp
+ like src/code/float.lisp. Fixing this will probably require
+ straightening out enough bootstrap consistency issues that
+ the cross-compiler can run with *TYPE-SYSTEM-INITIALIZED*.
+ Instead, the cross-compiler runs in a slightly flaky state
+ which is sane enough to compile SBCL itself, but which is
+ also unstable in several ways, including its inability
+ to really grok function declarations.
7:
The "byte compiling top-level form:" output ought to be condensed.
(CONCATENATE 'BAR #(1 2) '(3)) => #(1 2 3)
+67:
+ As reported by Winton Davies on a CMU CL mailing list 2000-01-10,
+ and reported for SBCL by Martin Atzmueller 2000-10-20: (TRACE GETHASH)
+ crashes SBCL. In general tracing anything which is used in the
+ implementation of TRACE is likely to have the same problem.
+
KNOWN BUGS RELATED TO THE IR1 INTERPRETER
(Note: At some point, the pure interpreter (actually a semi-pure
* gave up on fixing bug 3 (forbidden-by-ANSI warning for type mismatch
in structure slot initforms) for now, wrote workaround instead:-|
* fixed bug 4 (no WARNING for DECLAIM FTYPE of slot accessor function)
+* fixed bug 5: added stubs for various Gray stream functions called
+ in the not-a-CL:STREAM case, so that even when Gray streams aren't
+ installed, at least appropriate type errors are generated
* removed bug 21 from BUGS, since Martin Atzmueller points out that
it doesn't seem to affect SBCL after all
#s(sb-cold:package-data
:name "SB!IMPL"
:doc "private: a grab bag of implementation details"
- :use ("CL" "SB!EXT" "SB!INT" "SB!SYS" "SB!DEBUG" "SB!KERNEL" "SB!BIGNUM"))
+ :use ("CL" "SB!EXT" "SB!INT" "SB!SYS" "SB!DEBUG" "SB!KERNEL" "SB!BIGNUM"
+ "SB!GRAY"))
;; FIXME: It seems to me that this could go away, with its contents moved
;; into SB!KERNEL, like the implementation of the rest of the class system.
:name "SB!EXT"
:doc "public: miscellaneous supported extensions to the ANSI Lisp spec"
;; FIXME: Why don't we just USE-PACKAGE %KERNEL here instead of importing?
- :use ("CL" "SB!ALIEN" "SB!C-CALL" "SB!INT" "SB!SYS")
+ :use ("CL" "SB!ALIEN" "SB!C-CALL" "SB!INT" "SB!SYS" "SB!GRAY")
;; FIXME: If we advertise these as extensions, they should be in the
;; SB!EXT package (and perhaps re-exported from the %KERNEL
;; package) rather than in some other package and reexported from
"private: miscellaneous unsupported extensions to the ANSI spec. Most of
the stuff in here originated in CMU CL's EXTENSIONS package and is
retained, possibly temporariliy, because it might be used internally."
- :use ("CL" "SB!ALIEN" "SB!C-CALL" "SB!SYS")
+ :use ("CL" "SB!ALIEN" "SB!C-CALL" "SB!SYS" "SB!GRAY")
;; FIXME: RATIOP should probably not go through this package but be
;; called directly from SB!KERNEL, unless it's implemented as
;; TYPEP X 'RATIO in which case it doesn't need to be in SB!KERNEL.
integration' (said CMU CL architecture.tex) and that probably was and
is a good idea, but see SB-SYS for blurring of boundaries."
:use ("CL" "SB!ALIEN" "SB!ALIEN-INTERNALS" "SB!BIGNUM"
- "SB!EXT" "SB!INT" "SB!SYS")
+ "SB!EXT" "SB!INT" "SB!SYS" "SB!GRAY")
:import-from (("SB!C-CALL" "VOID"))
:reexport ("DEF!STRUCT" "DEF!MACRO" "VOID")
:export ("%ACOS" "%ACOSH" "%ARRAY-AVAILABLE-ELEMENTS"
"VARIABLE-GLOBALLY-SPECIAL-P"
"*VARIABLE-DECLARATIONS*" "VARIABLE-DECLARATION"
- ;; These were expored from the original PCL version of this
+ ;; These were exported from the original PCL version of this
;; package, but aren't used in SBCL.
;;"NESTED-WALK-FORM" "MACROEXPAND-ALL"
)))
;;; This prints a representation of the return values delivered.
;;; First, this checks to see that cookie is at the top of
-;;; *traced-entries*; if it is not, then we need to adjust this list
+;;; *TRACED-ENTRIES*; if it is not, then we need to adjust this list
;;; to determine the correct indentation for output. We then check to
;;; see whether the function is still traced and that the condition
;;; succeeded before printing anything.
;; our DESCRIBE facility is compiled and loaded.
"src/pcl/describe" ; FIXME: should probably be byte compiled
;; FIXME: What about Gray streams? e.g. "gray-streams.lisp"
- ;; and "gray-streams-class.lisp"?
+ ;; and "gray-streams-class.lisp"? For now, we just
+ ;; have stubs (installed in cold load).
))
(let ((fullname (concatenate 'string stem ".lisp")))
(sb-int:/show "about to compile" fullname)
--- /dev/null
+;;;; stubs for the Gray streams implementation for SBCL
+
+;;;; This software is part of the SBCL system. See the README file for
+;;;; more information.
+
+;;;; This software is in the public domain and is provided with absolutely no
+;;;; warranty. See the COPYING and CREDITS files for more information.
+
+(in-package "SB!GRAY")
+
+;;; The intent here is that when Gray streams support isn't installed
+;;; yet, and someone tries to do a stream operation on something
+;;; which isn't an ordinary CL:STREAM, and the code tries to fall
+;;; through to the Gray stream operation, we signal a type error,
+;;; instead of an undefined function error.
+;;;
+;;; Real Gray stream functions will overwrite these stubs. FIXME: When
+;;; and if Gray stream functions become a stable part of the system,
+;;; we should just delete all this.
+(defun %gray-stream-stub (oughtta-be-stream &rest rest)
+ (declare (ignore rest))
+ (error 'simple-type-error
+ :datum oughtta-be-stream
+ :expected-type 'stream
+ :format-control "~@<not a ~S: ~2I~_~S~:>"
+ :format-arguments (list 'stream oughtta-be-stream)))
+
+(dolist (funname
+ '(stream-advance-to-column
+ stream-clear-input stream-clear-output
+ stream-finish-output stream-force-output
+ stream-fresh-line
+ stream-line-column
+ stream-line-length
+ stream-listen stream-peek-char
+ stream-read-byte
+ stream-read-char stream-read-char-no-hang
+ stream-read-line
+ stream-start-line-p
+ stream-terpri
+ stream-unread-char
+ stream-write-byte stream-write-char
+ stream-write-string))
+ (setf (fdefinition funname) #'%gray-stream-stub))
#!+gengc ("code/gengc" :not-host)
("code/stream" :not-host)
+ ("pcl/gray-streams-stubs" :not-host)
("code/print" :not-host)
("code/pprint" :not-host) ; maybe should be :BYTE-COMPILE T
("code/early-format")
;;; versions, and a string like "0.6.5.12" is used for versions which
;;; aren't released but correspond only to CVS tags or snapshots.
-"0.6.8.22"
+"0.6.8.23"