Commit 0041e6b0 authored by gerd's avatar gerd
Browse files

Loading gray-streams lead to a vicious metacircle because

	effective methods of close were no longer precomputed, and close
	is being used somewhere inside the compiler during emf
	compilation.

	* src/pcl/gray-streams.lisp (toplevel): Call pcl-close
	before setting the fdefinition of close to it, analogous
	to what was already done for pcl-open-stream-p.

	* src/pcl/dfun.lisp (break-vicious-metacircle): Put the
	error in infinite-error-protect, just in case.
parent 9f94756e
Loading
Loading
Loading
Loading
+3 −2
Changes for pcl/dfun.lisp: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@
;;; *************************************************************************

(file-comment
  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/dfun.lisp,v 1.32 2003/07/28 10:43:15 gerd Exp $")
  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/dfun.lisp,v 1.33 2003/07/28 14:13:34 gerd Exp $")

(in-package :pcl)

@@ -1203,10 +1203,11 @@ And so, we are saved.
			       class))
	    (return-from break-vicious-metacircle
	      (values index (list method) type index)))))))
  (kernel:infinite-error-protect
   (error "~@<Vicious metacircle:  The computation of an ~
	   effective method of ~s for arguments of types ~s uses ~
	   the effective method being computed.~@:>"
	 gf classes))
	  gf classes)))

;;;
;;; Return (CLASS SLOTD ACCESSOR-TYPE) if some method of generic
+4 −2
Changes for pcl/gray-streams.lisp: 4 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
;;;

(file-comment
  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/gray-streams.lisp,v 1.11 2003/06/06 16:23:46 toy Exp $")
  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/gray-streams.lisp,v 1.12 2003/07/28 14:13:34 gerd Exp $")
;;;
;;; **********************************************************************
;;;
@@ -59,7 +59,6 @@




(defgeneric pcl-close (stream &key abort)
  (:documentation
   "Closes the given Stream.  No more I/O may be performed, but
@@ -75,6 +74,7 @@
  (defmethod pcl-close ((stream stream:simple-stream) &key abort)
    (stream:device-close stream abort)))

(pcl-close (make-string-output-stream))
(setf (fdefinition 'close) #'pcl-close)


@@ -446,3 +446,5 @@
(setf (getf *herald-items* :gray-streams)
      '("    Gray Streams Protocol Support"))