X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fcold-init.lisp;h=bc37148f24de8ef99e02eaacad807f66c61c5a89;hb=cd13034f9415f64cdaa05893a4ac5ff1e95c97bd;hp=e7429a2140d84ad107a3e0b8eb7b7ffdd4940625;hpb=4d50265fe5a3dd4ea5b35c8ec12fe2b88721d22c;p=sbcl.git diff --git a/src/code/cold-init.lisp b/src/code/cold-init.lisp index e7429a2..bc37148 100644 --- a/src/code/cold-init.lisp +++ b/src/code/cold-init.lisp @@ -92,11 +92,9 @@ ;; !UNIX-COLD-INIT. And *TYPE-SYSTEM-INITIALIZED* could be changed to ;; *TYPE-SYSTEM-INITIALIZED-WHEN-BOUND* so that it doesn't need to ;; be explicitly set in order to be meaningful. - (setf *gc-notify-stream* nil - *before-gc-hooks* nil + (setf *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 @@ -114,13 +112,14 @@ (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 @@ -142,6 +141,8 @@ (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 @@ -202,6 +203,12 @@ ;; DEFTYPEs are. (setf *type-system-initialized* t) + ;; now that the type system is definitely initialized, fixup UNKNOWN + ;; types that have crept in. + (show-and-call !fixup-type-cold-init) + ;; 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) @@ -235,7 +242,6 @@ (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,13 +283,13 @@ 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 ;; disabled by default. Joe User can explicitly enable them if ;; desired. (set-floating-point-modes :traps '(:overflow :invalid :divide-by-zero)) + (sb!thread::maybe-install-futex-functions) ;; Clear pseudo atomic in case this core wasn't compiled with ;; support. @@ -293,8 +299,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)) ;;;; some support for any hapless wretches who end up debugging cold ;;;; init code