0.8.0.24:
[sbcl.git] / src / code / cold-init.lisp
index e7429a2..cb4c684 100644 (file)
@@ -95,8 +95,7 @@
   (setf *gc-notify-stream* nil
         *before-gc-hooks* nil
         *after-gc-hooks* nil
-        *already-maybe-gcing* t
-       *gc-inhibit* t
+       *gc-inhibit* 1
        *need-to-collect-garbage* nil
        sb!unix::*interrupts-enabled* t
        sb!unix::*interrupt-pending* nil
   (show-and-call !random-cold-init)
 
   (show-and-call !package-cold-init)
-
+  
   ;; All sorts of things need INFO and/or (SETF INFO).
   (/show0 "about to SHOW-AND-CALL !GLOBALDB-COLD-INIT")
   (show-and-call !globaldb-cold-init)
 
   ;; This needs to be done early, but needs to be after INFO is
   ;; initialized.
+  (show-and-call !function-names-cold-init)
   (show-and-call !fdefn-cold-init)
 
   ;; Various toplevel forms call MAKE-ARRAY, which calls SUBTYPEP, so
   (show-and-call !policy-cold-init-or-resanify)
   (/show0 "back from !POLICY-COLD-INIT-OR-RESANIFY")
 
+  (show-and-call !early-proclaim-cold-init)
+  
   ;; KLUDGE: Why are fixups mixed up with toplevel forms? Couldn't
   ;; fixups be done separately? Wouldn't that be clearer and better?
   ;; -- WHN 19991204
   ;; DEFTYPEs are.
   (setf *type-system-initialized* t)
 
+  ;; run the PROCLAIMs.
+  (show-and-call !late-proclaim-cold-init)
+  
   (show-and-call os-cold-init-or-reinit)
 
   (show-and-call stream-cold-init-or-reset)
   (setf *cold-init-complete-p* t)
 
   ;; The system is finally ready for GC.
-  (setf *already-maybe-gcing* nil)
   (/show0 "enabling GC")
   (gc-on)
   (/show0 "doing first GC")
@@ -277,7 +281,6 @@ instead (which is another name for the same thing)."))
       (os-cold-init-or-reinit)
       (stream-reinit)
       (signal-cold-init-or-reinit)
-      (gc-reinit)
       (setf (sb!alien:extern-alien "internal_errors_enabled" boolean) t)
       ;; PRINT seems not to like x86 NPX denormal floats like
       ;; LEAST-NEGATIVE-SINGLE-FLOAT, so the :UNDERFLOW exceptions are
@@ -293,8 +296,9 @@ instead (which is another name for the same thing)."))
       ;; reason.. (Perhaps we should do it anyway in case someone
       ;; manages to save an image from within a pseudo-atomic-atomic
       ;; operation?)
-      #!+x86 (setf *pseudo-atomic-atomic* 0))
-    (gc-on)))
+      #!+x86 (setf *pseudo-atomic-atomic* 0)))
+  (gc-on)
+  (gc))
 \f
 ;;;; some support for any hapless wretches who end up debugging cold
 ;;;; init code