chiark / gitweb /
src/frontend.lisp: Prepare the builtin module at load time.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 12 Sep 2015 21:59:40 +0000 (22:59 +0100)
This is better because load time happens before the image is dumped.

Also, remove some pointless `clear-the-decks' calls.

src/frontend.lisp

index d394eee2f63bd6c1ef0be86fbaf025c3c5d9b13c..e293f2958f37acaaa7384cfe52668ef88ab3fa94 100644 (file)
@@ -29,6 +29,11 @@ (cl:defpackage #:sod-frontend
 
 (cl:in-package #:sod-frontend)
 
+;;;--------------------------------------------------------------------------
+;;; Preparation for dumping.
+
+(make-builtin-module)
+
 ;;;--------------------------------------------------------------------------
 ;;; The main program.
 
@@ -110,9 +115,6 @@     (define-program
                 (or builtinsp args))
       (die-usage))
 
-    ;; Prepare the builtins.
-    (make-builtin-module)
-
     ;; Do the main parsing job.
     (multiple-value-bind (hunoz nerror nwarn)
        (count-and-report-errors ()
@@ -169,12 +171,10 @@     (define-program
              ;; If we're writing the builtin module then now seems like a
              ;; good time to do that.
              (when builtinsp
-               (clear-the-decks)
                (hack-module *builtin-module*))
 
              ;; Parse and write out the remaining modules.
              (dolist (arg args)
-               (clear-the-decks)
                (hack-module (read-module arg))))))
 
       ;; Report on how well everything worked.