cmp: remove dynamic variable *compiler-input*

*compiler-input* was only passed to the first-pass, there is no need
for a dynamic binding.
This commit is contained in:
Daniel Kochmański 2019-12-16 10:14:57 +01:00
parent 05cc54a75e
commit 69af894224
2 changed files with 6 additions and 7 deletions

View file

@ -69,7 +69,6 @@ running the compiler. It may be updated by running ")
(defvar *compiler-break-enable* nil)
(defvar *compiler-in-use* nil)
(defvar *compiler-input*)
(defvar *compiler-output1*)
(defvar *compiler-output2*)

View file

@ -666,11 +666,11 @@ compiled successfully, returns the pathname of the compiled file"
(when (probe-file "./cmpinit.lsp")
(load "./cmpinit.lsp" :verbose *compile-verbose*))
(with-open-file (*compiler-input* *compile-file-pathname*
:external-format external-format)
(with-open-file (stream *compile-file-pathname*
:external-format external-format)
(unless source-truename
(setf (car ext:*source-location*) *compile-file-pathname*))
(compiler-pass1 *compiler-input* source-offset))
(compiler-pass1 stream source-offset))
(cmpprogress "~&;;; End of Pass 1.")
(setf init-name (compute-init-name output-file :kind
@ -904,9 +904,9 @@ from the C language code. NIL means \"do not create the file\"."
(data-init)
(if (streamp object)
(do* ((eof '(NIL))
(*compile-file-position* 0 (file-position *compiler-input*))
(form (si::read-object-or-ignore *compiler-input* eof)
(si::read-object-or-ignore *compiler-input* eof)))
(*compile-file-position* 0 (file-position object))
(form (si::read-object-or-ignore object eof)
(si::read-object-or-ignore object eof)))
((eq form eof))
(when form
(setf (cdr ext:*source-location*)