[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fixing Lucid 2.1 Compilation Problem



Received: by algol.steinmetz (3.2/1.1x Steinmetz)
	id AA29812; Tue, 9 Feb 88 05:40:52 EST
Date: Tue, 9 Feb 88 05:40:52 EST
From: simmons <simmons%algol.tcpip@csbvax>
Posted-Date: Tue, 9 Feb 88 05:40:52 EST
Message-Id: <8802091040.AA29812@algol.steinmetz>
To: CommonLoops.pa@Xerox.com
Subject: Fixing Lucid 2.1 Compilation Problem


	Yes.  Many of the better Common Lisp compilers have bugs like
	this.  Out of curiosity, does the following change (which is a
	little less ugly) also fix the bug?

    (defun with-slots-internal (specs form context translate-fn &aux entry)
	...
                                  ...
                                ...
				(scan-setf (cddr tail))))))
		 (walker::recons form kind (scan-setf (cdr form))))))
	    (t form)))

No.  That doesn't work in Lucid 2.1.  It seems that we need to force the
evaluation of the arguments such that evaluation of (scan-setf (cdr form))
comes BEFORE the evaluation of kind.  The following slight variation
on the original code seems to work, and is cleaner than my first
fix.  Perhaps the folks at Lucid could enlighten us as to the best
way to control the compiler in such cases.
		-- Mel Simmons

(defun with-slots-internal (specs form context translate-fn &aux entry)
	...
                                  ...
                                ...
				(scan-setf (cddr tail))))))
 	         (let (new-tail)
	           (setq new-tail (scan-setf (cdr form)))
	           (walker::recons form kind new-tail)))))
	    (t form)))