Skip to content
Snippets Groups Projects
Commit d5a8fd7a authored by ram's avatar ram
Browse files

Init *BEFORE-GC-HOOKS*, *AFTER-GC-HOOKS* and %SP-INTERRUPTS-INHIBITED

before we run top-level forms.
Added WORLD-LOAD-INIT-FUNCTION so that we don't have to use an interpreted
lambda in worldload (and swap in the entire interpreter on startup.)
parent 4afdfcae
No related branches found
No related tags found
No related merge requests found
...@@ -77,7 +77,8 @@ ...@@ -77,7 +77,8 @@
;;; Must be initialized in %INITIAL-FUNCTION before the DEFVAR runs... ;;; Must be initialized in %INITIAL-FUNCTION before the DEFVAR runs...
(proclaim '(special *gc-inhibit* *already-maybe-gcing* (proclaim '(special *gc-inhibit* *already-maybe-gcing*
*need-to-collect-garbage* *gc-verbose*)) *need-to-collect-garbage* *gc-verbose*
*before-gc-hooks* *after-gc-hooks*))
;;;; Global ports: ;;;; Global ports:
...@@ -760,6 +761,9 @@ ...@@ -760,6 +761,9 @@
(setf *gc-inhibit* t) (setf *gc-inhibit* t)
(setf *need-to-collect-garbage* nil) (setf *need-to-collect-garbage* nil)
(setq *gc-verbose* t) (setq *gc-verbose* t)
(setq *before-gc-hooks* ())
(setq *after-gc-hooks* ())
(setq %sp-interrupts-inhibited nil)
(%primitive print "In initial-function, and running.") (%primitive print "In initial-function, and running.")
;; Many top-level forms call INFO, (SETF INFO). ;; Many top-level forms call INFO, (SETF INFO).
...@@ -939,6 +943,16 @@ ...@@ -939,6 +943,16 @@
(funcall init-function))) (funcall init-function)))
;;; WORLD-LOAD-INIT-FUNCTION -- Interface
;;;
;;; The init function we pass to SAVE-LISP in worldload. We turn on GC and
;;; thow to top level.
;;;
(defun world-load-init-function ()
(gc-on)
(abort))
;;; Quit gets us out, one way or another. ;;; Quit gets us out, one way or another.
(defun quit (&optional recklessly-p) (defun quit (&optional recklessly-p)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment