chiark / gitweb /
src/final.lisp: Slightly tweak `clear-the-decks' usage.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 8 Jun 2018 18:58:28 +0000 (19:58 +0100)
  * Force a clear after loading the file.  This is now safe, because
    we've arranged for us to be loaded after everything relevant.

  * Don't bother clearing /before/ `exercise' now that we know we've
    been cleared once.

  * Don't clear in `test-module'.

src/final.lisp

index e7a3eb441c4cc9b6d2594d79dd4d1d9c4c2fe1da..45bb69078647df1a8e8e956946fbdfb9e986a127 100644 (file)
@@ -42,7 +42,6 @@ (export 'test-module)
 (defun test-module (path reason)
   "Reset the translator's state, read a module from PATH and output it with
    REASON, returning the result as a string."
-  (clear-the-decks)
   (setf *module-map* (make-hash-table :test #'equal))
   (with-open-file (out *debugout-pathname*
                   :direction :output
@@ -133,11 +132,15 @@ (defun exercise ()
    That's the theory anyway.  Call this function before you dump an image and
    see what happens."
 
-  (clear-the-decks)
   (dolist (reason '(:h :c))
     (with-output-to-string (bitbucket)
       (output-module *builtin-module* reason bitbucket)))
 
   (clear-the-decks))
 
+;;;--------------------------------------------------------------------------
+;;; Make sure things work after loading the system.
+
+(clear-the-decks)
+
 ;;;----- That's all, folks --------------------------------------------------