0.6.10:
[sbcl.git] / src / code / save.lisp
index b61733d..55d2897 100644 (file)
@@ -14,9 +14,6 @@
 ;;;; files for more information.
 
 (in-package "SB!IMPL")
-
-(file-comment
-  "$Header$")
 \f
 (defvar *before-save-initializations* nil
   #!+sb-doc
@@ -42,7 +39,7 @@
 ;;; image to make a running Lisp, the memory never gets reclaimed.
 ;;; (But with the PURIFY option it seems to work OK.)
 (defun save-lisp-and-die (core-file-name &key
-                                        (toplevel #'toplevel)
+                                        (toplevel #'toplevel-init)
                                         (purify nil)
                                         (root-structures ())
                                         (environment-name "auxiliary"))
   (dolist (f *before-save-initializations*)
     (funcall f))
   (flet ((restart-lisp ()
-          (sb!unix:unix-exit
-           (catch '%end-of-the-world
-             (reinit)
-             ;; FIXME: Wouldn't it be more correct to do this running
-             ;; backwards through the list, instead of forwards?
-             (dolist (f *after-save-initializations*)
-               (funcall f))
-             (funcall toplevel)))))
+           (handling-end-of-the-world
+            (reinit)
+            (dolist (f *after-save-initializations*)
+              (funcall f))
+            (funcall toplevel))))
     ;; FIXME: Perhaps WITHOUT-GCING should be wrapped around the
     ;; LET as well, to avoid the off chance of an interrupt triggering
     ;; GC and making our saved RESTART-LISP address invalid?
 \f
 ;;;; functions used by worldload.lisp in CMU CL bootstrapping
 
-;;; If Name has been byte-compiled, and :RUNTIME is a feature, then load the
-;;; byte-compiled version, otherwise just do normal load.
+;;; If NAME has been byte-compiled, and :RUNTIME is a feature, then
+;;; load the byte-compiled version, otherwise just do normal load.
 #+nil ; no longer needed in SBCL.. I think.. -- WHN 19990814
 (defun maybe-byte-load (name &optional (load-native t))
   (let ((bname (make-pathname