[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: issue CONSTANT-CIRCULAR-COMPILATION, version 4
- To: sandra%defun@cs.utah.edu (Sandra J Loosemore)
- Subject: Re: issue CONSTANT-CIRCULAR-COMPILATION, version 4
- From: David N Gray <Gray@DSG.csc.ti.com>
- Date: Mon, 9 Jan 89 18:30:01 CST
- Cc: cl-compiler@sail.stanford.edu
- In-reply-to: Msg of Tue, 3 Jan 89 13:54:56 MST from sandra%defun@cs.utah.edu (Sandra J Loosemore)
- Sender: GRAY@Kelvin.csc.ti.com
> Proposal: CONSTANT-CIRCULAR-COMPILATION:FLAG
>
> Add to the definition of Common Lisp a special variable:
>
> *DUMP-CIRCLE* [Special variable]
>
> State that if the (compile-time) value of *DUMP-CIRCLE* is NIL, it is
> an error for an object containing a circular reference to appear as a
> constant to be compiled. State that the compiler is required to
> preserve EQness of substructures within a file compiled with
> COMPILE-FILE when *DUMP-CIRCLE* is non-NIL.
But then someone would want to do something like
(COMPILER-LET ((*DUMP-CIRCLE* T))
(DEFUN FOO (...)
...
(... '#.(CIRCULAR-LIST ...) ...)...))
which raises some questions:
1. Is this flag still useful if COMPILER-LET is eliminated?
2. How much of the code does the COMPILER-LET have to surround in
order to be effective?
3. Is it even possible to control this during compilation? [In our
implementation, COMPILER-LET and (EVAL-WHEN (COMPILE) ...) both
happen only during pass 1, but the circularity would have to be
dealt with in the final output pass.]
Or would you say:
(EVAL-WHEN (COMPILE)
(UNLESS *DUMP-CIRCLE*
(ERROR "This file needs to be compiled with *DUMP-CIRCLE* true.")))