;;; -*- Mode: Lisp; Package: Lisp -*-
;;;
;;; This file loads the parts of the system that aren't cold loaded and saves
;;; the resulting core image.
;;;

(write-string "What is the current lisp-implementation-version? ")
(setq *lisp-implementation-version* (read-line))
(write-string "What is the CLC version? ")
(setq compiler-version (read-line))
(write-string "What is the Hemlock version? ")
(setq *hemlock-version* (read-line))

(load ">sys>slisp>code>Spirrat.Sfasl")
(load ">sys>slisp>code>Lfloat-Consts.Sfasl")
(load ">sys>slisp>code>Choose.Sfasl")

(load ">sys>slisp>compiler>Clc.Sfasl")
(load ">sys>slisp>compiler>Fndefs.Sfasl")
(load ">sys>slisp>compiler>Trans.Sfasl")
(load ">sys>slisp>compiler>Typetran.Sfasl")
(load ">sys>slisp>compiler>Seqtran.Sfasl")
(load ">sys>slisp>compiler>Peep.Sfasl")
(load ">sys>slisp>compiler>Assem.Sfasl")
(load ">sys>slisp>compiler>Instrdefs.Sfasl")

(load ">sys>slisp>hemlock>perqsite.sfasl")
(hi::build-hemlock)

;;; We can do this because Stream-Init, which is called by Save will set
;;; *Standard-Input* back to a synonym stream to *Terminal-IO*.

(setq *standard-input*
      (make-string-input-stream "(save-spice-lisp \">sys>foo>spice-lisp.core\")"))