Skip to content
Snippets Groups Projects
Commit 6a035764 authored by wlott's avatar wlott
Browse files

Changed to bind *features* to (backend-features *target-backend*) just

before doing the read instead of binding *features* to (backend-features
*backend*) for the duration of the compile.  This way, the compiler can use
(backend-featurep :foo) to tell how to compile, and cross compilers can be
compiled correctly with respect to #+foo.
parent 969925d0
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/main.lisp,v 1.63 1992/05/25 21:37:48 ram Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/main.lisp,v 1.64 1992/06/12 04:38:25 wlott Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -685,7 +685,8 @@ ...@@ -685,7 +685,8 @@
(defun ignore-error-form (stream pos) (defun ignore-error-form (stream pos)
(declare (type stream stream) (type unsigned-byte pos)) (declare (type stream stream) (type unsigned-byte pos))
(file-position stream pos) (file-position stream pos)
(handler-case (let ((*read-suppress* t)) (handler-case (let ((*read-suppress* t)
(*features* (backend-features *target-backend*)))
(read stream)) (read stream))
(error (condition) (error (condition)
(declare (ignore condition)) (declare (ignore condition))
...@@ -725,7 +726,8 @@ ...@@ -725,7 +726,8 @@
;;; then attempt to recover if possible, returing a proxy error form. ;;; then attempt to recover if possible, returing a proxy error form.
;;; ;;;
(defun careful-read (stream eof pos) (defun careful-read (stream eof pos)
(handler-case (read stream nil eof) (handler-case (let ((*features* (backend-features *target-backend*)))
(read stream nil eof))
(error (condition) (error (condition)
(let ((new-pos (file-position stream))) (let ((new-pos (file-position stream)))
(cond ((= new-pos (file-length stream)) (cond ((= new-pos (file-length stream))
...@@ -1399,10 +1401,7 @@ ...@@ -1399,10 +1401,7 @@
(*last-message-count* 0) (*last-message-count* 0)
(*info-environment* (*info-environment*
(or (backend-info-environment *backend*) (or (backend-info-environment *backend*)
*info-environment*)) *info-environment*)))
(*features*
(or (backend-features *backend*)
*features*)))
(with-compilation-unit () (with-compilation-unit ()
(loop (loop
(multiple-value-bind (form tlf eof-p) (multiple-value-bind (form tlf eof-p)
...@@ -1715,9 +1714,6 @@ ...@@ -1715,9 +1714,6 @@
(*info-environment* (*info-environment*
(or (backend-info-environment *backend*) (or (backend-info-environment *backend*)
*info-environment*)) *info-environment*))
(*features*
(or (backend-features *backend*)
*features*))
(start-errors *compiler-error-count*) (start-errors *compiler-error-count*)
(start-warnings *compiler-warning-count*) (start-warnings *compiler-warning-count*)
(start-notes *compiler-note-count*) (start-notes *compiler-note-count*)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment