chiark / gitweb /
src/final.lisp, src/frontend.lisp: Compile methods before dumping.
[sod] / src / frontend.lisp
index d394eee2f63bd6c1ef0be86fbaf025c3c5d9b13c..26afbfc4d9a9d8e7737a9010a3968aec63aa4298 100644 (file)
@@ -29,6 +29,12 @@ (cl:defpackage #:sod-frontend
 
 (cl:in-package #:sod-frontend)
 
+;;;--------------------------------------------------------------------------
+;;; Preparation for dumping.
+
+(make-builtin-module)
+(exercise)
+
 ;;;--------------------------------------------------------------------------
 ;;; The main program.
 
@@ -110,9 +116,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 +172,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.