[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue: EVAL-WHEN-NON-TOP-LEVEL
- To: "cl-compiler" <cl-compiler@sail.stanford.edu>
- Subject: Re: Issue: EVAL-WHEN-NON-TOP-LEVEL
- From: "AITG::VANROGGEN" <vanroggen%aitg.decnet@hudson.dec.com>
- Date: 27 May 88 11:15:00 EDT
- Cc: vanroggen
- Reply-to: "AITG::VANROGGEN" <vanroggen%aitg.decnet@hudson.dec.com>
There really isn't enough consideration of what happens when the
EVAL-WHEN isn't a top-level, and what following expressions may
depend on from what was inside a non-top-level EVAL-WHEN.
The problem is what order expressions may get "processed", particularly
by code-walkers such as compilers.
Here's a simple example which assumes the DEFMACRO expands into an
(EVAL-WHEN ...) to tell everyone who cares (particularly the compiler at
compile time) that M is a macro.
(let ...
(defmacro m ...)
(m ...))
But the body of the LET is equivalent to
(let ...
(flet ((rest () (m ...)))
(defmacro m ...)
(rest)))
which isn't going to work.
The easiest solution is to assume that one cannot depend on the effects
of the EVAL-WHEN at compile time until the next top-level form.
---Walter
------