\f
;;;; compiling and loading more of the system
-;;; KLUDGE: In SBCL, almost all in-the-flow-of-control package hacking has
-;;; gone away in favor of package setup controlled by tables. However, that
-;;; mechanism isn't smart enough to handle shadowing, and since this shadowing
-;;; is inherently a non-ANSI KLUDGE anyway (i.e. there ought to be no
-;;; difference between e.g. CL:CLASS and SB-PCL:CLASS) there's not much
-;;; point in trying to polish it by implementing a non-KLUDGEy way of
-;;; setting it up. -- WHN 19991203
-(let ((*package* (the package (find-package "SB-PCL"))))
- (shadow '(;; CLASS itself and operations thereon
- "CLASS" "CLASS-NAME" "CLASS-OF" "FIND-CLASS"
- ;; some system classes
- "BUILT-IN-CLASS" "STANDARD-CLASS" "STRUCTURE-CLASS"))
- ;; Of the shadowing symbols above, these are external symbols in CMU CL ca.
- ;; 19991203. I'm not sure what's the basis of the decision to export some and
- ;; not others; we'll just follow along..
- (export (mapcar #'intern '("CLASS-NAME" "CLASS-OF" "FIND-CLASS"))))
-
;;; FIXME: CMU CL's pclcom.lisp had extra optional stuff wrapped around
;;; COMPILE-PCL, at least some of which we should probably have too:
;;;
;; miscellaneous functionality which depends on CLOS
"src/code/force-delayed-defbangmethods"
+ "src/code/late-condition"
;; CLOS-level support for the Gray OO streams
;; extension (which is also supported by various
(let ((fullname (concatenate 'string stem ".lisp")))
(sb-int:/show "about to compile" fullname)
- (multiple-value-bind
- (compiled-truename compilation-warnings-p compilation-failure-p)
- (compile-file fullname)
- (declare (ignore compilation-warnings-p))
- (sb-int:/show "done compiling" fullname)
- (cond (compilation-failure-p
- (error "COMPILE-FILE of ~S failed." fullname))
- (t
- (unless (load compiled-truename)
- (error "LOAD of ~S failed." compiled-truename))
- (sb-int:/show "done loading" compiled-truename))))))
+ (flet ((report-recompile-restart (stream)
+ (format stream "Recompile file ~S" fullname))
+ (report-continue-restart (stream)
+ (format stream
+ "Continue, using possibly bogus file ~S"
+ (compile-file-pathname fullname))))
+ (tagbody
+ retry-compile-file
+ (multiple-value-bind (output-truename warnings-p failure-p)
+ (compile-file fullname)
+ (declare (ignore warnings-p))
+ (sb-int:/show "done compiling" fullname)
+ (cond ((not output-truename)
+ (error "COMPILE-FILE of ~S failed." fullname))
+ (failure-p
+ (unwind-protect
+ (restart-case
+ (error "FAILURE-P was set when creating ~S."
+ output-truename)
+ (recompile ()
+ :report report-recompile-restart
+ (go retry-compile-file))
+ (continue ()
+ :report report-continue-restart
+ (setf failure-p nil)))
+ ;; Don't leave failed object files lying around.
+ (when (and failure-p (probe-file output-truename))
+ (delete-file output-truename)
+ (format t "~&deleted ~S~%" output-truename))))
+ ;; Otherwise: success, just fall through.
+ (t nil))
+ (unless (load output-truename)
+ (error "LOAD of ~S failed." output-truename))
+ (sb-int:/show "done loading" output-truename))))))
\f
;;;; setting package documentation
"public: the default package for user code and data")
#+sb-doc (setf (documentation (find-package "KEYWORD") t)
"public: home of keywords")
-
-;;; KLUDGE: It'd be nicer to do this in the table with the other
-;;; non-standard packages. -- WHN 19991206
-#+sb-doc (setf (documentation (find-package "SB-SLOT-ACCESSOR-NAME") t)
- "private: home of CLOS slot accessor internal names")
-
-;;; FIXME: There doesn't seem to be any easy way to get package doc strings
-;;; through the cold boot process. They need to be set somewhere. Maybe the
-;;; easiest thing to do is to read them out of package-data-list.lisp-expr
-;;; now?