chiark / gitweb /
src/{builtin,final,frontent}.lisp: `clear-the-decks' makes builtin module.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 14 Sep 2015 09:40:23 +0000 (10:40 +0100)
Add a `clear-the-decks' function which will make the builtin module if
it's not been set up yet.  Now we don't need to do this explicitly and
everything is better.

src/builtin.lisp
src/final.lisp
src/frontend.lisp

index 696bcf6c646d37766d1fb9a5605ab120e7384a2b..5aad5f54f985fe1c2f97edfea7548cea25715484 100644 (file)
@@ -332,4 +332,7 @@ (defun make-builtin-module ()
       (bootstrap-classes module))
     (setf *builtin-module* module)))
 
+(define-clear-the-decks builtin-module
+  (unless *builtin-module* (make-builtin-module)))
+
 ;;;----- That's all, folks --------------------------------------------------
index 12b6294d19973530c5d49286cac289f1f80d9cc8..5df72f187f36b16ba25759fb8bc6faa4ceb27d35 100644 (file)
@@ -35,7 +35,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."
-  (unless *builtin-module* (make-builtin-module))
   (clear-the-decks)
   (setf *module-map* (make-hash-table :test #'equal))
   (with-open-file (out *debugout-pathname*
index 26afbfc4d9a9d8e7737a9010a3968aec63aa4298..98652ec7e3b0deb72b36f53b2a7d82a60a49d57a 100644 (file)
@@ -32,7 +32,7 @@ (cl:in-package #:sod-frontend)
 ;;;--------------------------------------------------------------------------
 ;;; Preparation for dumping.
 
-(make-builtin-module)
+(clear-the-decks)
 (exercise)
 
 ;;;--------------------------------------------------------------------------