[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue EVAL-WHEN-NON-TOP-LEVEL, v2
- To: sandra%defun@cs.utah.edu
- Subject: Issue EVAL-WHEN-NON-TOP-LEVEL, v2
- From: Jon L White <jonl@lucid.com>
- Date: Mon, 9 Jan 89 20:14:56 PST
- Cc: SEB1525@draper.com, cl-compiler@SAIL.STANFORD.EDU
- In-reply-to: Sandra J Loosemore's message of Sun, 8 Jan 89 11:17:03 MST <8901081817.AA09469@defun.utah.edu>
re: (eval-when (eval compile load)
(defmacro bar ...))
Suppose we do as you suggest and say that the bodies of top-level
EVAL-WHENs continue to be top-level, but prevent nested EVAL-WHENs
from doing COMPILE evaluation. Then, since the macro definition for
BAR is at top-level, it must cause some compile-time magic to happen
when it is compiled (processing for the LOAD situation). This implies
that you couldn't implement DEFMACRO by expanding it into an EVAL-WHEN,
because the required magic actions would be suppressed.
Say, didn't you realize that the COMPILE situation in the outter eval-when
means that the DEFMACRO will be evaluated at compile time, regardless of
any nested inner eval-when's? You know that I favor an implementaiton
of DEFMACRO that simply macroexpands onto usages of EVAL-WHEN, so that
there is only *one* notion of toplevel "magic" --namlely eval-when.
-- JonL --