[cmucl-help] Re : Re : Disabling the automated code deletion when compiling.

Pascal J. Bourguignon pjb at informatimago.com
Thu Nov 4 01:26:23 CET 2010


Raymond Toy <toy.raymond at gmail.com> writes:

> On 11/3/10 3:08 PM, Rémy wrote:
>> unfortunately). So, you don't have to waste your time tracking down this 
>> symbol/string type error for me. I'd just like to test my hypothesis before 
>> giving it up, by trying to disable the code deletion, if possible. If my 
>> hypothesis appears be wrong, I will check the release notes more carefully and 
>> hope to find out something interesting.
> After a quick look through the compiler, the code deletion stuff seems
> deeply embedded in the compiler and there does not appear to be a way to
> turn it off easily.
>> ---- PROMPT-READ
>> (defmacro prompt-read (internal-var external-var initial-message
>>                     argument-type default-value
>>                     special-response-list)
>>   (declare (special *using-interface* *simple-interface-prompts*))
>>   `(if (and *using-interface* (not *simple-interface-prompts*) (not 
>> *executing*))
>>        (setq ,internal-var
>>          (do ((response nil))
>>          (nil)
>>            (let ((prompt-sym (intern (gensym "PROMPT"))))
>
> Here is one problem.  INTERN expects a string, but GENSYM returns a
> symbol.  You might get a little farther if you replaced it with
> something like (intern (symbol-name (gensym "PROMPT"))), or perhaps
> (gentemp "PROMPT"), but  gentemp is deprecated.

Deprecation in CLHS has become deprecated too.

In the worst case, you can do:

(shadow 'gentemp)
(defun gentemp (basename) (intern (symbol-name (gensym basename"))))


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.



More information about the cmucl-help mailing list