[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue: LOAD-TIME-EVAL (Version 9)
- To: Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>
- Subject: Re: Issue: LOAD-TIME-EVAL (Version 9)
- From: David N Gray <Gray@DSG.csc.ti.com>
- Date: Wed, 25 Jan 89 16:12:05 CST
- Cc: sandra%defun@cs.utah.edu, Moon@STONY-BROOK.SCRC.Symbolics.COM, CL-Compiler@SAIL.STANFORD.EDU
- In-reply-to: Msg of Wed, 25 Jan 89 15:45 EST from Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>
- Sender: GRAY@Kelvin.csc.ti.com
> Which intuition are we talking about abandoning:
>
> Intuition #1: (DOTIMES (I 5) (PRINT (LOAD-TIME-VALUE (F))))
> evaluates the LOAD-TIME-VALUE expression only once.
>
> Intuition #2: (DOTIMES (I 5) (PRINT (EVAL '(LOAD-TIME-VALUE (F)))))
> evaluates the LOAD-TIME-VALUE expression at least 5 times.
Neither of these. The only problem case is when the same EQ expression is
referenced from two or more places in the code. Basically I think the
amendment would be to change the following paragraph:
Implementations must guarantee that each reference to a
LOAD-TIME-VALUE expression results in at least one evaluation of its
nested <form>. For example,
(DEFMACRO CONS-SELF (X)
`(CONS ,X ,X))
(CONS-SELF (LOAD-TIME-VALUE (COMPUTE-IT)))
must perform two calls to COMPUTE-IT; although there is only one
unique LOAD-TIME-VALUE expression, there are two distinct references
to it.
to something like:
Implementations are not required guarantee that each reference to a
LOAD-TIME-VALUE expression results in at least one evaluation of its
nested <form>. For example,
(DEFMACRO CONS-SELF (X)
`(CONS ,X ,X))
(CONS-SELF (LOAD-TIME-VALUE (COMPUTE-IT)))
may perform either one or two calls to COMPUTE-IT; although there is only
one unique LOAD-TIME-VALUE expression, there are two distinct references
to it.