[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue: LOAD-TIME-EVAL (Version 6)
- To: KMP@STONY-BROOK.SCRC.Symbolics.COM
- Subject: Issue: LOAD-TIME-EVAL (Version 6)
- From: Eric Benson <eb@lucid.com>
- Date: Wed, 21 Sep 88 13:16:24 pdt
- Cc: Moon@STONY-BROOK.SCRC.Symbolics.COM, KMP@STONY-BROOK.SCRC.Symbolics.COM, Gregor.pa@Xerox.COM, dussud@STONY-BROOK.SCRC.Symbolics.COM, sandra%defun@cs.utah.edu, CL-Cleanup@SAIL.STANFORD.EDU, cl-compiler@sail.stanford.edu
- In-reply-to: Kent M Pitman's message of Wed, 21 Sep 88 15:58 EDT <880921155806.5.KMP@GRYPHON.SCRC.Symbolics.COM>
Date: Wed, 21 Sep 88 15:58 EDT
From: Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>
Also, I am concerned about how the "right thing" can be done with the
env argument in the case of
(EVAL-WHEN (EVAL COMPILE LOAD)
(DEFUN FOO (X) '(X #,(SQRT 3))))
In a file compiler, the #, must read in a way that is acceptable to the
compiler's runtime environment (compile to core) and the compiler's file
environment (compile to file). And this decision must be made at
readtime.
If instead you wrote:
(EVAL-WHEN (EVAL COMPILE LOAD)
(DEFUN FOO (X) #,`(X ,(SQRT 3))))
and #, expanded into a LOAD-TIME-VALUE expression, then the compile to
core operation could treat the LOAD-TIME-VALUE special form in one way
and the file compiler could treat the LOAD-TIME-VALUE special form
another way and things would work nicely as a natural result of the
accessibility of the lexical environment from the special form.
This should work:
(EVAL-WHEN (EVAL COMPILE LOAD)
(DEFMACRO LIST-FOR-FOO (&ENVIRONMENT ENV)
`(X ,(MAKE-LOAD-TIME-CONSTANT '(SQRT 3) ENV)))
(DEFUN FOO (X) (LIST-FOR-FOO)))