X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcold%2Fwarm.lisp;h=838b4d2662d0a38ed83b0be9111557402c2356c1;hb=da2e2f4be772532cacd9188d206d4eb82dc9f6ef;hp=455e9328a122047408d903895636ed61f2c34671;hpb=2d3cb6dba6461e98744eca2a1df4f770cea468ca;p=sbcl.git diff --git a/src/cold/warm.lisp b/src/cold/warm.lisp index 455e932..838b4d2 100644 --- a/src/cold/warm.lisp +++ b/src/cold/warm.lisp @@ -136,6 +136,7 @@ ;; 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 @@ -162,17 +163,40 @@ (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)))))) ;;;; setting package documentation